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

I was try to use

 

PROC GPLOT;

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;
experience2=experience*experience;
/* 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;
run;

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
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

3 REPLIES 3
Reeza
Super User

SAS/Graph is not included in SAS University Edition

 

Look into the SGPLOT procedures instead to create your graphs.

xiaolufan
Calcite | Level 5

I also tried to use 

 

proc sgplot;

plot lnwage*education;

 

it still does not work.

Is this correct?

Reeza
Super User

@xiaolufan wrote:
 

 

Is this correct?


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

 

http://support.sas.com/documentation/cdl/en/grstatproc/67909/HTML/default/viewer.htm#n06fb9ichgg6akn...

 

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;
run;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 3197 views
  • 2 likes
  • 2 in conversation