Question

In: Statistics and Probability

Please use R to solve this with explanation Consider the simple linear trend model. This model...

Please use R to solve this with explanation

Consider the simple linear trend model. This model relates quarterly sales (y) to time period (t).

a. Compute the residuals and plot them versus time.

b. Does the plot suggest that the error terms are autocorrelated? Explain.

c. Calculate the Durbin-Watson statistic.

d. Test for positive (first-order) autocorrelation = .05.

t

Sales

1

21.74

2

26.41

3

26.44

4

26.40

5

23.91

6

27.06

7

26.63

8

26.98

9

28.26

10

27.87

11

28.40

12

30.16

13

32.61

14

30.33

15

30.18

16

33.33

Solutions

Expert Solution

code for question number a and b are -

x=c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16)
y=c(21.74,26.41,26.44,26.4,23.91,27.06,26.63,26.98,28.26,27.87,28.4,30.16,32.61,30.33,30.18,33.33)
l1=lm(y~x)
summary(l1)
t=resid(l1)
plot(x,t,abline(h=0))

output is-

Residuals:
Min 1Q Median 3Q Max
-2.0690 -0.8871 -0.1972 1.0447 2.1958

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 23.20700 0.73344 31.641 2.00e-14 ***
x 0.55440 0.07585 7.309 3.86e-06 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 1.399 on 14 degrees of freedom
Multiple R-squared: 0.7924,   Adjusted R-squared: 0.7775
F-statistic: 53.42 on 1 and 14 DF, p-value: 3.855e-06

from residual plot we can see that there is no presence of autocorrelation is here.

  


Related Solutions

Explain the Difference between a simple trend model and a causal model
Explain the Difference between a simple trend model and a causal model
Consider the following transportation problem. Formulate this problem as a linear programming model and solve it...
Consider the following transportation problem. Formulate this problem as a linear programming model and solve it using the MS Excel Solver tool. Shipment Costs ($), Supply, and Demand: Destinations Sources 1 2 3 Supply A 6 9 100 130 B 12 3 5 70 C 4 8 11 100 Demand 80 110 60 (4 points) Volume Shipped from Source A __________ (4 points) Volume Shipped from Source B __________ (4 points) Volume Shipped from Source C __________ (3 points) Minimum...
Consider a simple linear model Yi = β1 + β2Xi + ui . Suppose that we...
Consider a simple linear model Yi = β1 + β2Xi + ui . Suppose that we have a sample with 50 observations and run OLS regression to get the estimates for β1 and β2. We get βˆ 2 = 3.5, P N i=1 (Xi − X¯) 2 = 175, T SS = 560 (total sum of squares), and RSS = 340 (residual sum of squares). 1. [2 points] What is the standard error of βˆ 2? 2. [4 points] Test...
Use Excel to estimate a simple linear regression model for the following data (Y is a...
Use Excel to estimate a simple linear regression model for the following data (Y is a dependent variable and X is an independent variable): Y X 0 -2 0 -1 1 0 1 1 3 2 Fill in Multiple Blanks: What is the slope of the estimated line?  In your answer, show one (1) digit to the right of the decimal point, for example, 1.0, 1.2. Apply the appropriate rounding rule if necessary. What is the Y-intercept?
Consider the general linear model ? = ?? + ?. Use matrix algebra to show that...
Consider the general linear model ? = ?? + ?. Use matrix algebra to show that ?̂ is an unbiased estimator of ?. the last ? has bar
(Regression Analysis) Consider the simple linear regression model (I) and the corresponding scatter plot with the...
(Regression Analysis) Consider the simple linear regression model (I) and the corresponding scatter plot with the covariates XX (x-axis) vs residuals (y-axis). What model assumption violations can be diagnosed by this scatter plot?
Consider the simple linear regression model for which the population regression equation can be written in...
Consider the simple linear regression model for which the population regression equation can be written in conventional notation as: yi= βxi+ui as 1- Derive the Ordinary Least Squares estimator (OLS) of β (i.e. ˆβ) include in your answer details of the proof. 2- Give an interpretation of ˆβ
Consider the simple linear regression model for which the population regression equation can be written in...
Consider the simple linear regression model for which the population regression equation can be written in conventional notation as: yi= βxi+ui as 1- Derive the Ordinary Least Squares estimator (OLS) of β0 (i.e. ˆβ0) include in your answer details of the proof. 2- Give an interpretation of ˆβ0
Consider a simple linear model: yi = β1 + β2xi + εi, where εi ∼ N...
Consider a simple linear model: yi = β1 + β2xi + εi, where εi ∼ N (0, σ2) Derive the maximum likelihood estimators for β1 and β2. Are these the same as the estimators obtained from ordinary least squares? Is there a reason to prefer ordinary least squares or maximum likelihood in this case?
Consider a simple linear regression model with nonstochastic regressor: Yi = β1 + β2Xi + ui...
Consider a simple linear regression model with nonstochastic regressor: Yi = β1 + β2Xi + ui . 1. [3 points] What are the assumptions of this model so that the OLS estimators are BLUE (best linear unbiased estimates)? 2. [4 points] Let βˆ 1 and βˆ 2 be the OLS estimators of β1 and β2. Derive βˆ 1 and βˆ 2. 3. [2 points] Show that βˆ 2 is an unbiased estimator of β2.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT