flac
implements Firth's bias-reduced penalized-likelihood logistic regression with added covariate.
flac(...)# S3 method for default
flac(
formula,
data,
model = TRUE,
control,
modcontrol,
weights,
offset,
na.action,
pl = TRUE,
plconf = NULL,
...
)
# S3 method for logistf
flac(lfobject, data, model = TRUE, ...)
A flac
object with components:
The coefficients of the parameter in the fitted model.
A vector with the predicted probability of each observation
A vector with the linear predictor of each observation.
The p-values of the specific parameters
The lower confidence limits of the parameter.
The upper confidence limits of the parameter.
The call object.
The significance level: 0.95
The variance-covariance-matrix of the parameters.
A vector of the (penalized) log-likelihood of the restricted and the full models.
The number of observations.
The formula object.
The augmented dataset used
The number of degrees of freedom in the model.
depending on the fitting method 'Penalized ML' or Standard ML'.} \item{method.ci}{the method in calculating the confidence intervals, i.e.
profile likelihood' or `Wald', depending on the argument pl and plconf.
a copy of the control parameters.
a copy of the modcontrol parameters.
the model terms (column names of design matrix).
if requested (the default), the model frame used.
Further arguments passed to the method or logistf
-call.
A formula object, with the response on the left of the operator,
and the model terms on the right. The response must be a vector with 0 and 1 or FALSE
and
TRUE
for the outcome, where the higher value (1 or TRUE
) is modeled.
A data frame containing the variables in the model.
If TRUE the corresponding components of the fit are returned.
Controls iteration parameter. Taken from logistf
-object when specified. Otherwise default is control= logistf.control()
.
Controls additional parameter for fitting. Taken from logistf
-object when specified. Otherwise default is logistf.mod.control()
.
specifies case weights. Each line of the input data set is multiplied by the corresponding element of weights
a priori known component to be included in the linear predictor
a function which indicates what should happen when the data contain NAs
Specifies if confidence intervals and tests should be based on the profile
penalized log likelihood (pl=TRUE
, the default) or on the Wald method (pl=FALSE
).
specifies the variables (as vector of their indices) for which profile likelihood confidence intervals should be computed. Default is to compute for all variables.
A fitted logistf
object.
flac(default)
: With formula and data
flac(logistf)
: With logistf object
FLAC is a simple modification of Firth's logistic regression which provides average predicted probabilities equal to the observed proportion of events, while preserving the ability to deal with separation. It has been described by Puhr et al (2017).
The modified score equations to estimate coefficients for Firth's logistic regression can be
interpreted as score equations for ML estimates for an augmented data set. This data set can be
created by complementing each original observation i with two pseudo-observations weighted by
\(h_i/2\) with unchanged covariate values and with response values set to \(y=0\) and \(y=1\)
respectively. The basic idea of FLAC is to discriminate between original and pseudo-observations
in the alternative formulation of Firth's estimation as an iterative data augmentation procedure.
The following generic methods are available for ' flac
's output object: print, summary, coef, confint, anova, extractAIC, add1, drop1,
profile, terms, nobs, predict
. Furthermore, forward and backward functions perform convenient variable selection. Note
that anova, extractAIC, add1, drop1, forward and backward are based on penalized likelihood
ratio tests.
Puhr R, Heinze G, Nold M, Lusa L, Geroldinger A (2017). Firth's logistic regression with rare events: accurate effect estimates and predictions? Statistics in Medicine 36: 2302-2317.
logistf()
for Firth's bias-Reduced penalized-likelihood logistic regression.
#With formula and data:
data(sex2)
flac(case ~ age + oc + vic + vicl + vis + dia, sex2)
#With a logistf object:
lf <- logistf(formula = case ~ age + oc + vic + vicl + vis + dia, data = sex2)
flac(lf, data=sex2)
Run the code above in your browser using DataLab