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