☑ This topic is solved.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted Sunday
(260 views)
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.
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Did you try " ilink " option of score statement ?
score data=insure out=plmout pred stderr lclm uclm / ilink;
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Did you try " ilink " option of score statement ?
score data=insure out=plmout pred stderr lclm uclm / ilink;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, Ksharp.
I tried to include ilink in the proc plm.
proc plm restore = yy;
score data=disonsetScoreData out= be_af_disonset_graph
pred=Predicted lclm=Lower uclm=Upper/ilink;
run;
It works.
I tried to include ilink in the proc plm.
proc plm restore = yy;
score data=disonsetScoreData out= be_af_disonset_graph
pred=Predicted lclm=Lower uclm=Upper/ilink;
run;
It works.