Derek Slone-Zhen
17 December 2014
The mtcars Linear Modeler
is a fabuleous application for exploring your first linear regression model
using Rs lm
function from the builtin stats package.
R is a very powerful modelling environment. In just very small amount of code it is possbile to have R solve quite complex modeling problems. A simple linear regrassion model can be fitted just with:
fit <- lm(mpg ~ wt + am, data = mtcars)
And the reults shown with:
summary(fit)
Call:
lm(formula = mpg ~ wt + am, data = mtcars)
Residuals:
Min 1Q Median 3Q Max
-4.5295 -2.3619 -0.1317 1.4025 6.8782
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 37.32155 3.05464 12.218 5.84e-13 ***
wt -5.35281 0.78824 -6.791 1.87e-07 ***
am -0.02362 1.54565 -0.015 0.988
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 3.098 on 29 degrees of freedom
Multiple R-squared: 0.7528, Adjusted R-squared: 0.7358
F-statistic: 44.17 on 2 and 29 DF, p-value: 1.579e-09
plot(fit,1); plot(fit,2);
Because, with an interactive application, you can focus you attention on the changes that happen to the numbers or the graphs as you add or remove explanatory variables from the fit.
The eye reacts well to these “moving images” and picks up on the changes in the images much better than if it had to flick focus between two different graphs or tables.
This app will certainly make it quicker for you to complete your factor selection processes.
Go to the app site NOW!!