Skip to main content
edited title
Link
user88
user88

Problem with plotting with SAS, SGPLOT help: Can't View Plots

Tweeted twitter.com/#!/StackStats/status/108066139459952640
Source Link
assumednormal
  • 4.2k
  • 3
  • 22
  • 25

SAS, SGPLOT help: Can't View Plots

I'm very new to SAS, so please keep that in mind with any responses.

I've been running the following code in SAS:

FILENAME fishfile URL
 "http://www.amstat.org/publications/jse/datasets/fishcatch.dat";
PROC FORMAT;
  VALUE sexfmt 0="female" 1="male";
  VALUE speciesfmt 1="common bream" 2="whitefish" 3="roach"
    4="silver bream" 5="smelt" 6="pike" 7="perch";
  INVALUE misscode "NA"=. ; 
RUN;
DATA fish;
  INFILE fishfile;
  INPUT obs species weight length1 length2 
        length3 hgtpct widpct sex;
  INFORMAT weight sex misscode.; 
  LABEL length1="Nose to tail beginning length"
        length2="Nose to tail notch length"
        length3="Nose to tail end length";
  FORMAT species speciesfmt. sex sexfmt.;
RUN;

All of the above code runs without any errors. The following code gives me errors:

TITLE "Finnish Fish: Species distribution";
PROC SGPLOT DATA=fish;
  VBAR species;
RUN;
TITLE "Finnish Fish: Weight in grams";
PROC SGPLOT DATA=fish;
  HISTOGRAM weight;
RUN;

I can't access the data right now so I don't have the specific error, but it says something along the lines of "Insufficient authorization" when I try to view the resulting plots. I will post the actual error message when I can access the data again, but until then I'm hoping that someone has encountered this error and found a solution.