BookmarkSubscribeRSS Feed
issac
Fluorite | Level 6

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

2 REPLIES 2
Reeza
Super User

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

data new;

set old;

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

run;

issac
Fluorite | Level 6

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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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