rcone | R Documentation |
Compute a cone of regression vectors with a constant R-squared around a target vector.
rcone(R, Rsq, b, axis1, axis2, deg, Npoints = 360)
R |
Predictor correlation matrix. |
Rsq |
Coefficient of determination. |
b |
Target vector of OLS regression coefficients. |
axis1 |
1st axis of rotation plane. |
axis2 |
2nd axis of rotation plane. |
deg |
All vectors b.i will be ‘deg’ degrees from b. |
Npoints |
Number of rotation vectors, default = 360. |
b.i |
Npoints values of b.i |
Niels Waller and Jeff Jones
Waller, N. G. & Jones, J. A. (2011). Investigating the performance of alternate regression weights by studying all possible criteria in regression models with a fixed set of predictors. Psychometrika, 76, 410-439.
R <- matrix(.5, 4, 4)
diag(R) <- 1
Npoints <- 1000
Rsq <- .40
NumDeg <- 20
V <- eigen(R)$vectors
## create b parallel to v[,3]
## rotate in the 2 - 4 plane
b <- V[,3]
bsq <- t(b) %*% R %*% b
b <- b * sqrt(Rsq/bsq)
b.i <- rcone(R, Rsq,b, V[,2], V[,4], deg = NumDeg, Npoints)
t(b.i[,1]) %*% R %*% b.i[,1]
t(b.i[,25]) %*% R %*% b.i[,25]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.