rmatReg {iopsych} | R Documentation |
Regression
rmatReg(r_mat, y_col, x_col)
r_mat |
A correlation matrix. |
y_col |
The column representing the criterion variable. |
x_col |
A vector of columns representing predictor variables. |
Regression beta weights and R2.
Allen Goebl and Jeff Jones
Rs <- matrix(c(1.0, 0.2, 0.3, 0.4, -0.4,
0.2, 1.0, 0.5, 0.1, 0.1,
0.3, 0.5, 1.0, 0.2, -0.3,
0.4, 0.1, 0.2, 1.0, 0.4,
-0.4, 0.1, -0.3, 0.4, 1.0), 5, 5)
ys <- 5
xs <- 1:4
rmatReg(Rs, ys, xs)