View source: R/logisticRidge.R
logisticRidge | R Documentation |
Fits a logistic ridge regression model. Optionally, the ridge regression parameter is chosen automatically using the method proposed by Cule et al (2012).
logisticRidge(formula, data, lambda = "automatic", nPCs = NULL, scaling = c("corrForm", "scale", "none"), ...) ## S3 method for class 'ridgeLogistic' coef(object, all.coef = FALSE, ...) ## S3 method for class 'ridgeLogistic' plot(x, y = NULL, ...) ## S3 method for class 'ridgeLogistic' predict(object, newdata = NULL, type = c("link", "response"), na.action = na.pass, all.coef = FALSE, ...) ## S3 method for class 'ridgeLogistic' print(x, all.coef = FALSE, ...) ## S3 method for class 'ridgeLogistic' summary(object, all.coef = FALSE, ...) ## S3 method for class 'summary.ridgeLogistic' print(x, digits = max(3, getOption("digits") - 3), signif.stars = getOption("show.signif.stars"), ...)
formula |
a formula expression as for regression models, of the form |
data |
an optional data frame in which to interpret the variables occuring in |
lambda |
A ridge regression parameter. If |
nPCs |
The number of principal components to use to choose the ridge regression parameter, following the method of
Cule et al (2012). It is not possible to specify both |
scaling |
The method to be used to scale the predictors. One of
|
object |
A ridgeLogistic object, typically generated by a call to |
newdata |
An optional data frame in which to look for variables with which to predict. If omitted, the fitted values are used. |
type |
the type of prediction required. The default predictions are of log-odds
(probabilities on logit scale) and |
na.action |
function determining what should be done with missing values
in |
all.coef |
Logical. Should results be returned for all ridge regression penalty
parameters ( |
x |
An object of class |
y |
Dummy argument for compatibility with the default |
digits |
minimum number of significant digits to be used for most numbers |
signif.stars |
logical; if |
... |
Additional arguments to be passed to or from other methods. |
If an intercept is present in the model, its coefficient is not penalised. If you want to penalise an intercept, put in your own constant term and remove the intercept.
An object of class "ridgeLogistic"
, with components:
automatic |
Was |
call |
The matched call. |
coef |
A named vector of fitted coefficients. |
df |
A vector of degrees of freedom of the model fit and degrees of freedom for variance. |
Inter |
Was in antercept included? |
isScaled |
Were the predictors scaled before the model was fitted? |
lambda |
The ridge regression parameter. |
scales |
The scales used to standardize the predictors. |
terms |
The |
x |
The scaled predictor matrix. |
xm |
A vector of means of the predictors. |
y |
The response. |
And optionally the component
nPCs |
The number of principal components used to compute the ridge regression parameter. |
Erika Cule
A semi-automatic method to guide the choice of ridge parameter in ridge regression. Cule, E. and De Iorio, M. (2012) arXiv:1205.0686v1 [stat.AP]
linearRidge
data(GenBin) mod <- logisticRidge(Phenotypes ~ ., data = as.data.frame(GenBin)) summary(mod)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.