BookmarkSubscribeRSS Feed
nenè
Calcite | Level 5

 

Hi to all,

i have a problem with this:

The dataset initial is below:

ASSET TIPE DOB VEHICLE_AGE VEHICLE COST REG_DATE SNAPSHOT_DATE TERM
NEW 10/09/81 0 15000 01/03/14 01/04/14 12
USED 15/08/86 6 10000 01/09/13 01/04/14 12
NEW 26/11/92 0 20000 01/03/14 01/04/14 24
USED 17/02/95 18 5000 01/09/12 01/04/14 36

 

 can you help me please??

 

Find the resulting outputs for each of the below

1.

proc freq data= work initial_data noprint;

table ASSETTYPE/out=freq (drop=percent);

where vehicle_age<12;

run;

 

2.proc summary data=work.initial_data nway missing;

class ASSETTYPE;

var vehicle_cost;

where year(reg_date)>2012;

output out=summary (drop=type__freq_)

sum(vehicle_cost=summary;

run;

 

3.proc sort data=freq(where=(ASSETTYPE='NEW'));by ASSETTYPE;run;

proc sort data=summary;by ASSETTYPE;run;

data output_merged (keep=new_var);

merge freq (in=a)summary(in=b);

by ASSETTYPE;

if a;

 

new_var='count*summary;

run;

 

 

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

These are some sort of learning exercises are they not?  If so they are there for you to learn, copy the code into your code window in University Edition, or whichever SAS product you use and run them to get the outputs.

Also, as noted before use a descriptive title line.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2 replies
  • 708 views
  • 2 likes
  • 3 in conversation