3
$\begingroup$

I would like to test whether 3 dependent variables (measured with the same participants) differ in variance. My plan is to fit one model in which the 3 variables have the same variance, and one model in which they are allowed to have a different variance, and to then compare these models using a deviance test. Now, the question is how do I do this in SAS PROC MIXED?

The model where the 3 variables have a different variance, looks like this:

Proc mixed data=example method=REML noclprint covtest;
Class X IDpart;
Model Y = X/ solution ddfm=kr;
Random X / subject=IDpart type=un g gcorr;
Parms (1) (1) (1) (1) (1) (1) (0.000001) / hold=7;
Run ;

Where Y is the score on the dependent variables, X denotes which variable the score belongs to (x=1 x=2 or x=3) and IDpart identifies the individual participants. Note that we use the Parms statement to fix the residual variance to (a value very close to) zero, as the random statement has already fitted 3 separate variances for the 3 variables. (We don't use the 'Repeated' statement because it does not allow to constrain the variances to be equal while at the same time having unstructured covariances.) The results of this model are correct and identical to results from MLwiN.

Now, for the model where the 3 variables have the same variance, we keep running into problems. We thought we could fix the three variances from the covariance matrix defined by the random statement to (a value very close to) zero, and the let the overall variance be estimated by the residual variance, as in the syntax below:

Proc mixed data=example method=REML noclprint covtest;
Class X IDpart;
Model Y = X/ solution ddfm=kr;
Random X / subject=IDpart type=un g gcorr;
Parms (0.000001) (1) (0.000001) (1) (1) (0.000001) (1) / hold=1,3,6;
Run ;

The model converges and covariances are estimated while variances are kept to their very small starting values. However, 'gcorr' gives us correlations of '1' between the 3 variables defined by X. This cannot be correct and so either something is wrong with the model, or something is wrong with the way 'gcorr' generates the correlations.

Any help or suggestions are welcome.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.