BookmarkSubscribeRSS Feed
boban
Calcite | Level 5

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

 

7 REPLIES 7
Reeza
Super User
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.
boban
Calcite | Level 5

Thanks!

 

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

 

Cheers,

Bob

Jay54
Meteorite | Level 14

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.

Reeza
Super User

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


 

boban
Calcite | Level 5

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!

Reeza
Super User

@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. 

 

 

boban
Calcite | Level 5

Thanks!

 

Really appreciate!

 

I'll do that.

 

Bob

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 1720 views
  • 0 likes
  • 3 in conversation