Data visualization with SAS programming

Regression,Median and scatter points in one plot using gplot

Reply
Occasional Contributor
Posts: 7

Regression,Median and scatter points in one plot using gplot

Hi 

 

Below sample data 

visit     dosem   avalue

1          50         8.66

 2         50         6.33

1          100        6.88

2           100        8.33

1           200       76.22

2           200        65.22

1           400       55.88

2           400       88.77

1           50      77.22

2           50      54.3

3            50       54

4             50      45

5             50     0.003

6             50     .001

I am trying to generate a plot whi ch will have all avalues as scatter points by each visitn

like dose*avalue=visit

i want to represent median line in the plot

also i want a regression ln(dose) = ln(avalue)

                             then (intercept*x**slope) is equation

 

VISIT variable decode

I calculated median and regression estimates values kept in one dataset

1-single dose scatter plot

2-multiple dose scatter plot

3.median of single dose

4.median of multiple dose

5.regression value of single dose

6.multiple dose regrssion value

 

then I used below procedure

 

symbol1 color=black value=circle height=1.5 mode=include INTERPOL=none;
symbol2 color=grey value=trianglefilled height=1.5 mode=include INTERPOL=none;
symbol3 color=blue w = 3 height=2 mode=include INTERPOL=hiloct;
symbol4 color=green w = 3 height=2 mode=include INTERPOL=hiloct ;

/* Define the symbol characteristics for the regression line */
symbol5 interpol=rl value=none color=black;
*symbol5 interpol=join value=dot color=black l=1;
*symbol6 interpol=join value=circle color=black l=2;
symbol6 interpol=rl value=none color=grey l=2;

proc sort data = x1;
by avisitn dose ;
run;


proc gplot data = x1;
plot avalue * dose = avisitn/ vaxis=axis1 haxis=axis2 noframe nolegend;
run;
quit;

 

My question my regression line not coming staright and also

I want both x,y scales in log base and custom tick marks

 

The data i gave example so values may not look correct

appreciate help

 

thank u

 

 

Ask a Question
Discussion stats
  • 0 replies
  • 144 views
  • 0 likes
  • 1 in conversation