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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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