betasout {multiridge} | R Documentation |
Coefficient estimates from (converged) IWLS fit
Description
Extracts estimated regression coefficients from the final Iterative Weighted Least Squares fit, as obtained from linear, logistic, or Cox ridge regression.
Usage
betasout(IWLSfit, Xblocks, X1=NULL, penalties, pairing = NULL)
Arguments
IWLSfit |
List object, see details |
Xblocks |
List of data frames or matrices, representing |
X1 |
Matrix. Dimension |
penalties |
Numerical vector. |
pairing |
Numerical vector of length 3 or |
Details
IWLSfit
should be the output of either IWLSridge
or IWLSCoxridge
. Xblocks
may be created by createXblocks
.
Value
List. Number of components equals number of components of Xblocks
plus one, as the output is augmented with an intercept estimate (first component, NULL
if absent).
Each component is a numerical vector representing regression parameter estimates. Lengths of vectors match column dimensions of Xblocks
(nr of variables for given data type)
See Also
createXblocks
. A full demo and data are available from:
https://drive.google.com/open?id=1NUfeOtN8-KZ8A2HZzveG506nBwgW64e4
Examples
data(dataXXmirmeth)
resp <- dataXXmirmeth[[1]]
XXmirmeth <- dataXXmirmeth[[2]]
lambdas <- c(100,1000)
# Prepare fitting for the specified penalties.
XXT <- SigmaFromBlocks(XXmirmeth,penalties=lambdas)
# Fit. fit$etas contains the n linear predictors
fit <- IWLSridge(XXT,Y=resp)
# Computation of the regression coefficients requires the original
# (large!) nxp data sets, available from link above
## Not run:
Xbl <- createXblocks(list(datamir,datameth))
betas <- betasout(fit, Xblocks=Xbl, penalties=lambdas)
## End(Not run)