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.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 2 replies
  • 585 views
  • 2 likes
  • 3 in conversation