Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. In class we showed that in the simple linear regression model, the standard error of P1 is 62 se( B,) = ( x -

image text in transcribed
2. In class we showed that in the simple linear regression model, the standard error of P1 is 62 se( B,) = ( x - X ) ? I'M ( x - X ) 2 Then, using the beertemp.dta data set, we calculated se( 1) . Here is my do file: use beertemp . dta, clear reg cases temp * Calculate sigma_hat gen y_hat = _b[_cons] +_b [temp]*temp egen sum_u_hat_sq = total( (cases-y_hat) *2 ) gen sigma_hat= sqrt (sum_u_hat_sq/(26-2) ) list sum_u_hat_sq sigma_hat in 1/1 drop sum_u_hat_sq * Calculate x_bar egen sumx = total(temp) gen xbar = sumx/26 list sumx xbar in 1/1 drop sumx Calculate se(b1_hat) egen sum_x_xbar_sq = total( (temp - xbar ) *2 ) gen se_bi_hat = sigma_hat/sqrt(sum_x_xbar_sq) list sigma_hat sum_x_xbar_sq se_bi_hat in 1/1 We know from the handout "Review of Mathematical Tools" (page 1) that [ ( x - x)= = [x2 - nx2 (Note you calculate and then subtract nX" .) Hence, se( P1) is equivalently given by the following formula using this alternate way to calculate the denominator as well as taking the square root of the entire expression: se( B,) = I'M Use the data set house.dta and model (1) price =/, + Bibarms, + 4 to show that you can calculate sel 1) using this alternate, but equivalent formula. (Note because of rounding error, your answer may differ from the answer in Question 1 at the fifth or sixth decimal place.) I suggest you start by copying my commands from this question (above) into a Stata do file, then modify the commands to calculate 1 using this alternate formula using model (1) from Question 1. In your

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Numerical Analysis

Authors: Richard L. Burden, J. Douglas Faires

9th edition

538733519, 978-1133169338, 1133169333, 978-0538733519

More Books

Students also viewed these Mathematics questions

Question

3. Identify five different types of conflict.

Answered: 1 week ago