For observed data y=(y1,…,yn)y=(y1,…,yn) with n=21n=21, the above linear regression model was fitted in R, with the following output: >n = 21 >xi = seq(0, n-1,1)/(n-1) >p1 =2*xi-1 >p2 =6*xi^2- 6*xi+1-1/(n-1) > summary(lm(y ~ p1+p2)) Call: lm(formula = y ~ p1 + p2) Residuals: Min 1Q Median 3Q Max -0.5258 -0.2153 0.0813 0.1770 0.4669 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -0.004238 0.063450 -0.067 0.947 p1 1.181260 0.104784 11.273 1.37e-09 *** p2 -0.953388 0.129422 -7.366 7.77e-07 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.2908 on 18 degrees of freedom Multiple R-squared: 0.9097, Adjusted R-squared: 0.8997 F-statistic: 90.68 on 2 and 18 DF, p-value: 3.989e-10 Write this linear regression model in the vector form and answer the following questions, using the above R output where necessary.
For observed data y=(y1,…,yn)y=(y1,…,yn) with n=21n=21, the above linear regression model was fitted in R, with the following output:
>n = 21
>xi = seq(0, n-1,1)/(n-1)
>p1 =2*xi-1
>p2 =6*xi^2- 6*xi+1-1/(n-1)
> summary(lm(y ~ p1+p2))
Call:
lm(formula = y ~ p1 + p2)
Residuals:
Min 1Q Median 3Q Max
-0.5258 -0.2153 0.0813 0.1770 0.4669
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.004238 0.063450 -0.067 0.947
p1 1.181260 0.104784 11.273 1.37e-09 ***
p2 -0.953388 0.129422 -7.366 7.77e-07 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.2908 on 18 degrees of freedom
Multiple R-squared: 0.9097, Adjusted R-squared: 0.8997
F-statistic: 90.68 on 2 and 18 DF, p-value: 3.989e-10
Write this linear regression model in the
Step by step
Solved in 4 steps with 3 images