Data visualization with SAS programming

upper limit not valid in proc sgplot

Reply
Contributor
Posts: 21

upper limit not valid in proc sgplot

Hi,

I used the following code to produce 95% confidence bands in a graph in proc sgplot.

 

proc sgplot data=AllStats noautolegend;

axis1 label = (font = 'arial');

axis2 label = (font = 'arial');

label predmupa = 'Hatching probability'

jsh = 'JSH';

band x=jsh lower=lclMuPa upper=uclMuPa /

legendlabel="95% CLM" name="band1";

series x =jsh y=predmupa;

keylegend "band1" / location=inside position=bottomright;

run;

I got a warning that the upper limit was not valid, and that the column is not expected to include all the missing values. My predicted probabilities (from proc glimmix) are very low. Could that be posing the issue?

 

Has anyone got a simmilar warning? if so, do you know how to fix it?

 

Best,

Bob

 

Super User
Posts: 22,844

Re: upper limit not valid in proc sgplot

What's the range of uclMuPA?

AXIS1 and AXIS2 are used with SAS/GRAPH procedures not SG procedures. XAXIS and XAXIS2 are the ones you want with SGPLOT.
Contributor
Posts: 21

Re: upper limit not valid in proc sgplot

Thanks!

 

I don't know the range, that's what might be causing it. Do you know how to calculate it?

 

Cheers,

Bob

SAS Super FREQ
Posts: 1,265

Re: upper limit not valid in proc sgplot

The BAND statement will not work if the values of the variables assigned to UPPER or LOWER  are ALL missing.  These are provided by you in the data set, and you would know why all are missing.

 

Also, remove the AXIS1 and AXIS2 statements.  They are of no use here.  You don't get an error because they are valid global statements used by SAS/GRAPH procedures.

Super User
Posts: 22,844

Re: upper limit not valid in proc sgplot

Run a proc means on the data set or examine it manually.

 


@boban wrote:

Thanks!

 

I don't know the range, that's what might be causing it. Do you know how to calculate it?

 

Cheers,

Bob


 

Contributor
Posts: 21

Re: upper limit not valid in proc sgplot

I don't think that it is because all of the data is missing. I ran the same code on a simplified model (two less random effects) and it worked. Besides, I'm not supposed to provide the upper limit, SAS does it when I request all stats (including uclmupa and lclmupa).

 

Thanks!

Super User
Posts: 22,844

Re: upper limit not valid in proc sgplot


@boban wrote:

I don't think that it is because all of the data is missing. I ran the same code on a simplified model (two less random effects) and it worked. Besides, I'm not supposed to provide the upper limit, SAS does it when I request all stats (including uclmupa and lclmupa).

 

Thanks!


If it worked on a simplified model, that does not mean it worked on the full model. Without any further information I don't know that we can help you here. 

 

Yes, PROC GLIMMIX will provide the upper limits, assuming everything went ok. If you need further assistance, please provide the information requested or work with SAS Tech support (you need a valid SAS license for this, e.g not SAS UE). 

 

1. Range of the Upper Limit (via PROC MEANS

2. Log from both PROC GLIMMIX and the SGPLOT statemeents

3. Or a reproducible example to allow us to replicate the issue, use PROC GLIMMIX on a different data set, such as SASHELP.CARS or HEART and we can run and test solutions. 

 

 

Contributor
Posts: 21

Re: upper limit not valid in proc sgplot

Thanks!

 

Really appreciate!

 

I'll do that.

 

Bob

Ask a Question
Discussion stats
  • 7 replies
  • 114 views
  • 0 likes
  • 3 in conversation