393 mtcars-simple2
regression
en
bayes
frequentist
qm1
stats-nutshell
mtcars
Schlüsselwörter
Aufgaben, Statistik, Prognose, Modellierung, R, Datenanalyse, Regression
393.1 Exercise
We will use the dataset mtcars in this exercise.
Assume your causal model of your research dictates that fuel economy is a linear function of horse power, cylinder count and displacement of the engine.
Compute the explained variance (point estimate) for the above model!
Notes:
- Use can either use frequentist or bayesian modeling.
- Use R for all computations.
- There are multiple ways to find a solution.
393.2 Solution
Compute Model:
Get R2:
r2(lm1_freq)
## # R2 for Linear Regression
## R2: 0.768
## adj. R2: 0.743r2(lm1_bayes)
## # Bayesian R2 with Compatibility Interval
##
## Conditional R2: 0.746 (95% CI [0.593, 0.849])The coefficient is estimated as about 0.77.
Categories:
- regression
- en
- bayes
- frequentist
- qm1
- stats-nutshell