ST500 Session 6 _review assignment 1 (c) - minitab output _Visit other statistical Web sites _Regression: Y is the dependent variable, X1, X2, X3 ... are the independent variables . SAS: proc reg; model Y= X1--X3 /p cli influence vif selection=stepwise; output out=resid p=py r=ry rstudent=rs; Also: proc print data=resid; RSREG SPSS: regression variables = (collect)/ descriptives = default/ statistics = default/ dependent= Y/ method = enter X1 to X3 stepwise X4 to X6/ residuals=outliers(sresid resid )/ save= dffit pred sresid resid cook lever dfbeta / list execute MINITAB: reg Y 3 X1 - X3 res c10 fits c11; hi c12; tresiduals c13; Also: cookd c14; STEPWISE dfits c15; BREG vif . print Y X1 - X3 c10 - c15 stop _ Analysis of Variance: Y is the dependent variable, F1, F2, F3 ... are the factors, and X is a covariate. SPSS: manova Y by F1 (min,max),F2(min,max) with X/ pmeans=tables (F1 by F2)/ residuals plot/ plot=stemleaf boxplots normal/ design=F1, F2, F1 bv F2/ list execute MINITAB: glm Y = F1 I F2; covariates X; fits c10; residuals c11; sresiduals c12; hi c13; means F1 I F2. print Y F1 F2 X c10 - c13 stop SAS: proc glm; class F1 F2; model Y = F1 I F2 X/ p cli solution; Ismeans F1 I F2; output out= resid p= PY r= RY h=h cookd=cd dffits=df rstudent=rs ; Ismeans F1 lF2; proc print; Assignment 3 - analysis of variance email to me before class on Thurs, Jan 11. Please use a3a for SAS, a3b for SPSS and a3c for Minitab. 1. Run the following regression with sas using '../data/weight.dat' as data file. Note: the variable called sex, which is alpha will not work in proc reg, so a numeric variable, nsex = 1 (male), = 2 (female), must be created in the data step. a. proc reg; model weight = nsex; b. proc reg; model weight = height; c. proc reg; model weight = nsex height; 2. Run the following procedures with sas using '../data/weight.dat'. a. proc ttest; class sex; var weight; b. proc glm; model weight = height; c. proc glm; class sex; model weight = height sex; 3. How does the output in 1.a.- 1.c. compare to 2.a.-2.c.? Explain how height and sex are related to weight. Are height and sex 'statistically significant' effects? (We will discuss in class.) 4. Run spss to get the analysis of variance in 2.c.(as in 1., nsex must be created) 5. Run minitab to get the analysis of variance in 2.c. (either read weight.dat with a format as in assign 1 (c) and then create a numeric col for sex, OR read 'assign1.datx' and then 'code (-1) 77 c3 c3'. Remember, -1 was missing, and was replaced in the weight.dat file with 77) 6. copy the '../data/weight.dat' file into your home directory and add the following line of data as the bottom line of the file: Harry m 55 . 15 Use proc reg and proc glm in sas to get a predicted value for harry's weight for the models in 1.c. and 2.c. (Use 'p' and 'cli' after a '/' at the end of the model statement. ) NOTE about running minitab:(in both batch and interactive modes) ALWAYS after using echo outfile 'file'; noterm. batch use nooutfile which causes minitab to write the file 'file.LlS'. ALWAYS after using journal 'file' use nojournal which causes minitab to write the file 'file.MTJ'.