BookmarkSubscribeRSS Feed
issac
Fluorite | Level 6

Hi everone;

As you might know, one new thing in 9.3 version is EFFECT statement. I incorporate it in glmselect and got the following error and got confused how to proceed.

ods html close;

ods html;

data new;

set tmp1.readmission;

laglos=ifn(seq=1,los,lag1(los));

run;

proc glmselect data= new outdesign(fullmodel) = x;

class elig pdiagnosis;

EFFECT lagelig=lag(elig/within=id period=seq nlag=1);

EFFECT lagpdiagnosis=lag(pdiagnosis/within=id period=seq nlag=1);

class  mar mtest(missing) pows(ref='NO') rad(ref='NO') lagelig lagpdiagnosis ;

model rstatus= id rtime seq disyear admage disage polyagelaglos mar mtest pows rad lagelig lagpdiagnosis;

run;

The log looks like this:

...

56   class  mar mtest(missing) pows(ref='NO') rad(ref='NO') lagelig lagpdiagnosis ;

ERROR: Variable LAGELIG not found.

ERROR: Variable LAGPDIAGNOSIS not found.

57   model rstatus= id rtime seq disyear admage disage polyagelaglos mar mtest pows rad lagelig

57 !  lagpdiagnosis;

58   run;

...

any helpful comments would be appreciative.

Thanks!

Issac

2 REPLIES 2
Rick_SAS
SAS Super FREQ

List only the "real" variables in the CLASS stmt. The effects that you generate in the EFFECT stmt have known characteristics (discrete vs continuous) based on the type of effect and the variables that you use to construct them. In your example (a LAG effect of a classification variable), the procedure "knows" that the generated effect is a classification effect.

issac
Fluorite | Level 6

Hi Rick;

Thanks for your comments. I've changed the place of class stmt and it works. Think it is necessary to include all of categorical in class before going through effect.

class mar mtest pows rad elig pdiagnosis;

EFFECT lagelig=lag(elig/within=id period=seq nlag=1);

EFFECT lagpdiagnosis=lag(pdiagnosis/within=id period=seq nlag=1);

model rstatus= id rtime seq disyear admage disage mar mtest pows rad lagelig lagpdiagnosis;

Thanks!

Issac

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 1537 views
  • 3 likes
  • 2 in conversation