Programming the statistical procedures from SAS

EFFECT statement in proc GLMSELECT

Reply
Contributor
Posts: 65

EFFECT statement in proc GLMSELECT

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

SAS Super FREQ
Posts: 3,547

Re: EFFECT statement in proc GLMSELECT

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.

Contributor
Posts: 65

Re: EFFECT statement in proc GLMSELECT

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

Ask a Question
Discussion stats
  • 2 replies
  • 195 views
  • 3 likes
  • 2 in conversation