beta_coefficients
This is an old revision of the document!
Beta coefficients in regression
$$ \beta = b * \frac{sd(x)}{sd(y)} $$
# import test score data "tests_cor.csv" tests <- read.csv("http://commres.net/wiki/_media/r/tests_cor.csv") colnames(tests) <- c("ser", "sat", "clep", "gpa") tests <- subset(tests, select=c("sat", "clep", "gpa")) attach(tests)
lm.gpa.clep <- lm(gpa ~ clep, data = tests) summary(lm.gpa.clep)
Call: lm(formula = gpa ~ clep, data = tests) Residuals: Min 1Q Median 3Q Max -0.190496 -0.141167 -0.002376 0.110847 0.225207 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.17438 0.38946 3.015 0.016676 * clep 0.06054 0.01177 5.144 0.000881 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.1637 on 8 degrees of freedom Multiple R-squared: 0.7679, Adjusted R-squared: 0.7388 F-statistic: 26.46 on 1 and 8 DF, p-value: 0.0008808
beta_coefficients.1558406592.txt.gz · Last modified: 2019/05/21 11:43 by hkimscil