BookmarkSubscribeRSS Feed
ajames2020
Fluorite | Level 6

Are these two lines the same? This is based on a segmented regression that I'm doing. I'm trying to use two separate methods to create the plots:

 

1. Do separate regression lines by using sgplot and the "group" option for under regression.

2. Generating values for ytrend using proc autoreg, then plotting the trend line. 

 

The lines from 1 and 2 above seem to fit the points differently. Option 1 gives me a better fit. If I'm interested in connecting the two regression lines generated in option (1) above, how would I do that? (I'm trying to show a level change in my interrupted time series analysis.

1 REPLY 1
smantha
Lapis Lazuli | Level 10

A regression line is different from a trend line,Though both can be correlated some times. This is more evident in time series plots. For a time series the following are how things are looked at

Y=intercept+seasonality(seasonal patterns)+Other causals

as an example if you are measuring sales due to an advertising campaign Other causals represent your marketing actvity and Y is the sales response, then your intercept+seasonality must be able to capture trend.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 574 views
  • 0 likes
  • 2 in conversation