BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Calcite | Level 5

I was try to use



PLOT lnwage*education;


on my MacBook, it is a university edition, and show this error.


Can someone help my with this issue?


filename PS4SAS '/folders/myfolders/Econ';
/* Establish an extra library named PS4SAS in the Econ folder of My Folders. */
data mydata;
infile '/folders/myfolders/Econ/nlsextract.raw';
input age married education central south indcode occcode union experience tenure hours weeks wage smsa;
/* Attach an external file of demographic and workplace variables. */
proc means;
/* Get the mean of the education variable is 12.85159. */
proc freq;
tables married;
/* For married, there is 36.75% for 0; 63.25% for 1, which is married, and no value was missing for married, total 283 observations. */
data mydata; set mydata;
/* Get the new variable which is the square of experience variable. */
if wage gt 0 then lnwage=log(wage);
/* Get the new variable which is the log of the wage variable.*/

data mydata; set mydata;
if hours ge 25;
/* Restrict the average hours of a week greater or equal 25. */
proc gplot;
plot lnwage * education;
proc print data = mydata;


Accepted Solutions
Super User

SAS/Graph is not included in SAS University Edition


Look into the SGPLOT procedures instead to create your graphs.

View solution in original post

Super User

SAS/Graph is not included in SAS University Edition


Look into the SGPLOT procedures instead to create your graphs.

Calcite | Level 5

I also tried to use 


proc sgplot;

plot lnwage*education;


it still does not work.

Is this correct?

Super User

@xiaolufan wrote:


Is this correct?

Nope. Please check the documentation for examples on the use of the procedures.


In your case, it looks like a basic scatter plot.


The code is a bit more intuitive in SGPLOT in my opinion. Also, my recommendation, especially when learning is to always specify the DATA statement on your procs to denote what data source you're using.


proc sgplot data=sashelp.class;
scatter x=height y=weight;




The early bird rate has been extended! Register by March 18 for just $695 - $100 off the standard rate.


Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 


Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 3 replies
  • 2 in conversation