DOC PREVIEW
UNL STAT 870 - Final exam formulas and R functions

This preview shows page 1-2-3-4 out of 12 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Final exam formulas and R functionsSTAT 870Fall 2012Chapter 1-Yi = -o + -1Xi+ -i where -i ~ independent N(0,-2)-i 0 1 iˆY b b X= + where ( ) ( )( ) ( )n n nni i i ii ii 1 i 1 i 1i 11n 2n n22ii ii 1i 1 i 11X Y X Y(X X)(Y Y)nb1(X X)X Xn= = ==== =-- - � � ��= =-�-� � and b0 = Y - b1X-ei = Yi – iˆY-SSE = n2i ii 1ˆ(Y Y)=-�- E(W1 + c) = E(W1) + c - E(cW1) = c-E(W1)- E(bW1 + c) = b-E(W1) + c- E(W1 + W2) = E(W1) + E(W2)- E(W1-W2) ≠ E(W1)-E(W2) – equality occurs when W1 and W2 are independent-SSEMSEn 2=-Chapter 2-b1~N(-1,2 2(X X)s -�)-2i i i iVar( a Y ) a Var(Y )=� �-n21 ii 1Var(b ) MSE (X X)�== -�-1 1 1t (b ) Var(b )�*= - b and use a t(n-2) distribution-1 1b t(1 / 2;n 2) * Var(b )�� - a --220 02i1 Xb ~ N ,n (X X)� �� �b s +� �� �� �-�� �� �-h hˆ ˆY t(1 / 2;n 2) Var(Y )�� - a - where 2hh2i1 (X X)ˆVar(Y ) MSEn (X X)�� �-= +� �-�� �-h h(new) hˆ ˆY t(1 / 2;n 2) Var(Y Y )�� - a - - where 2hh(new ) h2i1 (X X)ˆVar(Y Y ) MSE 1n (X X)�� �-- = + +� �-�� �-h h(new) hˆ ˆY t(1 / 2;n 2) Var(Y Y )�� - a - - for mh(new ) j,h(new )j 11Y Ym==� where2hh(new ) h2i1 1 (X X)ˆVar(Y Y ) MSEm n (X X)�� �-- = + +� �-�� �-SSTO = n2ii 1(Y Y)=-�1-SSR = n2ii 1ˆ(Y Y)=-�-SSTO = SSE + SSR-MSR = SSR/1 = SSR when there is -0 and -1 in the regression model-MSRFMSE*= and use a F(1, n-2) distribution -2SSR SSTO SSERSSTO SSTO-= =Chapter 3-iieeMSE*=-( )0 1 i iiY Xl=b +b +e where ( )eY 0Ylog (Y) 0ll�l �=�l =�-di1=|ei1-1e%| and di2=|ei2-2e%|, median residual values are 1e% and 2e%, 1 2L1 2d dt1 1sn n*-=+ and use a t(n-2) distribution, 2 2i1 1 i2 22(d d ) (d d )sn 2- + -� �=--2i 0 1 ilog( ) Xs =g +g, ( )2BP2SSR 2XSSE n*= and use a -2 distribution with 1 degree of freedomChapter 4-0 0b t(1 / 4;n 2) * Var(b )�� - a -, 1 1b t(1 / 4;n 2) * Var(b )�� - a - -h hˆ ˆY t 1 ;n 2 Var(Y )2g�� �a� - -� �� �-h h(new )ˆ ˆY t 1 ;n 2 Var(Y )2g�� �a� - -� �� �-h(new ) 0h(new )1Y bˆXb-=-h(new ) h(new )ˆ ˆX t(1 / 2,n 2) Var(X )�� - a - where 2h(new )h(new )2 21 iˆMSE 1 (X X)ˆVar(X ) 1b n (X X)�� �-= + +� �-�� �Chapter 5-Cov(Z1,Z2) = E[(Z1--1)(Z2--2)]-1 21 21 2Cov(Z ,Z )Corr(Z , Z )Var(Z ) Var(Z )= and Cov(Z) = 1 1 21 2 2Var(Z ) Cov(Z ,Z )Cov(Z , Z ) Var(Z )� �� �� �-E( )= +Y Y e where E( ) =Y Xb2-Let W = AY where Y is a random vector and A is a matrix of constants. Then E(A) = A, E(W) = AE(Y), and Cov(W) = ACov(Y)A- -1( )-� �=b X X X Y -1ˆ( ) '-�= = =Y Xb X X X X YΗY where H=X(X-X)-1X--( )= -e Y I H-1SSTOn� �= -Y Y Y JY, SSE�=e e, 1SSRn�� �= -b X Y Y JY-2 1Cov( ) ( )-�=sb X X-�1h h hˆVar(Y ) MSE( ( ) )-� �= X X X X-�1h(new ) h h hˆVar(Y Y ) MSE(1 ( ) )-� �- = +X X X XChapter 6-�k kkbtVar(b )*- b= and use a t(n-p) distribution-MSR = SSR/(p-1)-MSE = SSE/(n-p)-F* = MSR/MSE and use a F(p-1, n-p) distribution-2 2an 1R 1 (1 R )n p-= - --Chapter 7-SSR(X2|X1) = SSE(X1) - SSE(X1,X2) -( )1 g 1 g g 1 p 1g 1 p 1 1 g1 g g 1 p 1 1 g g 1 p 1SSE(X ,..., X ) SSE(X ,..., X , X ,..., X ) (p 1 g)MSR(X ,..., X | X ,..., X )FSSE(X ,..., X , X ,..., X ) (n p) MSE(X ,..., X , X ,..., X )+ -+ -*+ - + -- - -= =- and usea F(p-1-g, n-p) distribution-3 1 2 1 2 1 2 32Y3|121 2 1 2SSR(X | X , X ) SSE(X , X ) SSE(X , X , X )RSSE(X , X ) SSE(X , X )-= =Chapter 8-Second order model for two predictor variables: E(Yi) = -0 + -1Zi1 + -2Zi2 + -3Zi1Zi2 + -42i1Z + -52i2ZChapter 9-1 p-1p1 P-1SSE(X ,..., X )C (n 2p)MSE(X ,..., X ) = - --AICp = n-log(SSEp) – n-log(n) + 2p-SBCp = n-log(SSEp) – n-log(n) + log(n)-p-2n ni i2p i i(i)2i 1 i 1iˆ(Y Y )ˆPRESS (Y Y )(1 h )= =-= - =� �-3Chapter 10-i iiiiie erMSE(1 h )Var(e )�= =- and ri~t(n-p)-di = Yi - i(i)ˆY-ii1(i) i (i) (i) idtMSE (1 ( ) )-=� �+X X X X1/2i2ii in p 1eSSE(1 h ) e� �- -=� �- -� � and ti~t(n-p-1)-Hat matrix diagonal values criteria: hii > 2p/n; hii > 0.5 indicates very high, 0.2<hii-0.5 indicate moderate-i i(i)i(i) iiˆ ˆY Y(DFFITS)MSE h-=1/2iiiiiht1 h� �=� �-� � with |(DFFITS)i|>1 for “small to medium” sized data sets and |(DFFITS)i|>2 p / n for “large” data sets as a criteria-n2j j(i)j 1iˆ ˆ(Y Y )DpMSE=-�=2i ii2iie hpMSE(1 h )� �=� �-� � and Di>F(0.50, p, n-p) as a criteria-k k(i)k(i)(i) kkb b(DFBETAS)MSE c-= with |k(i)(DFBETAS)|>1 for “small to medium” sized data sets and |k(i)(DFBETAS)|>2 / n for “large” data sets as a criteria-(VIF)k = 2 1k(1 R )-- with (VIF)k>10 as a criteria Chapter 11-1w( )-� �=b X WX X WY with 2112222nnw 0 01/ 0 00 w 00 1/ 00 0 w0 0 1/� �s� �� �� �s� �� �= =� �� �� �� �s� �� �WLLLLM M O MM M O MLL-1wCov( ) ( )-�=b X WX-1/22 2i1 h1 i2 h2i1 2(X X ) (X X )dS S� �- -= +� �� � for two predictor variables-33i q i qii q1 (d / d ) d dw0 d d�� �- <�� �=����4Test #1 R part:Syntax Descriptionlm(formula = y ~ x, data = data.frame) Find the sample regression model (and various other measures) with the response variable y and predictor variable xsummary(mod.fit) Summarizes information in mod.fitpredict(object = mod.fit, newdata = data.frame, interval = “confidence”, se.fit = TRUE, level = 1-alpha)Predicts the response variable at the predictor variable values in the data.frame using model information in mod.fit. The data.frame needs to have the same predictor variable as the original data set specified in mod.fit. The standard errors produced are hˆVar(Y )�. A confidence interval is produced through the interval option. Prediction intervals are produced by changing “confidence” to“prediction”. The level option specifies the confidence level. anova(mod.fit) Finds the ANOVA table using information in an object called mod.fitboxcox(object = mod.fit, lambda = seq(from = -2, to = 2, by = 0.01))Finds ˆl for the Box-Cox transformation by looking in a region between -2 and 2ifelse(test = condition to test, yes = yes value, …


View Full Document

UNL STAT 870 - Final exam formulas and R functions

Download Final exam formulas and R functions
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Final exam formulas and R functions and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Final exam formulas and R functions 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?