BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
plf515
Lapis Lazuli | Level 10

Hello

 

I have modelled regressions that include various quadratics and intereactions.  I have saved the predicted values so, for each model I have

 

V1    V2    Pred

1        2       5

1.1     1.2    4.30

etc for several hundred lines

 

I'd like a graph that has V1 on the x axis, Pred on the y axis and lines for different quantiles of V2.

 

I know I've done this before.... but I can't remember how.

 

 

TIA

Peter

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

If V2 is a class variable, you can use a SERIES statement with GROUP= option:

SERIES x=v1 y=pred / group=v2;

 

However, if V2 is continuous, this won't work so well.  Instead, use the EFFECTPLOT statement to get what you want.  It sounds like you might want to use the SLICEFIT option with the SLICEBY= suboption, as shown in the second example that I linked to. 

 

If your regression procedure does not support the EFFECTPLOT statement directly, you can STORE the  model to an item store and use PROC PLM, which does support the EFFECTPLOT statement.

View solution in original post

1 REPLY 1
Rick_SAS
SAS Super FREQ

If V2 is a class variable, you can use a SERIES statement with GROUP= option:

SERIES x=v1 y=pred / group=v2;

 

However, if V2 is continuous, this won't work so well.  Instead, use the EFFECTPLOT statement to get what you want.  It sounds like you might want to use the SLICEFIT option with the SLICEBY= suboption, as shown in the second example that I linked to. 

 

If your regression procedure does not support the EFFECTPLOT statement directly, you can STORE the  model to an item store and use PROC PLM, which does support the EFFECTPLOT statement.

SAS INNOVATE 2024

innovate-wordmarks-white-horiz.png

SAS is headed back 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.

Interested in speaking? Content from our attendees is one of the reasons that makes SAS Innovate such a special event!

Submit your idea!

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 737 views
  • 1 like
  • 2 in conversation