Hello Stata users,
I would like to perform a test of mean differences between two independent variables (q1 and q2), however, I would like to test the mean differences between 5 age categories i.e. test the mean differences in q1 and q2 between age_cat == 1 and age_cat == 2, age_cat == 1 and age_cat == 3, age_cat == 2 and age_cat == 4, etc (just to name a few). In total, this would mean 10 mean difference comparisons.
However, using the ttest function, you cannot perform: ttest q1 = q2, by (age_cat) since the error message gives: r(420): "more than 2 groups, only 2 allowed".
Is there a way to code the testing that what I would like to do?
Thank you in advance!
Related Posts with Test of Mean Differences by Categorical Variable
tabm varlist output takes the variable labelsHi, When I execute Code: tabm variables , the outputs take the variable labels instead of variab…
Drop Specific DataI am working with CRSP/WRDS data. I have company names in one column, dates/months (1990-2010) in ot…
A 2-stage crossover design with repeated measurements : threeway-interaction?Dear STATA list user, I am currently working with a 2-stage crossover design testing a new innovatio…
Generate a variable containing the values of other variablesHi, I know this may seem simple but I just can't figure it out. I have 3 variables: Time, serial, c…
Chow test helpGreetings, I examine panel data of 30 countries for 23 years. I have one dependent variable, and 5 i…
Subscribe to:
Post Comments (Atom)
0 Response to Test of Mean Differences by Categorical Variable
Post a Comment