Module #7 Assignment

10/9/2023


1.1 Define the relationship model between the predictor and the response variable:
lm(formula = y ~ x, data = data)  
y is the response variable and x is the predictor variable.

1.2 Calculate the coefficients? 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)  
(Intercept)   19.206     15.691   1.224   0.2558  
x              3.269      1.088   3.006   0.0169 *
---

2.1 Define the relationship model between the predictor and the response variable.
lm(discharge ~ waiting, data = visit)
2.2 Extract the parameters of the estimated regression equation with the coefficients function.
> coefficients(model)
(Intercept)     waiting 
-1.53317418  0.06755757 
2.3 Determine the fit of the eruption duration using the estimated regression equation.
> estimated_eruption
(Intercept) 
   3.871431 

3.1 Examine the relationship Multi Regression Model as stated above and its Coefficients using 4 different variables from mtcars (mpg, disp, hp and wt).
Report on the result and explanation what does the multi regression model and coefficients tells about the data?   

lm(mpg ~ disp + hp + wt, data = input)
Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept) 37.105505   2.110815  17.579  < 2e-16 ***
disp        -0.000937   0.010350  -0.091  0.92851    
hp          -0.031157   0.011436  -2.724  0.01097 *  
wt          -3.800891   1.066191  -3.565  0.00133 ** 
---
The regression model and coefficients highlight how the different variables of mpg, disp, hp, and wt effect the mpg. They show the relationships between the variables. 

4.  From our textbook pp. 110 Exercises # 5.1
With the rmr data set, plot metabolic rate versus body weight. Fit a linear regression to the relation. According to the fitted model, what is the predicted metabolic rate for a body weight of 70 kg? 

lm(metabolic.rate ~ body.weight, data = rmr)
predict(model, newdata = new_data)
       1 
1305.394 


Comments

Popular posts from this blog

Module #11 Assignment

Module #12 Assignment

Module #9 Assignment