Data visualization with SAS programming

Comparing different models output and their spread in the same graph

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 9
Accepted Solution

Comparing different models output and their spread in the same graph

Dear Braintrust,

I am trying to figure out how to graphically represent different regression models findings (same covariables but run with different strategies).

I ran the same model 6 times with different assumptions and I obtained the different values as well as their upper and lower limit

 

ex for models 1 (M1 and M2)

Model parameter low_lim value up_lim

    M1    SeTUS    0.70    0.82    0.91
    M1 SpTUS    0.90    0.94    0.97    
    M1 pBRD1    0.04    0.09    0.14    
    M1    pBRD2    0.53    0.73    0.88
    M1    pBRD3    0.85    0.94    0.98
    M1    pBRD4    0.54    0.71    0.85
    M    pBRD5    0.30     0.50    0.701
    M1    pBRD6    0.14    0.26    0.41
    M1    pBRD7    0.06    0.13    0.25

M2    SeTUS    0.68    0.81    0.90
M2    SpTUS    0.90    0.94    0.98
M2    pBRD1    0.04    0.10    0.16
M2    pBRD2    0.50    0.75    0.92
M2    pBRD3    0.91    0.98    1.00
M2    pBRD4    0.65    0.84    0.95
M2    pBRD5    0.28    0.53    0.79
M2    pBRD6    0.09    0.20    0.37
M2    pBRD7    0.02    0.08    0.19

....

and so on until model 6.

 

I would like to represent in the same graph a clustered dot plot with the dot representing the value and the upper and lower bound spread grouped by the covariables.

ex: SeTUS for model 1-6 first the SpTUS for model 1-6 and so on until pBRD7 for model 1-6.

I've seen that type of graphs routinely done with R in studies comparing different modelling strategies to see the impact on the regressor findings. I would be more than happy if some of you had any clue.

Thanks so much


Accepted Solutions
Solution
‎09-16-2017 06:58 AM
Occasional Contributor
Posts: 9

Re: Comparing different models output and their spread in the same graph

Thank you very much for your reply.

it works well. I just need to play a little with the graphical option to customize color and line pattern

 

View solution in original post


All Replies
Super User
Posts: 19,058

Re: Comparing different models output and their spread in the same graph

Can you show us an example of the graph you're trying to create?
Occasional Contributor
Posts: 9

Re: Comparing different models output and their spread in the same graph

Résultats de recherche d'images pour « r for graphs with error bars »
I am thinking to a graph of this type. In the Y axis my values (from 0 to 1)
in the x axis I would have my different covariables (seTUS.....pBRD6 that replace ff, fs and ss) grouped by Model (Model 1 to 6 (as male and fermale in this graph).
I would therefore be able to compare the values obtained based on the 6 different models I have.
Super User
Posts: 19,058

Re: Comparing different models output and their spread in the same graph

[ Edited ]

Try an SGPLOT procedure. 

Use the GROUP= option to colour your models and then you can use a SCATTER statement to plot the markes and error bars.

 

Here's an example, but you don't need the SERIES statement:

http://support.sas.com/kb/42/542.html

Solution
‎09-16-2017 06:58 AM
Occasional Contributor
Posts: 9

Re: Comparing different models output and their spread in the same graph

Thank you very much for your reply.

it works well. I just need to play a little with the graphical option to customize color and line pattern

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 164 views
  • 0 likes
  • 2 in conversation