/******************************************************** THIS COMMAND GIVES COMMANDS TO IMPORT THE EXCEL FILE SHIP.XLS INTO SAS AND CREATE A NEW VARIABLE. EXAMPLE OF POISSON REGRESSION. FILENAME: SHIP.SAS **************************************************************/ PROC IMPORT OUT= WORK.ship DATAFILE= "C:\temp\ship.xls" DBMS=EXCEL2000 REPLACE; GETNAMES=YES; RUN; data ship; set ship; lmonth=log(months+1); run; /*Lab Ex 6: Descriptive Statistics*/ proc means data=ship sum mean min max; class type; var repairs months; title "Descriptive Statistics"; run; /*Lab Ex 6: Initial Model*/ proc genmod data=ship; class type; model repairs = type / dist=poisson offset=lmonth type3; title "Initial Model"; run;