Description Usage Arguments Details Value See Also Examples

View source: R/MultiLambdaCVfun.R

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

1 |

`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 |

`IWLSfit`

should be the output of either `IWLSridge`

or `IWLSCoxridge`

. `Xblocks`

may be created by `createXblocks`

.

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)

`createXblocks`

. A full demo and data are available from:

https://drive.google.com/open?id=1NUfeOtN8-KZ8A2HZzveG506nBwgW64e4

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)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.