BookmarkSubscribeRSS Feed
ameliebjean
Calcite | Level 5

Hi,

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: 

 

WARNING: The within-imputation covariance matrix is singular. The total covariance matrix and related statistics in multivariate
inference will be set to missing.
 

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;
CLASS group;
FCS DISCRIM(group) REG(exposure);
VAR group <and multiple other variables>;
RUN;

 

PROC MIXED DATA=data covtest;

BY _IMPUTATION_;

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;

RUN;

 

PROC MIANALYZE PARMS(CLASSVAR=full)=mixparms COVB(EFFECTVAR=rowcol)=mixcovb;

CLASS group;

MODELEFFECTS intercept time exposure group time*exposure;

RUN;

QUIT;

 

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.

 

Thanks

 

2 REPLIES 2
SAS_Rob
SAS Employee

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.

 http://support.sas.com/resources/papers/proceedings14/1543-2014.pdf

 

ameliebjean
Calcite | Level 5

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?

 

Thanks

 

Amélie

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1915 views
  • 0 likes
  • 2 in conversation