BookmarkSubscribeRSS Feed
ngui
Calcite | Level 5

Hi, 

I have successfully executed the repeated measurement code. While using PROC PLM, I can visualize the mean separation by alphabet. However, the line graph generated by SAS is not what I wish to present in my thesis. Do you know how I can generate a line graph in SAS that looks similar to an Excel line graph that I show below?

 

Line graphs from SAS

ngui_1-1701805310624.png

Line graph from Excel

ngui_0-1701805230536.png

 

Code for repeated measurement 

Data RM;

  set RM;

  TRL_new = TRL ;

  TRL_sq = sqrt(TRL_new);

  TRL_log = log(TRL_new+1);

run;

 

ods graphics on;

 

proc sort data= RM;

by EU Day;

run;

 

%LET type=un; /*"Using the unstructured covariance matrix" */

proc mixed data= RM cl plots=residualpanel (conditional) plot=boxplot (conditional);

      class Block Day Accession Irrigation EU;

      model A_new = Accession Day Irrigation

                    Accession*Day Accession*Irrigation Irrigation*Day Accession*Irrigation*Day

                     / ddfm=satterth;

      Random Block;

      repeated Day / subject=EU type=&type r rcorr;

      lsmeans       Accession Day Irrigation

                    Accession*Day Accession*Irrigation Irrigation*Day Accession*Irrigation*Day

                     / adjust=Tukey;

   store ABCXYZ / label='PLM: Getting Started';  /* Store (Save the results from Proc Mixed) */

run;

 

proc plm restore=ABCXYZ; /* Use for Prost Hoc Analysis with PROC PLM */

   lsmeans Irrigation*day / lines linestable; /* Use for Prost Hoc Analysis for irrigation and day factors*/

   ods output LSMLines=LSMLines;

run;

/* end of program */

2 REPLIES 2
Ksharp
Super User
data have;
call streaminit(123);
do treat=1 to 2;
  do day=25 to 60;
    do i=1 to 20;
      x=rand('uniform')+treat;output;
	end;
  end;
end;
run;

proc summary data=have nway;
class treat day;
var x;
output out=want mean=mean lclm=lclm uclm=uclm;
run;

proc sgplot data=want;
series x=day y=mean/group=treat markers markerattrs=(symbol=circlefilled);
scatter x=day y=mean/yerrorlower=lclm yerrorupper=uclm group=treat markerattrs=(size=0);
run;

Ksharp_0-1701841781881.png

 

sbxkoenk
SAS Super FREQ

Koen

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 796 views
  • 2 likes
  • 3 in conversation