Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using R, set a random seed of 20220124, and then generate 100 random Poisson observations with intensity equal to 5, storing this variable as 'X'.

Using R, set a random seed of 20220124, and then generate 100 random Poisson observations with intensity equal to 5, storing this variable as 'X'. Set a new random seed of 20220131 and generate 100 random Normal observations with mean 0 and standard deviation 3, storing this variable as 'E'.Construct a new variable equal to 2-0.5*X+E, storing this variable as 'Y'.

Notice that you created this data according to a linear model, with residuals meeting the i.i.d. normal assumption.You know the true slope and the true intercept of the data.

Compose a regression model in R where 'X' is the predictor and 'Y' is the response.

1. What is the estimated intercept of your model?

2. What is the sum of squares of the errors of your model?

3. What would be the sum of squares of the errors if you used the slope and intercept which describe the true relationship between X and Y?

4. Earlier, you simulated 100 errors drawn from a normal distribution with mean zero. What was the mean of your 100 errors? Note these are not the same as the residuals estimated by your regression.

5. First calculate the mean of the simulated errors when X is 5 or less, and then second calculate the mean of the simulated errors when X is 6 or greater. What is the value of the second calculation?

6. Speculate as to why the estimated slope and intercept of your model are different than the true slope and intercept used to create the data.

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

Elementary Number Theory

Authors: Gove Effinger, Gary L Mullen

1st Edition

1000427129, 9781000427127

More Books

Students also viewed these Mathematics questions