betasout: Coefficient estimates from (converged) IWLS fit

Description Usage Arguments Details Value See Also Examples

View source: R/MultiLambdaCVfun.R

Description

Extracts estimated regression coefficients from the final Iterative Weighted Least Squares fit, as obtained from linear, logistic, or Cox ridge regression.

Usage

1
betasout(IWLSfit, Xblocks, X1=NULL, penalties, pairing = NULL)

Arguments

IWLSfit

List object, see details

Xblocks

List of data frames or matrices, representing b=1,...,B data blocks of dimensions n x p_b.

X1

Matrix. Dimension n x p_0, p_0 < n, representing unpenalized covariates.

penalties

Numerical vector.

pairing

Numerical vector of length 3 or NULL.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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)

multiridge documentation built on June 15, 2021, 9:08 a.m.