DOC PREVIEW
FSU STA 5167 - STA 5167 Homework

This preview shows page 1-2 out of 7 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 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 7 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Jaime FradeStat Apps 2: HW3Problem 3.13.1.1WT2 HT2 WT9 HT9 LG9 ST9 SomaWT2 1.0000000 0.64454954 0.6925390 0.6071247 0.6164399 0.4515812 0.27151816HT2 0.6445495 1.00000000 0.5229277 0.7383562 0.4687710 0.3617241 0.03978899WT9 0.6925390 0.52292768 1.0000000 0.7276123 0.9044433 0.4530041 0.61807611HT9 0.6071247 0.73835617 0.7276123 1.0000000 0.5981001 0.6033681 0.27396202LG9 0.6164399 0.46877101 0.9044433 0.5981001 1.0000000 0.4129353 0.57944119ST9 0.4515812 0.36172415 0.4530041 0.6033681 0.4129353 1.0000000 0.08867531Soma 0.2715182 0.03978899 0.6180761 0.2739620 0.5794412 0.0886753 1.00000000Comment:Appears to be an positive correlation in most of the graphs. In almost all of graphs exist positive correlated.CODE: (R-Code)install.packages("alr3")library(alr3)data(BGSgirls)attributes(BGSgirls)attach(BGSgirls)plot(BGSgirls)x = data.frame(WT2,HT2, WT9, HT9, LG9, ST9,Soma)cor(x)Jaime FradeStat Apps 2: HW3Problem 3.1Problem 3.1.2Jaime FradeStat Apps 2: HW3Problem 3.1Call:lm(formula = Soma ~ WT9, data = BGSgirls)Residuals: Min 1Q Median 3Q Max -1.62809 -0.37394 -0.03102 0.37507 1.38508 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 2.07405 0.42406 4.891 6.45e-06 ***WT9 0.08553 0.01319 6.483 1.19e-08 ***---Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.6382 on 68 degrees of freedomMultiple R-Squared: 0.382, Adjusted R-squared: 0.3729 F-statistic: 42.04 on 1 and 68 DF, p-value: 1.193e-08Call:lm(formula = Soma ~ LG9, data = BGSgirls)Residuals: Min 1Q Median 3Q Max -1.5621 -0.4001 -0.0240 0.3459 1.6139 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -0.52661 0.90835 -0.580 0.564 LG9 0.19059 0.03251 5.863 1.47e-07 ***---Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.6617 on 68 degrees of freedomMultiple R-Squared: 0.3358, Adjusted R-squared: 0.326 F-statistic: 34.37 on 1 and 68 DF, p-value: 1.475e-07Call:lm(formula = LG9 ~ WT9, data = BGSgirls)Residuals: Min 1Q Median 3Q Max -2.10742 -0.65736 0.06522 0.64682 3.40703 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 15.80360 0.69962 22.59 <2e-16 ***WT9 0.38051 0.02176 17.48 <2e-16 ***---Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.053 on 68 degrees of freedomMultiple R-Squared: 0.818, Adjusted R-squared: 0.8153 F-statistic: 305.7 on 1 and 68 DF, p-value: < 2.2e-16Call:lm(formula = resid_fit1 ~ resid_fit3)Residuals: Min 1Q Median 3Q Max -1.57125 -0.38297 -0.03819 0.36787 1.36617 Coefficients: Estimate Std. Error t value Pr(>|t|)(Intercept) 8.077e-18 7.614e-02 1.06e-16 1.000resid_fit3 3.692e-02 7.337e-02 0.503 0.616Residual standard error: 0.637 on 68 degrees of freedomMultiple R-Squared: 0.00371, Adjusted R-squared: -0.01094 F-statistic: 0.2532 on 1 and 68 DF, p-value: 0.6164Jaime FradeStat Apps 2: HW3Problem 3.1CommentThe graphs illustrate a positive relationship on Soma with either WT9 or LG9 as predictor. There is also a positive relationship between WT9 and LG9. The added variable shows little improvement in estimating Soma by adding LG9 after we control for Wt9. The relationship in the second plot is weaker than the added variable plot. The total total explained variability is less than the additive amount.CODE: (R-Code)par(mfrow=c(2,2))fit1 = lm(Soma~WT9, data=BGSgirls)plot(Soma~WT9, data=BGSgirls)abline(fit1) fit2 = lm(Soma~LG9, data=BGSgirls) plot(Soma~LG9, data=BGSgirls) abline(fit2)fit3 = lm(LG9~WT9, data=BGSgirls)plot(LG9~WT9, data=BGSgirls)abline(fit3) resid_fit1 = fit1$resid resid_fit3= fit3$residplot(resid_fit1~resid_fit3)resid_fit = lm(resid_fit1~resid_fit3)abline(resid_fit)Problem 3.1.3Call:lm(formula = Soma ~ HT2 + WT2 + HT9 + WT9 + ST9, data = BGSgirls)Residuals: Min 1Q Median 3Q Max -2.03132 -0.34062 0.01917 0.43939 0.97266 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 8.8590417 2.3764431 3.728 0.000411 ***HT2 -0.0792535 0.0354034 -2.239 0.028668 * WT2 -0.0409358 0.0754343 -0.543 0.589244Jaime FradeStat Apps 2: HW3Problem 3.1HT9 -0.0009613 0.0260735 -0.037 0.970704 WT9 0.1280506 0.0203544 6.291 3.2e-08 ***ST9 -0.0092629 0.0060130 -1.540 0.128373 ---Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.5791 on 64 degrees of freedomMultiple R-squared: 0.5211, Adjusted R-squared: 0.4837 F-statistic: 13.93 on 5 and 64 DF, p-value: 3.309e-09 H0: β = 0 Ha: β ≠ 0σ2 = 0.3353 R2 = 0.5211 F5,64= 13.93 p-value< 0.001For each βj, the t-statistic is calculated above byt = (bhat - 0)/(se(bhat))CODE: (R-Code) soma_fit1= lm(Soma~HT2 + WT2 + HT9 + WT9 + ST9, data=BGSgirls)summary(soma_fit1)Problem 3.1.4Analysis of Variance TableResponse: Soma Df Sum Sq Mean Sq F value Pr(>F) HT2 1 0.0710 0.0710 0.2116 0.6470887 WT2 1 4.6349 4.6349 13.8212 0.0004252 ***HT9 1 3.7792 3.7792 11.2695 0.0013299 ** WT9 1 14.0746 14.0746 41.9700 1.516e-08 ***ST9 1 0.7958 0.7958 2.3731 0.1283728 Residuals 64 21.4623 0.3353 ---Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 H0: βj = 0 Ha: βj ≠ 0Jaime FradeStat Apps 2: HW3Problem 3.1Comments:From the table above, HT2 and ST9 are not significant, p-value> 0.05. Also, other variable are significant with α = 0.05.CODE: (R-Code)anova_soma = anova(soma_fit1)anova_somaProblem 3.1.5Analysis of Variance TableResponse: Soma Df Sum Sq Mean Sq F value Pr(>F) ST9 1 0.3524 0.3524 1.0509 0.30916 WT9 1 18.8328 18.8328 56.1587 2.516e-10 ***HT9 1 1.4375 1.4375 4.2867 0.04245 * WT2 1 1.0523 1.0523 3.1379 0.08125 . HT2 1 1.6805 1.6805 5.0112 0.02867 * Residuals 64 21.4623 0.3353 ---Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1Jaime FradeStat Apps 2: HW3Problem 3.1Comment:The values obtained in the


View Full Document

FSU STA 5167 - STA 5167 Homework

Documents in this Course
Load more
Download STA 5167 Homework
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 STA 5167 Homework 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 STA 5167 Homework 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?