Answer:
Check the explanation
Step-by-step explanation:
The First action is to enter the data in Excel and then save it as a csv file. Then call the data set in R using your saved path, I have made use of my computer path here in my code. please change it for yours.
Here is the code That you need to use for finding the multiple limear regression model and summary of it.
code:
data=read. csv("C:\\Users\\HP\\Desktop\\chegg. csv")
data
attach(data)
model=lm(Risk~Age+Blood.Pressure+Smoker)
summary(model)
And Here is the output:
Call:
lm(formula = Risk ~ Age + Blood.Pressure + Smoker)
Residuals:
Min 1Q Median 3Q Max
-13.1064 -1.5715 0.4225 3.4855 8.5561
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -91.75950 15.22276 -6.028 1.76e-05 ***
Age 1.07674 0.16596 6.488 7.49e-06 ***
Blood.Pressure 0.25181 0.04523 5.568 4.24e-05 ***
Smoker 8.73987 3.00082 2.912 0.0102 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 5.757 on 16 degrees of freedom
Multiple R-squared: 0.8735, Adjusted R-squared: 0.8498
F-statistic: 36.82 on 3 and 16 DF, p-value: 2.064e-07
The answer is now written in the notebook which i am uploading..