Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • mean command postestimation for variance

    Hello,

    I have a question regarding accessing variance estimates from mean command. In my data, there are treatment and control groups over 6 years. I want to test if the variance estimates are different between two groups in each year.

    Code:
    mean outcome, over(year group)
    estat sd, variance
    After this very simple code, I get mean and variance estimates for two groups separately in each year. I am trying to use test command to do a Wald test to see if the variance estimates of the two groups are different. I acknowledge this is just an approximation, and other tests may be better, but this is irrelevant for my question.

    When I use a regression, I used something like
    Code:
    test [RP1]var(treatment group) = [RP2]var(control group)
    to do the Wald test. How can I do this after mean command?

    Thanks,

    Sun

  • #2
    There is no Wald test here because the output from -estat sd- does not include anything like a standard error of the group variances.

    If you want to do a test of equality of variances in the groups, you can do an F-test. (V1/(n1-1))/(V2/(n2-1)) has an F distribution with n1, n2 degrees of freedom under the usual normal theory assumptions. V1 and V2 can be pulled from r(variance) and the n's can be pulled from e(_N) after -estat sd, variance-.

    Comment

    Working...
    X