1 / 77

CS Example: General Linear Test (cs2.sas)

CS Example: General Linear Test (cs2.sas). proc reg data = cs ; model gpa = satm satv hsm hss hse ; * test H0: beta1 = beta2 = 0; sat: test satm , satv ; * test H0: beta3=beta4=beta5=0; hs : test hsm , hss , hse ; run ;. CS Example: General Linear Test.

vila
Download Presentation

CS Example: General Linear Test (cs2.sas)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS Example: General Linear Test (cs2.sas) procregdata=cs; modelgpa=satmsatvhsmhsshse; * test H0: beta1 = beta2 = 0; sat: testsatm, satv; * test H0: beta3=beta4=beta5=0; hs: testhsm, hss, hse; run;

  2. CS Example: General Linear Test

  3. CS Example: General Linear Test procregdata=cs; modelgpa=satmhsmhsshse; * test H0: beta1 = beta2 = 0; sat: testsatm; * test H0: beta3=beta4=beta5=0; hs: testhsm, hss, hse; run;

  4. Body Fat Example (nknw260.sas) For 20 healthy female subjects between 25 – 30 Y = amount of body fat (fat) X1 = triceptsskinfold thickness (skinfold) X2 = thigh circumference (thigh) X3 = midarm circumference (midarm)

  5. Body Fat Example: Regression (input) databodyfat; infile'I:\My Documents\Stat 512\CH07TA01.DAT'; inputskinfold thigh midarm fat; procprintdata=bodyfat; run; procregdata=bodyfat; model fat=skinfold thigh midarm; run;

  6. Body Fat Example: Diagnostics (output)

  7. Body Fat Example: Diagnostics (output)

  8. Body Fat Example: Regression (output)

  9. Body Fat Example: Extra SS procregdata=bodyfat; model fat=skinfold thigh midarm /ss1ss2; run;

  10. Body Fat Example: Regression (output)

  11. Body Fat Example: Scatter plot

  12. Body Fat Example: Correlation proccorrdata=bodyfatnoprob;run;

  13. Body Fat Example: Single Xi’s (input) procregdata=bodyfat; model fat = skinfold; model fat = thigh; model fat = midarm; run;

  14. Body Fat Example: Single Xi’s (output)

  15. Body Fat Example: General Linear Test (input) procregdata=bodyfat; model fat=skinfold thigh midarm; thighmid: test thigh, midarm; skinmid: testskinfold, midarm; thigh: test thigh; skin: testskinfold; run;

  16. Body Fat Example: General Linear Test (out)

  17. Body Fat Example: Model Selection

  18. Coefficients of Partial Determination

  19. Body Fat Example: Partial Correlation procregdata=bodyfat; model fat=skinfold thigh midarm / pcorr1pcorr2; run;

  20. Body Fat Example: Correlation (nknw260a.sas) databodyfat; infile'I:\My Documents\Stat 512\CH07TA01.DAT'; inputskinfold thigh midarm fat; procprintdata=bodyfat; run; datacorbodyfat; setbodyfat; thmid = thigh + midarm; procregdata=corbodyfat; model fat = thmid thigh midarm; run;

  21. Body Fat Example: Correlation

  22. Body Fat Example: Correlation

  23. Body Fat Example: Effects of Correlation

  24. Body Fat Example: Correlation (nknw260.sas) proccorrdata=bodyfatnoprob;run;

  25. Body Fat Example: Pairwise correlation procregdata=bodyfatcorr; model fat=skinfold thigh midarm; modelmidarm = skinfold thigh; modelskinfold = thigh midarm; model thigh = skinfoldmidarm; run;

  26. Power Cell Example: (nknw302.sas) Y: cycles until discharge – cycles X1: charge rate (3 levels) – chrate X2: temperature (3 levels) – temp datapowercell; infile'I:\My Documents\Stat 512\CH07TA09.DAT'; input cycles chrate temp; procprintdata=powercell; run;

  27. Power Cell Example: Multiple Regression datapowercell; setpowercell; chrate2=chrate*chrate; temp2=temp*temp; ct=chrate*temp; procregdata=powercell; model cycles=chrate temp chrate2 temp2 ct / ss1ss2; run;

  28. Power Cell Example: Diagnostics

  29. Power Cell Example: Diagnostics

  30. Power Cell Example: Multiple Regression (cont)

  31. Power Cell Example: Multiple Regression (cont)

  32. Power Cell Example: Multiple Regression (cont)

  33. Power Cell Example: Correlations proccorrdata=powercellnoprob; varchrate temp chrate2 temp2 ct; run;

  34. Power Cell Example: Centering data copy; setpowercell; schrate=chrate; stemp=temp; drop chrate2 temp2 ct; procstandarddata=copy out=std mean=0; varschratestemp; * schrate and stemp now have mean 0; procprintdata=std; run;

  35. Power Cell Example: Centered Variables data std; set std; schrate2=schrate*schrate; stemp2=stemp*stemp; sct=schrate*stemp; procregdata=std; model cycles= chrate temp schrate2 stemp2 sct / ss1ss2;

  36. Power Cell Example: Centered Variables (cont)

  37. Power Cell Example: Centered Variables (cont)

  38. Power Cell Example: Centered Variables (cont) proccorrdata=std noprob; varchrate temp schrate2 stemp2 sct; run;

  39. Power Cell Example: Second Order procregdata=std; model cycles= chrate temp schrate2 stemp2 sct / ss1ss2; second: test schrate2, stemp2, sct; run;

  40. Meaning of Coefficients for Qualitative Variables

  41. Insurance Example: Background (nknw459.sas) Y: number of months for an insurance company to adopt an innovation X1: size of the firm X2: Type of firm X2 = 0  mutual fund firm X2 = 1  stock firm Questions 1) Do stock firms adopt innovation faster? 2) Does the size of the firm have an effect on 1)?

  42. Insurance Example: Input data insurance; infile'I:\My Documents\Stat 512\CH11TA01.DAT'; input months size stock; procprintdata=insurance; run;

  43. Insurance Example: Scatterplot symbol1v=M i=sm70 c=black l=1; symbol2v=S i=sm70 c=red l=3; title1h=3'Insurance Innovation'; axis1label=(h=2); axis2label=(h=2angle=90); procsortdata=insurance; by stock size; title2h=2'with smoothed lines'; procgplotdata=insurance; plot months*size=stock/haxis=axis1 vaxis=axis2; run;

  44. Insurance Example: Scatterplot (cont)

  45. Insurance Example: Regression data insurance; set insurance; sizestock=size*stock; run; procregdata=insurance; model months = size stock sizestock; sameline: test stock, sizestock; run;

  46. Insurance Example: Regression (cont)

  47. Insurance Example: Regression (cont)

  48. Insurance Example: Regression 2 procregdata=insurance; model months = size stock; run;

  49. Insurance Example: Comparison

  50. Insurance Example: Regression 2 procregdata=insurance; model months = size stock; run;

More Related