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
Make a list table in StataDear Stata users, Thank you in advance. I want to make a table that has all items listed in cells t…
specifying stored coefficients in testI am running two multilevel models and storing the coefficients. I then want to test of the product …
OLS vs. Ordered Logistic RegressionHello, I have five employee-level variables as below, and I was wondering if I could use the OLS wi…
How to use If condition to restrict t test on only two groups with a categorical var that has 3 groupsHi Family, I have 1 categorical variable that has 3 grps( blue,yellow, green), I wanted check if the…
How to realize data deformation operationHow to perform the following data operations as follows: (1) Place the data scattered in multiple r…
Subscribe to:
Post Comments (Atom)
0 Response to Foreach paired ttest loop
Post a Comment