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