Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FILENAME CSV "/folders/myfolders/USStatesCrime.csv" TERMSTR=CRLF;
- PROC IMPORT DATAFILE=CSV
- OUT=WORK.MYCSV
- DBMS=CSV
- REPLACE;
- RUN;
- PROC PRINT DATA=WORK.MYCSV; RUN;
- FILENAME CSV;
- proc corr data=work.mycsv;
- run;
- proc corr data=work.mycsv plots=scatter (Ellipse = none Nwith=ALL);
- var total;
- with Violent_crime Property_crime Murder_Manslaughter Rape Robbery Aggravated_assault Burglary Larceny_theft Grand_Theft_Auto Arson Vandalism Drug_Abuse DUI Population_2016;
- run;
- /*Total Violent_crime Property_crime Murder_Manslaughter Rape Robbery Aggravated_assault Burglary Larceny_theft Grand_Theft_Auto Arson Vandalism Drug_Abuse DUI Population_2016 */
- proc reg data=work.mycsv;
- model total = Violent_crime Property_crime Murder_Manslaughter Rape Robbery Aggravated_assault Burglary Larceny_theft Grand_Theft_Auto Arson Vandalism Drug_Abuse DUI / selection = cp;
- run;
- proc reg data = work.mycsv plots(unpack useall lable) = all;
- model Total = Aggravated_assault Larceny_theft Vandalism Drug_Abuse DUI / vif clm cli;
- run;
- proc sgplot data = work.mycsv;
- reg x = total y = Aggravated_assault Larceny_theft Vandalism Drug_Abuse DUI;
- run;
- proc reg data=work.mycsv;
- model total = Violent_crime Property_crime Murder_Manslaughter Rape Robbery Aggravated_assault Burglary Larceny_theft Grand_Theft_Auto Arson Vandalism Drug_Abuse DUI / selection = stepwise sle= 0.15 sls = 0.15;
- run;
- proc reg data = work.mycsv plots(lable) = all;
- model Total = Drug_Abuse property_crime vandalism robbery DUI / vif;
- run;
- proc sgplot data = work.mycsv;
- reg x = total y = Drug_Abuse property_crime vandalism robbery DUI;
- run;
Add Comment
Please, Sign In to add comment