05-21-2013 03:28 PM
I'm new to using proc mixed, and I have a fwe basic questions regarding the output and differences in procedure.
I have a two-level model in order to account for clustering of individual subjects within groups. I am interested in obtaining independent estimates of the between, within, and total variances so that I can calculate effect sizes for a trial.
The first question regards the output of the covariance parameters. As all the guidance documents note, I'm seeing two parameters: 1) an intercept parameter that corresponds to the cluster variable I have identified as the "subject" in my random statement; 2) the residual. My understanding is that the intercept is the between cluster variance, the residual is the within cluster variance, and the total variance can be obtained by summing these two. Can someone confirm or deny that? My for this procedure is of the following form:
model outcome = ;
random intercept /subject= clustervar;
My second question regards whether it is common practice to include a treatment effect and covariates (or predictors in general) when computing variances or intra-class correlation coefficients (ICC) using proc mixed. I have seen it done with and without the inclusion of such variables in online documentation. My sense is that, if one just wants to get variance or ICC for a particular outcome, you wouldn't model a treatment effect in that calculation. Obviously, the results are quite different using and not predictors. An example code for doing so would be:
model outcome = treatment;
random intercept /subject= clustervar;
I appreciate any help anyone can give on this matter. Thanks in advance.
05-22-2013 11:23 AM
If there are fixed effects in your design, I would certainly include them in the model statement. About the only time I use anything like your first statement is when I am doing Gage R&R calculations.
As fara as calculating the total variance, I tend to shy away from that. Likelihood methods mean that the variance components are not calculated from sums of squares, which are the only things in this context that are truly additive. Total variance will depend on number of clusters and number of subjects within each cluster.
05-22-2013 08:55 PM
As always, thanks for your quick and helpful repsonse.
One further question that expands upon your warning against summing the intercept and residual covariance parameters The typical formula for an ICC
would be something like the following:
ICC = Sc/Sw+Sc,
where Sc is the between-cluster standard deviation, Sw is the within cluster standard deviation, and Sc + Sw is taken to be the total standard deviation.
Is the a way to get these variance (or sd) components directly from proc mixed? I have been using a macro in SAS that uses proc mixed in the way
described above to get the ICC, and I was under the impression that the sum of the intercept variance and the residual variance was a valid way to get "total
variance" for the purposes of ICC calculation.
Again, your perspective on this would be highly valued.
05-23-2013 08:18 AM
Well, that definition of ICC is certainly widespread in the literature. It is known to be biased away from zero. I just wouldn't call Sw + Sc the "total variance", preferring "sum of variances". But I think that is just me being picky. Without actually doing the calculations, what happens with unequal replication from cluster to cluster, if you calculate my definition of "total" variance (i.e. ignore cluster effects, fixed effects, etc.). I don't think the number will equal Sw + Sc. Anybody else out there got a direct answer for this?
05-23-2013 10:17 AM
I think the formula is
ICC = Vc/(Vw+Vc), variance not std dev.
also it is important to remember that Vc and Vw are unexplained variances. The only time the denominator (Vw+Vc) approximates total variance is for the empty model. Once predictors are entered, IC becomes the proportion of UNEXPLAINED variance, conditional on the model.