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
Does this give you what you expect for the variable laglos?
data new;
set old;
laglos=ifn(seq=1,los,lag1(los));
run;
Yes. It works correct. I print the "new" data set and it seems OK.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.