Programming the statistical procedures from SAS

EFFECT statement in proc logistic

Reply
Contributor
Posts: 65

EFFECT statement in proc logistic

Hi folks;

I am working with 9.3 version. It is indicated in the documentation that effect lag is experimental but I am not sure whether the problem in my code (following) caused by that or the other reason. Appreciate if you could help me out on this.

data new;

set old;

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

run;

proc logistic data= new outdesign = x ;

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(event='1')= id rtime seq disyear admage disage mar mtest pows rad lagelig lagpdiagnosis laglos/ nofit ctable ;

run;

the log is as follows:

ERROR: Variable LAGELIG not found.

ERROR: Variable LAGPDIAGNOSIS not found.

NOTE: The SAS System stopped processing this step because of errors.

WARNING: The data set WORK.X may be incomplete.  When this step was stopped there were 0

         observations and 0 variables.

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

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

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

23   model rstatus(event='1')= id rtime seq disyear admage disage mar mtest pows rad lag_elig

23 ! lagpdiagnosis laglos/ nofit ctable ;

24   run;

Thanks!

Issac

Grand Advisor
Posts: 16,850

Re: EFFECT statement in proc logistic

Does this give you what you expect for the variable laglos?

data new;

set old;

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

run;

Contributor
Posts: 65

Re: EFFECT statement in proc logistic

Yes. It works correct. I print the "new" data set and it seems OK.

Ask a Question
Discussion stats
  • 2 replies
  • 115 views
  • 0 likes
  • 2 in conversation