A question about Wald tests. Suppose I fit a model like
xtmixed y ibn.x, noconstant
where x is a factor variable with P levels. If I run the postestimation command
test i.x, equal
I get a Wald chi-square test of the null hypothesis that the different levels of x don't differ in their effect on y. The Wald statistic has P-1 degrees of freedom.
Initially I thought that this Wald test was obtained by a matrix formula that compared b, the estimated Px1 coefficient vector of x, to V, the estimated PxP variance-covariance matrix of b. However, looking at the output, I'm starting to think that the the Wald test is actually obtained by a series of scalar calculations. Each scalar calculation computes the chi-square associated with the hypothesis that two elements of b are equal, which is obtained by dividing the squared difference between those elements of b by the squared standard error of the difference. Then all those chi-square are added up.
The scalar approach is a little different than the matrix approach because it ignores the off-diagonal elements. Am I right? Is the scalar approach used by the test statement, and what would I do to use the matrix approach instead?
Best,
Paul
xtmixed y ibn.x, noconstant
where x is a factor variable with P levels. If I run the postestimation command
test i.x, equal
I get a Wald chi-square test of the null hypothesis that the different levels of x don't differ in their effect on y. The Wald statistic has P-1 degrees of freedom.
Initially I thought that this Wald test was obtained by a matrix formula that compared b, the estimated Px1 coefficient vector of x, to V, the estimated PxP variance-covariance matrix of b. However, looking at the output, I'm starting to think that the the Wald test is actually obtained by a series of scalar calculations. Each scalar calculation computes the chi-square associated with the hypothesis that two elements of b are equal, which is obtained by dividing the squared difference between those elements of b by the squared standard error of the difference. Then all those chi-square are added up.
The scalar approach is a little different than the matrix approach because it ignores the off-diagonal elements. Am I right? Is the scalar approach used by the test statement, and what would I do to use the matrix approach instead?
Best,
Paul
Comment