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.
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.
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!
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.
Ready to level-up your skills? Choose your own adventure.