I want to plot from a proc plm based on a stored dataset output from proc glimmix procedure.
here is my code:
proc glimmix data= insomnia Method=ml noclprint ;
class newid T;
model insomnia = year_1_cvd_time_center cvd_onset cvd_onset*year_1_cvd_time_center
year_1_cvd_time_square cvd_onset*year_1_cvd_time_square is_high_education_y0 is_female age_at_year0
is_high_education_y0*year_1_cvd_time_center is_female*year_1_cvd_time_center age_at_year0*year_1_cvd_time_center/solution notest cl ddfm=bw dist=binary;
random intercept year_1_cvd_time_center year_1_cvd_time_square /subject= newid type=vc;
store out = model_be_cvd_onset;
run;
data disonsetScoreData;
do year_1_cvd_time_center = -6 to 6 by 1;
do cvd_onset = 0 to 1;
year_1_cvd_time_square = (year_1_cvd_time_center ) * (year_1_cvd_time_center);
back_timescale_disonset = year_1_cvd_time_center - 6 ;
age_at_year0 = 56;
is_female = 1;
is_high_education_y0 = 0;
output;
end;
end;
run;
/*for drawing the graph*/
proc plm restore = model_be_cvd_onset;
score data=disonsetScoreData out= be_af_disonset_graph
pred=Predicted lclm=Lower uclm=Upper;
run;
However, above proc plm does not output the probability.
I know below code could output probability for each timepoint, but how could I get it for CVD_onset = 0 and CVD_onset = 1.
ods output fitplot = effectPlotRawData; proc plm source= insomnia; effectplot fit(x=year_1_cvd_time_center ); run;
That says, I want to draw two lines using proc plm.
Thanks in advance.
Did you try " ilink " option of score statement ?
score data=insure out=plmout pred stderr lclm uclm / ilink;
Did you try " ilink " option of score statement ?
score data=insure out=plmout pred stderr lclm uclm / ilink;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.