Basically, I run a mixed model, followed by the margins command. Then I'd like to calculate effect sizes, but I don't know how to do this in Stata. How do you do this? You can continue reading if you'd like.
Let's say I run the two lines of code below:
mixed mathscore i.female i.race age i.treated if sample == 1 || school:, mle variance covariance(unstructured)
margins female race, atmeans post
The variable mathscore is continuous.
The variable female is 0 for male, 1 for female.
The variable race is 0 for Hispanic, 1 for Black, and 2 for White.
The variable age is continuous (it's in months).
The variable treated is 0 if student did not receive treatment, 1 if student received treatment.
The variable sample is 0 if student is not in the analytic sample, 1 if student is in analytic sample.
Students are grouped by school.
I'd like to calculate the effect size between (1) female vs. male, (2) Hispanic vs. black, (3) Hispanic vs. White, (4) Black vs. Hispanic. How would you calculate these effect sizes?
I've read about how to calculate effect sizes in the following document, but this is not specific to Stata: http://www.bwgriffin.com/gsu/courses...Sizes_pdf5.pdf. If I understand effect sizes, then I know I can calculate an effect size if I have the mean for each group, the standard error for each group, and the number of observations in each group. After running the margins command, I get the mean and standard error for each group, but how can I get the number of observations in each group? I'm checking the matrices using return list and ereturn list.
Thanks for your help.
Let's say I run the two lines of code below:
mixed mathscore i.female i.race age i.treated if sample == 1 || school:, mle variance covariance(unstructured)
margins female race, atmeans post
The variable mathscore is continuous.
The variable female is 0 for male, 1 for female.
The variable race is 0 for Hispanic, 1 for Black, and 2 for White.
The variable age is continuous (it's in months).
The variable treated is 0 if student did not receive treatment, 1 if student received treatment.
The variable sample is 0 if student is not in the analytic sample, 1 if student is in analytic sample.
Students are grouped by school.
I'd like to calculate the effect size between (1) female vs. male, (2) Hispanic vs. black, (3) Hispanic vs. White, (4) Black vs. Hispanic. How would you calculate these effect sizes?
I've read about how to calculate effect sizes in the following document, but this is not specific to Stata: http://www.bwgriffin.com/gsu/courses...Sizes_pdf5.pdf. If I understand effect sizes, then I know I can calculate an effect size if I have the mean for each group, the standard error for each group, and the number of observations in each group. After running the margins command, I get the mean and standard error for each group, but how can I get the number of observations in each group? I'm checking the matrices using return list and ereturn list.
Thanks for your help.
Comment