5
SOLvT+-~ 1. This problem concerns relating body fat Y (as measured by an expensive, but essentially exact, measure) to a skin measure (Xl) and thigh measure (X 2 ) using linear regression. The Body Fat Example output fits the model Y i = 130 + 131Xi1 + 132Xi2 + Ci with output from both SAS and R. (a) What assumptions arebeing made on the error terms for this analysis to be valid? £(Ev)~() \j( E J:: cJ '2 {c (j vS 'T'(-)..;1 ) f.lCt~~ Ej uvc(;()nGQc:.1cJLII'\J2.ep~:v£.evT '-t~ C.:tj f:. ;., cQ i J TO) G 0-;-\;:.0 rvO~I'\C-) L (b) First, state preciselywhat null hypothesis is being tested by the F statistic of 29.797 in the Analysis of Variance table (SAS), or equivalently the F-statistic at the end of the summary in the R output? kl o ', (31:::: (3z ::: 0 -What is yourconclusion? What does does it say about the coefficients? C -,,~ f1 t<. is NOt 0 Q,t.:sV::-cr Ho, c;I-"cLvc.Qe Ct.T Le~j T OAJr Crr f~) eft,..,)?. (c) What hypothesis is being tested by the P-value of .0369 associated with thigh? I-L; f-3 z :: 0 (d) Notice that the standard errors and the t-statistics for the coefficients are missing. Show with a number involved how with one calculation you can get the standard error for skin from other information on the output. Then set-up (with numbers) how you would then get the t-statistic for testing thatthe coefficient for skin is O. no need to carry out the calculations. (e) What is the -0.081628463 in the covariance matrix an estimate of? eS'j'j·", ,(he J CcJ L 6,/ 'to 2.. J (f) Suppose we fit the model assuming E(Y) = 130 + 131X1 + 132X2 + 133X1X2. interaction. State IN WORDS what the meaning of this is. ES\'€q (Sl-p< '\ C...\ Xc d..e.pe,ucJ.,j 0-0 LJ),c:rT'-rk l. \. i~ Y'( (g) Suppose we have a third variable X 3 = 1 if the subject is white 0 if the subject is non-white. Suppose we fit a model of the form E(Y) = 130+ 131Xi + 132X3 + 133X1 * X 3 (note that X2 is not involved here). Give verbal interpretations to each of the parameters 130, 131, 132 and 133, referring to race as you do so. (30 '::: (5\:. {j)('''\ - JL, - (53 1~,J'7C.tttepl Whe--.> (ZPler- =W\.,:·.€ ~),lor(. )(0 e5y.~~ r C. (' VI ·-tCfL ><3 J-\ (U"ICE :::. (;.Jh'7 e:- . "._ "p'- '-\d1 ftf\CE. .:::: U\"i'l C. .':luTCNe>p'l ·fc:.'t G7ACE :::-rJCNWki·.e... - I,J je.f1C<: . I 'S Lo~c.. -5-CIly:.3 Wl.-, •. ,\) ~nCE.:;: WI-)'1e ~ Stufe ·-td'L'I<:'3 (/..>),.,(/.0 .{2l>tcf:::::' t--O~)v.J\" 'lC- 1 . S~f \30C'L

SOLvT+-~people.math.umass.edu/~johnpb/s505/final12s.pdf · ST505/679R: Fall 20~2SECOND EXAM: PART II, Open book, notes, etc. Set-up means WITH ALL NUMBERS! BUT NO NEED TO CALCULATE

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: SOLvT+-~people.math.umass.edu/~johnpb/s505/final12s.pdf · ST505/679R: Fall 20~2SECOND EXAM: PART II, Open book, notes, etc. Set-up means WITH ALL NUMBERS! BUT NO NEED TO CALCULATE

SOLvT+-~

1. This problem concerns relating body fat Y (as measured by an expensive, but essentially exact, measure) toa skin measure (Xl) and thigh measure (X2) using linear regression. The Body Fat Example output fits themodel Yi = 130+ 131Xi1 + 132Xi2 + Ci with output from both SAS and R.

(a) What assumptions are being made on the error terms for this analysis to be valid?

£(Ev)~()

\j( E J :: cJ '2 {c (j vS 'T'(-)..;1 )

f.lCt~~ Ej uvc(;()nGQc:.1cJLII'\J2.ep~:v£.evT '-t~ C.:tjf:. ;., cQ iJ TO) G 0-;-\;:.0 rvO~I'\C-)L

(b) First, state precisely what null hypothesis is being tested by the F statistic of 29.797 in the Analysis ofVariance table (SAS), or equivalently the F-statistic at the end of the summary in the R output?

klo', (31:::: (3z ::: 0-What is your conclusion? What does does it say about the coefficients?

C -,,~ f1 t<. is NOt 0Q,t.:sV::-cr Ho, c;I-"cLvc.Qe Ct.T Le~j T OAJr Crr f~) eft,..,)?.

(c) What hypothesis is being tested by the P-value of .0369 associated with thigh?

I-L; f-3 z :: 0

(d) Notice that the standard errors and the t-statistics for the coefficients are missing. Show with a numberinvolved how with one calculation you can get the standard error for skin from other information on theoutput. Then set-up (with numbers) how you would then get the t-statistic for testing that the coefficientfor skin is O. no need to carry out the calculations.

(e) What is the -0.081628463 in the covariance matrix an estimate of?

eS'j'j·", ,(he J CcJ L 6,/ 'to 2.. J(f) Suppose we fit the model assuming E(Y) = 130+ 131X1 + 132X2 + 133X1X2.

interaction. State IN WORDS what the meaning of this is.

ES\'€q (Sl-p< '\ C...\ Xc d..e.pe,ucJ.,j 0-0 LJ),c:rT'-rk

l. \. i~ Y'(

(g) Suppose we have a third variable X3 = 1 if the subject is white 0 if the subject is non-white. Suppose wefit a model of the form E(Y) = 130+ 131Xi + 132X3 + 133X1 * X3 (note that X2 is not involved here). Giveverbal interpretations to each of the parameters 130, 131, 132 and 133, referring to race as you do so.

(30 ':::

(5\ :.{j)('''\ -JL, -

(53

1~,J'7C.tttepl Whe--.> (ZPler- =W\.,:·.€

~),lor(. )(0 e5y.~~rC.('VI ·-tCfL ><3 J-\ (U"ICE :::. (;.Jh'7 e:-. "._ "p'- '-\d1 ftf\CE. .::::U\"i'l C.

.':luTCNe>p'l ·fc:.'t G7ACE :::-rJCNWki·.e... - I,J je.f1C<: . I

'S Lo~c.. -5-CIly:.3 Wl.-,•.,\) ~nCE.:;: WI-)'1e ~ Stufe ·-td'L'I<:'3 (/..>),.,(/.0

.{2l>tcf:::::' t--O~)v.J\" 'lC-1 .

S~f \30C'L

Page 2: SOLvT+-~people.math.umass.edu/~johnpb/s505/final12s.pdf · ST505/679R: Fall 20~2SECOND EXAM: PART II, Open book, notes, etc. Set-up means WITH ALL NUMBERS! BUT NO NEED TO CALCULATE

2. A friend of yours took a course which covered an introduction to statistics with just a little regression. Lookingover what you have been doing she sees a number of new things that she doesn't know about. (Let's callher Florence after Florence Nightingale, who provided the motivation for the creation of the Red Cross, andalso happened to be an early member of the American Statistical Association.) Provide a brief answer toFlorence's questions below. Your answers should be: ONE SENTENCE FOR EACH QUESTION ANDSHOULD BE JUST IN WORDS. NO FORMULAS!

(a) I saw this thing labeled consistent covariance of estimates in your SAS output, or what was also referredto as White's robust estimate of the covariance of the estimates in R. Why would I want to use that?I would use that since it estimates THe CG....4C)/} ,/1;J{£" iYAf.li/-}"'ce o·F .b allowing for the fact

that '\ I· 1\'. "'-C- VAr)IC<-J\.Ic.e....i "Ad b.e u~e?JJAL

(b) I see that you are doing model building. I remember that R2 was used as a measure of how good themodel was. Why don't you just compute R2 for each combination of variables and chose the combinationof variables with the highest R2?

8('(lAiJ~C 'I~e H:rCtt FS'TR <. ALwA'I..J OCCuILS LfiTI.-. ALL

\/ An::i2AC Lfs ,4..-'\J'T:r\ c:h CDS L '

(c) I happened to see that example you had modelling yield as a function of temperature and moisture. Sinceit involved temperature- squared and moisture-squared, why do you refer to is as a multiple linear modelwhen the model for expected yield is a non-linear function of yield and moisture, or did you make amistake?I', Mo,! \38 tJCNL:r..vJZ.l)\l ::OJ'l\-1e X'.s BvT\ T l ~l \ w eA ~~' ;!oJ 'TH ~ PAnRl)c If'fl5 (w~ .•cHIS. LV ':AI L"~Iva)f( Ls

fL.\?:F Gnn.:r.:'\.J~'10)(d) What is this Cp statistic used for?

:::tJ i~ u..i-e c--R... .-f C:.fL \J A (( : t.=lG l \: S Ii: L Ec-I,:t c...v

REMAINING PARTS OF THIS PROBLEM FOR 697R STUDENTS ONLY. You can usetwo sentences here if needed

(e) I know what residuals are. Why do you want to use studentized residuals rather than the regular residuals?

t\JE.0 i~'J~<L Ec \."qJ~ CO,.-.UTO-u'T VAn (f'\.vcE7 'J~e VAni0·\.,{.C"J

0+ 'The... e· eRe s:6 JC.P s) \'.0J e fUOtv C O,.vJ"lf)vT vAn :0..1,-,( E'.

8 ~ q STV~\?AJT.:r:,z.::tvc:'II 'iSe- UAI} ,C--:,--,Ce. o·t- e(s We Q -L(5 <:?- Co 1'-' S"iA v T

(f) What is the leverage value used for? Is the leverage value related to the outcome Y?

'11-1«. QE'0ef(~e. &e',C'f'(f'; ;.uC-.s OUTlien.,S 1!0 "h<Z:..., X Spc..C(?

1 .y~::t::.T IS Ot•.Ai ,<\ -1v ~ C-, I (;'0 O·~-r~c:.x:..J / {\UT T~ e.

(g) What is Cook's distance used for?, . r::: ::Dt:\L o.'3SE.RVAI,::r-OjA,J~.S".'Ie D BT "cR(')XVJ t=: i.\j~tU',_tJT

Page 3: SOLvT+-~people.math.umass.edu/~johnpb/s505/final12s.pdf · ST505/679R: Fall 20~2SECOND EXAM: PART II, Open book, notes, etc. Set-up means WITH ALL NUMBERS! BUT NO NEED TO CALCULATE

ST505/679R: Fall 20~2SECOND EXAM: PART II, Open book, notes, etc.

Set-up means WITH ALL NUMBERS! BUT NO NEED TO CALCULATE OUT. THE ONLYSELECTION IS FOR TABLE VALUES WHICH YOU CAN LEAVE SYMBOLIC BUT THEREMUST BE NUMBERS FOR THE DEGREES OF FREEDOM INVOLVED.

1. This problem returns to the Fat example introduced in the closed book portion. See the output. Assume theEi are uncorrelated and normally distributed with mean 0 and variance (12.

:r-'" OJ))rv"j a) Set-up how by simply adding two numbers in the output you can find the standard error associated withGflCl()~ getting prediction interval at skin = 19.5 and thigh = 43.1 (which are the values for the first case in the data).

"Ji-l'S . E0zr.:=: -: rMSr;z: + .,6.'2.~~ \::. S G,i.j~ .+ /. II..{S1,.J(.e G..KJ11C.,J ...-. '- ~ ~

Sf'll..l $ i'r t.:l a..J,l;""ft+'-< TO b) Suppo~e we wanted simultaneous 90% pre~iction intervals for body fat at 5 different skin/thigh combinations.

'{<JQI10vve- The predictions intervals will be of the form Y ±mult*SEpred. Describe what the multiplier is for the Bonferroniand Scheffe methods and state how you would decide which is better.

-t(I-'~~) j;) <Bel~·tcrt ~ 1'\ oS Jf\ C\ lL 8?

h Vl:, "P) ic fl.

c) Consider estimating p,(XI, X2) = E(YIXI, X2) for a value Xl for skin and X2 for thigh.

- Set-up how you would get an estimate of p,(XI, X2), call this j.l(XI, X2). Your answer should involve Xl and

X2 and numbers, _ 'C;1.17tt + ,7- 22 ''')('1 .""t-, & fCi<t Y.7, ::- ,2A.(<'iJ

)(l.)

- Set-up how you would get an estimate of the standard error of j.l(XI, X2). Your answer can be in a formusing a matrix with numbers and a vector, which could involve numbers and possibly Xl and X2.

~4,q\.Ji

~ "2..1.)

- Using j.l from above and it's estimated standard error, set-up how you would calculate simultaneous 95%confidence intervals for p,(X1, X2) over all values of Xl and X2.

d) There was a third variable,X3' which was a midarm measurement. All you are told is that the SSE for thefit with all three variables is 98.4. Set-up how to carry out a test of size .10 of Ho : (33= 0, where (33 is thecoefficient for X3 in the model with all three variables. Set-up the test statistic (all numbers) and state yourdecision rule in terms of comparing your test statistic to a table value (specified in as much detail as possible).

SS<5U2J -= Idl.CtS' :: 17 (2.53)'- Fnw.. 4<.

~sE(f):: ~ ~SS~~f)\0 h-f>

SSCCf)= 9 i,~

~ _ SS'e((l.)- 5~ (f)

fiSt (~)QejCc1" Ho \~ f? t= ( q6, \; ~" )

17= n-3n::.2o

1'16D(;L VJ 1'"Il,

AOP\l;Q.J~L.)(~ Yl'l.5

p=lf

Page 4: SOLvT+-~people.math.umass.edu/~johnpb/s505/final12s.pdf · ST505/679R: Fall 20~2SECOND EXAM: PART II, Open book, notes, etc. Set-up means WITH ALL NUMBERS! BUT NO NEED TO CALCULATE

D Jv-{ Ccc;(c ;vCceJSAf(~1 TviN rt'~ )( \:: 00.> f I ~ z.. .; DOSE.1.- ().,.d.. 2 t; V 11f(:fE 1'1 - I

!"?U.Y\ 0-1"-"il-t.l3 \>Q{;()l~'" is r;\.t, H- LA lu. tfW ~2. There is a data file called yield,dat from a study on a 0 yie s or two vane 1es over ifferent doses of

phosphorous (other nutrients held fixed). The file has 30 observations including variety (given values of 1and 2), dose and yield, in that order, separated by spaces with no missing values. Consider a model wherefor variety j ( = 1 or 2) with X = dose, E(YIX) = (3jO + (3j1X + (3j2X2. This allows a separate quadraticregression for each variety. Assume the variance is constant throughout.

(b) Provide any additional code needed to run a regression that also has six coefficients but where three ofthem are estimates of (310- (320,(311- (321,and (312- (322. Indicate which coefficients in the output wouldbe estimating these differences. (If you need any additions to the data step beyond what you gave in i)then give them also.)

02<- DOS~ "'2 .t~(~iCLt!\A .~ ~4" ~<av + 02-+.if~\ tc 005£) +

. I :t{;z-\+OZJ).,. ---

l \::(11+\lAa.,,'r1! ~ l

':. t i-\-V Pv\ \(;1 ~ Z.

('I"'~C ~ee~rt'I otP fl,t 't:t.~lO ':. -l \ 2 Z [) t I

t>~l.01 ~ \ 02.11./ n Q i'It j

~IO ~Plo ::.C"c!·H I'(t. ••rr 0.J-

'.(311- ~1\ -:. \.

~I'Z.- ~t1. ~ \.

® ?rex: te'()~(Y'l 0&2.e .Q. '/ :I.~L l) ~ -t- \D2. O-el OZe\~

(c) Provide any additional code to test the hypothesis that the linear and quadratic terms are the same foreach variety; i.e. the expected value for an observation from variety j is (3jO+ (31X + (32X2.

10)-t<.'~•...•tJ~~<.- ...QiV'o ('(;[~Ll) '- 0 OSt:..'\- D 2. ) S.as \,).s~""O ~r"CI (t-eb i.l'" ~\.y 1_ J"'ti..., <) ~

o.I\OIlIiLCre.~f)\J~0.J "l''OCAK) te~i:' O:&I"'-0/lJ . - ,;-

't'C5(;..Ii ~s-o- .Q,.,... i•...•e l "t~Qr a.') 0 12. b)

What degrees of freedom will be associated with the resulting test? Give numbers.

\')::~O d.~. ti-+ ~vLL ""lIc.leQ.... ~ 30 -" :: 2 Lf \.>oj6l~~ \-\0$5~

dJ.u-\- I")vLL ('ucHt S1~(~ :?()-~:L"

~ SJA''Ti:> N.

'" ~('2i~It)d.€~~60·tz. Ci ••••,,( c. '-'I

-\ rLi eJ,;.",

Page 5: SOLvT+-~people.math.umass.edu/~johnpb/s505/final12s.pdf · ST505/679R: Fall 20~2SECOND EXAM: PART II, Open book, notes, etc. Set-up means WITH ALL NUMBERS! BUT NO NEED TO CALCULATE

3. The second part of the output gives results from workin 'th h P . .has an outcome Y and four predictors. The out ut shows

gfi~1 t e uffin. data, used. earlIer m class. This

variables, etc.) Use this to build a mod 1 . ~. . from all possIble regressIOns (one variable, twofinal model is . Use a p-value of 15 fo : UtSI~gs epwIse s:lectIO~. Explain each step clearly and what the

. r n enng or removmg vanables from the model.

S-;cp l; S1lJ0'1 f"v jl'h tvOT'-1 i""d' (0,,5 Idlelt. p-Vu.~ves ~<L

~G~ \J c.m v..-se e ~ i 1Tj( L+: ~(rfh '><.$ u.;vcl 'x~ \"AVc..

P-Vt)Lv(J <- ~ Duol, ')(y hl\.5 SM 4..LLefl p- V4lve S LvC<i:

f-r h~5 hfl~ljL ltl vCtlve. (3"fJi~t1 'X"t.

$"fF.,...f' 2.: Cv-v3vOVL etAC~ of )('/')(2..- O/t )(3 W H'" ~y .\;VI>\-'

P-vl\\'\JC5 0+ ,lI(;7S" ,6GI~ uoJP.. .ll)q fleJpeCiG'-JC'Qt.). ~...J'tdt x..~S' jlV( e. \''- ~A:\ S f)1.\\.(e.sT p...\iALV e.- a.l'o-l a \S <.. \S.

~OW Nee& 'TD eo"",S\cQ0l ?o5..s '\ ~lE (lr::1Jov4l 0+ X~O~(e.. Y-.-c l5 110 '" oDGL Cs I~(e ~fL0 C~.()UQ.E :L~

Sl'Ef [,Ji S ~ f'JOT \='ULi".Jf)l)n). 9-vALve l S vow S::7J[ L c. . oC/v I So

\(~Sp )( Lf ,

Sw..-p .:1 Co NoS .J..Df r<.. e 'V'1(!r2 : v~ e" ,"r~eJl )( t D It XJWii'l '/..2.. o.l'-eP-- XLI. P _JAlvCJ Aj)(2- • fre,41 Q.vc.e ,1Cfh.)-

rlespeCTN( .Q. tJ . 1)0!\.J aT ev Tt" tL € H"~Q/L S111f"