04-27-2018 03:15 AM - edited 04-27-2018 03:20 AM
My data is longitudinal with repeated measures of the exposure and the outcome across time. My exposure variable and outcome variable are continuous, but I'm controlling for continuous and categorical variables. I have imputed the missing covariates and used a mixed model with a random intercept. When I try using MIANALYZE, SAS does not produce combined tests/p-values for my categorical variables even though I've included the classvar=full option as described in the documentation. I get this warning message:
I also tried using the TEST statement to produce a combined test of my categorical variable but I get an error message saying TEST cannot be used with class variables.
Here is the structure of my code:
PROC MI DATA=data OUT=outmi;
FCS DISCRIM(group) REG(exposure);
VAR group <and multiple other variables>;
PROC MIXED DATA=data covtest;
CLASS id group;
MODEL outcome=time exposure group time*exposure /ddfm=bw solution CL covb;
RANDOM intercept / SUBJECT=id TYPE=UN;
ods output SolutionF=mixparms CovB=mixcovb;
PROC MIANALYZE PARMS(CLASSVAR=full)=mixparms COVB(EFFECTVAR=rowcol)=mixcovb;
MODELEFFECTS intercept time exposure group time*exposure;
I would greatly appreciate your help. I've been looking everywhere. Others have had a similar issue, but the solution seems to have been the CLASSVAR=full option which didn't work for me.
05-02-2018 08:14 AM
This will happen any time you are using the covariance matrix from MIXED since it provides a design matrix that is not full rank. Since you are not using the MULT option or the TEST statement you can remove the COVB= data set completely and the WARNING will go away.
To get combined tests for the CLASS variables (since MIANALYZE does not allow a TEST statement) you could take the approach detailed in this paper.
05-03-2018 04:23 AM
Thanks, but unfortunately, it is not working.
I cannot produce type3s with the mixed model. When I add "method=type3" in the proc mixed statement, I get the following error message:
ERROR: Type 3 estimation is not available with this model.
Therefore, I can't use the macro from the paper you gave me because I cannot produce and extract the type3s.
Would you know a way around this problem?