Question

Question 1 Suppose we are given the data 2 -1 22: 2 -2 0 2 0 -1 -2 -3 30 2 2 2 1 0 -1 0 -1 We aim at fitting the linear model

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:

Given Data

> y=C(1,0,1,0,-1,0,-1) > zl=c(2,2,2,0,-1,-2,-3) > z2=c(-1,-2,-3,0,2,2,2) > ## Linear model > model=lm (yz1+z2) > summary (mod

1) From the above, B^=( -7.553e-17 1.600e-01 -1.600e-01 )'

2) R^2 statistic=0.64.

3) sigma^2=0.6^2=0.36

> X=cbind (rep (1, length (y)), zl, z2) > # Cobariance of B^ is > 0.36*solve (t (X)***X) zl 22 0.05142857 0.0000 0.0000 zl 0.

4)

> confint (model) 2.5 % 97.5 $ (Intercept) -0.6296386 0.6296386 zl -0.6894289 1.0094289 22 -1.0094289 0.6894289 > |

5)

Analysis of Variance Source Regression Residual Error Total DF SS MS 2 2.5600 1.2800 4 1.4400 0.3600 6 4.0000 F P 3.56 0.130

P-value is 0.130 and greater than alpha=0.05. Hence, fail to reject the null hypothesis.

6)

> ## 6) Confidence interval > predict (model, data.frame (zl=mean (zl), z2=mean (22)), interval = confidence) fit lwr upr 1

## R command


y=c(1,0,1,0,-1,0,-1)
z1=c(2,2,2,0,-1,-2,-3)
z2=c(-1,-2,-3,0,2,2,2)

## Linear model
model=lm(y~z1+z2)
summary(model)
## 3

X=cbind(rep(1, length(y)), z1, z2)
# Cobariance of B^ is
0.36*solve(t(X)%*%X)

##4
confint(model)

## 6) Confidence interval
predict(model, data.frame(z1=mean(z1), z2=mean(z2)), interval = "confidence")

## 7) Prediction interval
predict(model, data.frame(z1=mean(z1), z2=mean(z2)), interval = "prediction")

***Please like it.....

Add a comment
Know the answer?
Add Answer to:
Question 1 Suppose we are given the data 2 -1 22: 2 -2 0 2 0...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 3. (20 pts) Suppose that we have 4 observations for 3 variables y , x\, X2...

    3. (20 pts) Suppose that we have 4 observations for 3 variables y , x\, X2 and consider a problem of regressing y on two (qualitative) variables x\, xz. Data y (Income) x (Gender) X2 (Management Status) obs no. Female None 2 Male None 3 Female Yes 4 Male Yes Y4 To handle the qualitative variables x\, x2, we define dummy variables z1, 22 as Male for for 1, 1, T2= Yes Z1= Z2= -1 for for 1 1 =...

  • 2. Consider the simple linear regression model: where e1, .. . , es, are i.i.d. N (0, o2), for i= 1,2,... , n. Suppose...

    2. Consider the simple linear regression model: where e1, .. . , es, are i.i.d. N (0, o2), for i= 1,2,... , n. Suppose that we would like to estimate the mean response at x = x*, that is we want to estimate lyx=* = Bo + B1 x*. The least squares estimator for /uyx* is = bo bi x*, where bo, b1 are the least squares estimators for Bo, Bi. ayx= (a) Show that the least squares estimator for...

  • Question 1 (The following data is from Q1 of HW2) Suppose we wanted to predict the selling price ...

    Question 1 (The following data is from Q1 of HW2) Suppose we wanted to predict the selling price of a house using its size in a certain area of a city. A random sample of six houses were selected from the area. The data is presented in the following table with size given in hundreds of square feet, and sale price in thousands of dollars: Size (X121518 21 24 27 Price (Y)6085 75 105 120 110 We are interested in...

  • 1. Four objects are weighed 2 at a time on a spring balance. Denote the 4...

    1. Four objects are weighed 2 at a time on a spring balance. Denote the 4 unknown weights by B1,...,BA. Six observations are made and are expressed in these forms: Y = B: + 32 + €1. Y = B1 + B3 + €2, Y3 = B1 + B1 + €3, Y4 = 32 +33 + €4, Y = B2 + 4 + €5, Y6 = 33 +34 + €6. Assume that €, N (0,0%), i = 1,...,6. (a) Find...

  • 1. a. At any given combination of values , the assumptions for the multiple regression model...

    1. a. At any given combination of values , the assumptions for the multiple regression model require that the population of potential error term values has? b. What is the point estimate for the constant variance? c.Which of the following is the sum of the squared differences between the predicted values of the dependent variable and the mean of the dependent variable, the explained variation? d.The null hypothesis for the overall F-test states that: At least one ββis not equal...

  • Please solve the question Simulation: Assume the simple linear regression model i = 1,... , n Ул 3D Во + B1; + ei, N(0,...

    Please solve the question Simulation: Assume the simple linear regression model i = 1,... , n Ул 3D Во + B1; + ei, N(0, o2) for i = 1,...,n. where e Let's set Bo = 10, B1 = -2.5, and n = 30 (a) Set a = 100, and x; = i for i = 1,...,n. (b) Your simulation will have 10,000 iterations. Before you start your iterations, set a random seed using your birthday date (MMDD) and report the...

  • 1) Consider n data points with 3 covariates and observations {xil, Гіг, xī,3, yi); i-1,.,n, and y...

    1) Consider n data points with 3 covariates and observations {xil, Гіг, xī,3, yi); i-1,.,n, and you fit the following model, y Bo+B+B32+Br+e that is yi-An + ßiXiut Ali,2 + Asri,3 + Ei where є,'s are independent normal distribution with mean zero and variance ơ2 For a observed covariate vector-(1, ri, ^2, r3) (with the intercept and three regressor variables) and observed yg at that point a) write the expression for estimated variance for the fit zs at z. (Let...

  • We have a dataset with n = 10 pairs of observations (Li, Yi), and n τη...

    We have a dataset with n = 10 pairs of observations (Li, Yi), and n τη α, = 683, 9 = 813, 1=1 Σ Σ? = 47, 405, Στ.μ. = 56, 089, Συ? = 66, 731. ΤΟ =1 1=1 What is the line of best fit for this data? What is an approximate 95% prediction interval for the response yo at 20 60? What is an approximate 95% confidence interval for the mean response at :20 60? What is an...

  • 3. (40 points) Use the graph, an output of the least squares prediction equation for the starting salary data (in thous...

    3. (40 points) Use the graph, an output of the least squares prediction equation for the starting salary data (in thousands of dollars) given a graduated student's cumulative GPA, and the table of sampled data below to do the following Student ID GPA(x) 3.26 Starting Salary (y) 33.8 2.60 29.8 3.35 33.5 2.86 30.4 3.82 36.4 2.21 27.6 3.47 35.3 Regression Plot Y= 14.8156 + 5.70657x R-Sq 0.977 寸 853 4.0 2.0 2.5 3.0 3.5 GPA (a) Identify and interpret...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT