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
Request for supportDear Sir/Madam, Good afternoon I used for my meta analysis, the command "metaprop case samplesize,ra…
calculating dissim index and storing results.Hi. I am using Ben Jann’s Duncan SSC package to calculate a dissimilarity index for each month and …
Is poisson QML fixed effect estimation appropriate for non-negative continuous variable in event-study design?Dear Stata users, I'm looking at the effect of coauthorship with a star scientist on the individual…
doLCA plugin PSUI am currently using the doLCA plugin list to estimate an unconditional RMLCA model. However, I have…
Problem with lag variableDear Statalists, how do I generate a lag variable which is the same for all years. Code: * Example…
Subscribe to:
Post Comments (Atom)
0 Response to Foreach paired ttest loop
Post a Comment