Question

In: Statistics and Probability

Use the appropriate test to determine whether X1 can be dropped from the regression model given...

Use the appropriate test to determine whether X1 can be dropped from the regression model given that X2 is retained. Use level of significance 0.05. Find the value of appropriate test statistic, the critical vale and the P-value. Plese show me how to use R to solve this.

  1. 0.1537; 4.6679; 0.7014
  2. 0.1537; 4.3245; 0.6523
  3. 1.537; 4.6932; 0.4128
  4. 2.5632; 4.6679; 0.3128

X1   X2   Y
190   130   35
176   174   81.7
205   134   42.5
210   191   98.3
230   165   52.7
192   194   82
220   143   34.5
235   186   95.4
240   139   56.7
230   188   84.4
200   175   94.3
218   156   44.3
220   190   83.3
210   178   91.4
208   132   43.5
225   148   51.7

Solutions

Expert Solution

After loading our date into R with the name of Test;

> Test <- Regression...Sheet1
> linearMod <- lm(Y ~ ., data=Test) # build linear regression model on full data
> print(linearMod)

Call:
lm(formula = Y ~ ., data = Test)

Coefficients:
(Intercept) X1 X2
-67.88436 -0.06419 0.90609

> summary(linearMod)

Call:
lm(formula = Y ~ ., data = Test)

Residuals:
Min 1Q Median 3Q Max
-15.172 -8.404 1.026 7.410 16.457

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -67.88436 40.58652 -1.673 0.118
X1 -0.06419 0.16391 -0.392 0.702
X2 0.90609 0.12337 7.344 5.63e-06 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 11.2 on 13 degrees of freedom
Multiple R-squared: 0.8064,   Adjusted R-squared: 0.7766
F-statistic: 27.07 on 2 and 13 DF, p-value: 2.319e-05

Further breaking the components individually;

> modelCoeffs <- modelSummary$coefficients # model coefficients
> modelCoeffs
Estimate Std. Error t value Pr(>|t|)
(Intercept) -67.88435970 40.5865217 -1.6725838 1.182893e-01
X1 -0.06418911 0.1639142 -0.3916018 7.016961e-01
X2 0.90608862 0.1233709 7.3444291 5.628708e-06
> beta.estimate <- modelCoeffs["X1", "Estimate"] # get beta estimate for X1
> beta.estimate
[1] -0.06418911
> std.error <- modelCoeffs["X1", "Std. Error"] # get std.error for X1
> std.error
[1] 0.1639142
> t_value <- beta.estimate/std.error # calc t statistic
> t_value
[1] -0.3916018
> p_value <- 2*pt(-abs(t_value), df=nrow(Test)-ncol(Test)) # calc p Value
> p_value
[1] 0.7016961
> f_statistic <- linearMod$fstatistic[1] # fstatistic
> f_statistic
NULL
> f <- summary(linearMod)$fstatistic # parameters for model p-value calc
> f
value numdf dendf
27.07029 2.00000 13.00000
> model_p <- pf(f[1], f[2], f[3], lower=FALSE)
> model_p
value
2.318617e-05
>

As we can see the p-value is high for X1 and low value for t-statistic hence we can drop X1. Keeping variables that are not statistically significant can reduce the model’s precision.


Related Solutions

