BookmarkSubscribeRSS Feed
palomita_74
Calcite | Level 5

Hello,

 

I am trying to change this data using Proc SQL. I am unsure how to do so. 

 

 

proc freq data=palomaflores;
tables x1 x2 c1;
run;

proc means data=palomaflores;
var x1 x2 c1;
run;
proc means data=palomaflores n nmiss mean max
q1 maxdec=2;
var x1 x2 c1;
run;

Proc sort data = palomaflores;
by group;
Run;

proc means data=palomaflores n nmiss mean max
q1 maxdec=2;
var x1 x2 c1;
By group;
run;
proc plot data=palomaflores;
plot x2*x1;
run;
quit;

 

Thank you 

4 REPLIES 4
ballardw
Super User

What data?

Are you trying to direct the output of the procedures to data sets?

 

 

palomita_74
Calcite | Level 5
Hello This is what we were given 
palomita_74
Calcite | Level 5

*type in your uin after the equals sign in the line below;;
%let youruin=661947537;
%let mu=%substr(&youruin,8,2);
*type in your name for the dataset name;;
data yournamehere;
s=sqrt(&mu);
do i=1 to 100;
x1=ranuni(&youruin+i);
x2=&mu+s*rannorm(&youruin-i);
c1=ranuni(&youruin+1000*i);
output;
end;
run;
data yournamehere;
set yournamehere;
if c1 <=.4 then group='A';else
if .4<c1<.8 then group='B';
run;

LinusH
Tourmaline | Level 20
So you got an assignment to replace this code (all of it?) to SQL?
Is this training or professional?
If professional, what's the purpose? Assuming that you got a working program.
Data never sleeps

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 4 replies
  • 2057 views
  • 0 likes
  • 3 in conversation