Hi there,
I'm having trouble running the foreach command using paired ttest.
I have tried something like this, but it did not work:
foreach var of varlist ZLracylcarn*{
foreach i in 1 2{
ttest ZLracylcarn`i'*==ZLracylcarn`i+1'*
}
My variables at time point one are named:
ZLracylcarn_1_C0_
ZLracylcarn_1_C10_
and so on....
And my variables at time point two are named:
ZLracylcarn_2_C0_
ZLracylcarn_2_C10_
and so on....
Also, how can I export these results to excel?
Any help is very welcome.
Many thanks
Nathalie
Related Posts with Foreach paired ttest loop
Help Interpreting a log-log scale scatter plotDear all, I am using Stata 16, on mac. I used the command twoway scatter lnGDP lnpopulation. GDP i…
Copy database only with variable codes into ExcelI need to copy and paste database only with variable codes into Excel from STATA. How to do it? Plea…
Create a Panel DatasetGood Evening, I am trying to build a panel dataset from a list of Banks that I have downloaded from …
Random effects Fractional Regression ModelHello everyone! I am planning to run a fractional regression model in the context of panel data . As…
cmxtmixlogit: real life data & applications?Hi Statalist -cmxtmixlogit- was newly introduced in Stata 16 to enable choice modelling for panel d…
Subscribe to:
Post Comments (Atom)
0 Response to Foreach paired ttest loop
Post a Comment