Programming the statistical procedures from SAS

PROC MIANALYZE missing class variable

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

PROC MIANALYZE missing class variable

Hello,

 

I am trying to run a proc mianalyze on my genmod ouput, but I keep getting an error that I'm missing variables: 

ERROR: Variable APOEn is not in the PARMS= data set.

But when I open up the temporary parms dataset in my Work folder, the variable is APOEn is listed as one of the parameters. 

Any suggestions?

 

*Note: I had originally tried to get parameter estimates with a ParameterEstimates in the ods output statement, but with no success. I found GEEEmpPEst in another SAS forum, so I'm not sure if that is what is leading to my missing variable error?

 

 

Here is my syntax:

 

ods select none;

proc genmod data=ce.imputed_data2;

class isid depression(ref='0') apoen(ref='0') dementia(ref='0') gender(ref='Män') diabetes(ref='0') cancer(ref='0') heartattack(ref='0') SES(ref='0') educationlevel(ref='0') smokingstatus(ref='0')/param = ref;

model depression=apoen dementia gender BMI diabetes cancer heartattack SES Educationlevel smokingstatus/ covb;

repeatedsubject=isid;

by _Imputation_;

    ods output GEEEmpPEst=gmparms CovB=gmcovb ParmInfo=gmpinfo;

run;

ods select all;

proc mianalyze parms=gmparms covb=gmcovb parminfo=gmpinfo;

class apoen dementia gender diabetes cancer heartattack SES educationlevel smokingstatus;

modeleffects Intercept apoen dementia gender BMI diabetes cancer heartattack SES Educationlevel smokingstatus;

run;

 

 

Thank you in advance for the assistance!

Jamie


Accepted Solutions
Solution
‎03-10-2017 09:11 PM
New Contributor
Posts: 3

Re: PROC MIANALYZE missing class variable

Thanks for the response. It wasn't that APOEn wasn't the variable name, I needed to specify a classvar= option for parm=  in the proc mianalyze syntax. I found the more appropriate ods output table name for GEE parameter estimates with model-based standard errors (GEEModPEst), which needed /MODELSE to be added for the repeated statement in proc genmod. I also had to add /dist=bin to the model statement. 

 

ods select none;

proc genmod data=ce.imputed_data2;

class isid depression(ref='0') apoen(ref='0') dementia(ref='0') gender(ref='Män') diabetes(ref='0') cancer(ref='0') heartattack(ref='0') SES(ref='0') educationlevel(ref='0') smokingstatus(ref='0')/param = ref;

model depression=apoen dementia gender BMI diabetes cancer heartattack SES Educationlevel smokingstatus/dist=bin covb;

repeated subject=isid/MODELSE;

by _Imputation_;

    ods output GEEModPEst=gmparms CovB=gmcovb ParmInfo=gmpinfo;

run;

ods select all;

proc mianalyze parms(classvar=level)=gmparms covb=gmcovb parminfo=gmpinfo;

class apoen dementia gender diabetes cancer heartattack SES educationlevel smokingstatus;

modeleffects Intercept apoen dementia gender BMI diabetes cancer heartattack SES Educationlevel smokingstatus;

run;

View solution in original post


All Replies
Super User
Posts: 10,871

Re: PROC MIANALYZE missing class variable

I might check to make sure the variable name is APOEN and not the variable Label. If by "open the data set" you mean open in a table view you may be seeing a Label and not the variable name. At least that is a simple thing to check.

 

Solution
‎03-10-2017 09:11 PM
New Contributor
Posts: 3

Re: PROC MIANALYZE missing class variable

Thanks for the response. It wasn't that APOEn wasn't the variable name, I needed to specify a classvar= option for parm=  in the proc mianalyze syntax. I found the more appropriate ods output table name for GEE parameter estimates with model-based standard errors (GEEModPEst), which needed /MODELSE to be added for the repeated statement in proc genmod. I also had to add /dist=bin to the model statement. 

 

ods select none;

proc genmod data=ce.imputed_data2;

class isid depression(ref='0') apoen(ref='0') dementia(ref='0') gender(ref='Män') diabetes(ref='0') cancer(ref='0') heartattack(ref='0') SES(ref='0') educationlevel(ref='0') smokingstatus(ref='0')/param = ref;

model depression=apoen dementia gender BMI diabetes cancer heartattack SES Educationlevel smokingstatus/dist=bin covb;

repeated subject=isid/MODELSE;

by _Imputation_;

    ods output GEEModPEst=gmparms CovB=gmcovb ParmInfo=gmpinfo;

run;

ods select all;

proc mianalyze parms(classvar=level)=gmparms covb=gmcovb parminfo=gmpinfo;

class apoen dementia gender diabetes cancer heartattack SES educationlevel smokingstatus;

modeleffects Intercept apoen dementia gender BMI diabetes cancer heartattack SES Educationlevel smokingstatus;

run;

☑ This topic is solved.

Need further help from the community? Please ask a new question.

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