Question: Give me the Python code please. ( a ) Write your own function myconf which takes as arguments a fitted model fit ( from simple
Give me the Python code please.
a Write your own function myconf which takes as arguments a fitted model fit from simple linear
regression an independent variable and a specified confidence level The function should output
the value of the mean response at and the confidence interval based on the level specified. For this
part DO NOT use builtin prediction functions such as fit.predict or confint.
b Using the dataset from the file cars.csv fit dist vs speed as the independent variable using a
linear model and generate the outputs from the myconf function using the fitted model, and
for both values of
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
