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
Converting week to dateHi there, I'm currently working on a data that consist of 'date of birth' and 'gestational age' in …
Generating status variable for firmDear Statalist users, I have panel data for firms involved in international trade. t1 is my variabl…
How to draw two base lines using coefplot command on stata.Hey! I'm trying to create a graph similar to the one attached with this post. I have two problems: 1…
Resetting mlibs in running StataHi I'm building some mata code in which parts must be saved in Stata versions 12, 13, 14, or 15. Bas…
Psmatch and questions about itHi, I would like to investigate the effects of a natural disaster on individuals. Therefore I have …
Subscribe to:
Post Comments (Atom)
0 Response to Foreach paired ttest loop
Post a Comment