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

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