Using the data, fit an appropriate regression model to determine whether time spent studying (hours) is...
Using the data, fit an appropriate regression model to determine whether time spent studying (hours) is a useful predictor of the chance of passing the exam (result, 0=fail 1=pass). Formally assess the overall fit of the model. DATA three; INPUT result hours; /* result=0 is fail; result=1 is pass */ cards; 0 0.8 0 1.6 0 1.4 1 2.3 1 1.4 1 3.2 0 0.3 1 1.7 0 1.8 1 2.7 0 0.6 0 1.1 1 2.1 1 2.8 1...
Given the simple regression model Y= βo+ β1X and the regression results that​ follow, test the...
Given the simple regression model Y= βo+ β1X and the regression results that​ follow, test the null hypothesis that the slope coefficient is 0 versus the alternative hypothesis of greater than zero using probability of Type I error equal to 0.01 , and determine the​ two-sided 90​% and 99​% confidence intervals. a. A random sample of size = 40 with b1 = 55 and sb1 =1.1 b. A random sample of size n = 47 with b1= 5.3 and sb1=...
Given the simple regression model Y= βo+ β1X and the regression results that​ follow, test the...
Given the simple regression model Y= βo+ β1X and the regression results that​ follow, test the null hypothesis that the slope coefficient is 0 versus the alternative hypothesis of greater than zero using probability of Type I error equal to 0.10 , and determine the​ two-sided 95% and 99​% confidence intervals. a. A random sample of size = 36 with b1 = 7 and sb1 =1.7 b. A random sample of size n = 50 with b1= 7.3and sb1= 1.7...
The test scores dropped in 2009. Design and run a hypothesis test to determine if the...
The test scores dropped in 2009. Design and run a hypothesis test to determine if the decline represented a statistically significant decrease in the mean test score. Be sure to explain how you plan set up the test. You will need to decide what you will use as your population. Be sure to explain the result and implications of the hypothesis test. Test Data can be found here: https://docs.google.com/spreadsheets/d/e/2PACX-1vSdSY0cbi4CdW1509-B3HVVGL1t8AieqCPw8nroXMXup8q1Rll3huy8qiCzMphB-DsCOlJ6fNsxlzUO/pubhtml
Using the data, determine whether the model using (x1, x2, x3, x4) to predict y is...
Using the data, determine whether the model using (x1, x2, x3, x4) to predict y is sufficient, or should some or all other predictors be considered? Write the full and reduced models, and then perform the test. Show your work and state your conclusion, but you do not need to specify your hypothesis statements. y 60323 61122 60171 61187 63221 63639 64989 63761 66019 67857 68169 66513 68655 69564 69331 70551 x1 83 88.5 88.2 89.5 96.2 98.1 99 100...
Use the Integral Test to determine whether the infinite series is convergent. Sum from n=1 to...
Use the Integral Test to determine whether the infinite series is convergent. Sum from n=1 to infinity of 5/(n(n+1))
Suppose you will use a simple regression model to test the hypothesis H0 : beta1 =...
Suppose you will use a simple regression model to test the hypothesis H0 : beta1 = 0 H1 : beta1 not equal to 0 when the sample size is 25, SST = 128,000, and the correlation between X and Y is 0.69. Find F test statistics.?
a. Use an appropriate test to evaluate whether position in the batting order and bat speed...
a. Use an appropriate test to evaluate whether position in the batting order and bat speed contribute to the number of home runs (HR) hit per season. Keep in mind that we would like to be able to make inferences about the influence of bat speed across the entire range observed within Major League Baseball, not just the random bat speeds that we tested. b. Make a single plot of the mean responses at each level of both factors and...
Using this model: propose a single model with which you can test whether: (a) the relationship...
Using this model: propose a single model with which you can test whether: (a) the relationship between population(POP) and CO2 emissions is nonlinear and quadratic; (b) the relationship between income(GNI) and CO2 emissions is nonlinear and quadratic; (c) the impacts of population and income(GNI) on CO2 emissions are different in different years; and (d) the impact of population(POP) on CO2 emissions is different at higher than at lower income levels. What does your model look like? (Hint: You will have...
In a simple linear regression model, the ANOVA F test is a test of model significance...
In a simple linear regression model, the ANOVA F test is a test of model significance (i.e. a test of whether the linear regression model is significantly better than the trivial model yi = β0 + εi). This test can be performed in another way (i.e. by the 'extra sum of squares' or ESS method considering the simple linear regression model as the 'full model' and the trivial model yi = β0 + εi as the 'reduced model'). There is...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT