BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jamiemblack
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
jamiemblack
Calcite | Level 5

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

2 REPLIES 2
ballardw
Super User

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.

 

jamiemblack
Calcite | Level 5

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;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2803 views
  • 0 likes
  • 2 in conversation