Statistical Procedures

Programming the statistical procedures from SAS
BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Jie111
Quartz | Level 8

 

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
Ksharp
Super User

Did you try " ilink " option of score statement ?

score data=insure out=plmout pred stderr lclm uclm / ilink;

View solution in original post

2 REPLIES 2
Ksharp
Super User

Did you try " ilink " option of score statement ?

score data=insure out=plmout pred stderr lclm uclm / ilink;
Jie111
Quartz | Level 8
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.

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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