Question: Use this syntax to read in the data for this problem. ( If you get an error about the package not being loaded, then uncomment

Use this syntax to read in the data for this problem. (If you get an error about the package not being
loaded, then uncomment the first line and rerun the code.)
Give the sample size: n=
Let's generate a plot of the data and overlay the best-fit line:
gf_point (Weight WingLength, data=Sparrows)|> gf_lm()
Next, we'll generate the linear regression model:
1m.out =1m(Weight WingLength, data=Sparrows)
1m.out
Give the regression model parameter estimates for the line:
intercept: b0=
slope: b1=
Now we will calculate the confidence interval for the slope. This gives us the range in which we would
expect to find the true slope 1. For a 95% confidence interval, we will need information from these two
commands:
summary (1m.out)
qt(0.975,df=114)
Give the lower and upper bounds for the 95% confidence interval for the slope for this model:
1
To obtain predictions (the fitted values) at our data points, we can use the command:
fitted (1m. out)
These predictions are also called conditional means (the "average" values for the dependent variable
conditional on a given value for the independent variable). If we want a predicted value (conditional
mean) at some specific input WingLength, say wingLength =26.2, we can make a function specifically designed
for such predictions.
weightPredictor = makeFun . out
Use this syntax to read in the data for this

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!