BookmarkSubscribeRSS Feed
khalillx
Fluorite | Level 6

I'm using sas on demand for my project. Here is all my code: 

PROC IMPORT DATAFILE="/home/khalillx0/sasuser.v94/project1data.csv"
OUT= project1
DBMS=csv REPLACE;
RUN;

ods listing;


proc contents;
run;

data one;
set project1;
pce0 = PCE/78.23517;
rpgas = Price/pce0;
logrpgas= log(rpgas);
logconsumption=log(consumption);
logincome=log(income);
num_mon= month (observation_date);
If num_mon=1 then dumjan=1; else dumjan=0;
If num_mon=2 then dumfeb=1;else dumfeb=0;
If num_mon=3 then dummar=1;else dummar=0;
If num_mon=4 then dumapr=1;else dumapr=0;
If num_mon=5 then dummay=1;else dummay=0;
If num_mon=6 then dumjun=1;else dumjun=0;
If num_mon=7 then dumjul=1;else dumjul=0;
If num_mon=8 then dumaug=1;else dumaug=0;
If num_mon=9 then dumsep=1; else dumsep=0;
If num_mon=10 then dumoct=1; else dumoct=0;
If num_mon=11 then dumnov=1; else dumnov=0;
If num_mon=12 then dumdec=1; else dumdec=0;

proc print;
run;
proc means;
var consumption income Oneyear Tenyear Unemployment rpgas PCE_lag;
run;

proc means;
var consumption income Oneyear Tenyear Unemployment rpgas PCE_lag;
where observation_date between '01Nov1975'd and '30Nov1980'd;
run;

proc means;
var consumption income Oneyear Tenyear Unemployment rpgas PCE_lag;
where observation_date between '01Mar2001'd and '30Mar2006'd;
run;

proc means;
var consumption income Oneyear Tenyear Unemployment rpgas PCE_lag;
where observation_date between '01Nov2013'd and '30Nov2018'd;
run;

symbol1 i=join c=black;
symbol2 i=join c=blue;
symbol3 i=join c=green;

proc gplot;
plot consumption*observation_date=1;
plot PCE_lag*observation_date=2;
plot income*observation_date=3;
run;

proc reg;
where '01Nov1975'd <= observation_date <= '30Nov1980'd;
model logconsumption = rpgas income;
run;

proc reg;
where '01Mar2001'd <= observation_date <= '31Mar2006'd;
model logconsumption = rpgas income;
run;

 

Then I get this error message for the last two proc reg demands: 

WARNING: GPATH or PATH is not a writable directory. It will be ignored.
ERROR: Cannot write image to SGprint. Please ensure that proper disk permissions are set.
ERROR: Cannot write image to SGprint. Please ensure that proper disk permissions are set.
 
I do not understand what it means. We copied the code exactly from our prof.
2 REPLIES 2
SASKiwi
PROC Star

I suspect you might be getting this problem:

http://support.sas.com/kb/49/421.html

 

Try the suggestions in this SAS note and let us know how you get on.

PGStats
Opal | Level 21

It might be that SGprint is a SAS filename that points to an invalid directory. Try redefining it to a writable location

 

filename SGprint "/home/khalillx0/sasuser.v94";

PG

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 8636 views
  • 0 likes
  • 3 in conversation