Hi. I need to add linear trendline to the data plot to show its trend.
What syntax could I add into this following proc gplot?
proc gplot data = armaxvlp;symbol1 i = splines v = dot;plot Bill*Waktu;run;
Thankyou.
Yes. (Also please look at the SGPLOT procedure, this may be simpler to use in the long run, and has a lot of nice features)
data class; set sashelp.class; seq=_n_; run; symbol1 i=rl v=dot c=green; symbol2 i=splines v=none c=red; proc gplot data=class; plot height*seq=1 height*seq=2/overlay; run; quit;
View solution in original post
I am going to guess that by "linear trendline", you mean a linear regression line.
In that case:
symbol1 i = rl v = dot;
Could I have it both rl and splines on the data plot?
Thank you so much!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Submit your idea!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.