I have 10 data points representative of years (2003-2012). I would like to show the regression line for the first 8 points (2003-2010) and have the last two points stand alone. Is it possible to accomplish this with GPlot?
Easily done with SGPLOT. Move the last two points to new columns (x2, y2) and make them missing in the original columns (x, y). Now plot a regressioin plot using original columns (x, y). Overlay a scatter plot with new columns (x2, y2).
The built-in gplot interpol=rl regression line is going to always go all the way to the axis (I think).
If you just want the regression line to go to a certain point (and not all the way to the axis), then I think you'll need to calculate the points along the regression line (such as using Proc Reg), and then plot those points using interpol=join.
Similar to what Sanjay was saying about sgplot, you could also do this with gplot.
See the 'Forecast Line' example, near the middle of this Line Plot chapter for an example:
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.