Learn R Programming

logistf (version 1.00)

logistftest: Bias-reduced logistic regression

Description

This function performs a penalized likelihood ratio test on some (or all) selected factors. The resulting object is of the class logistftest and includes the information printed by the proper print method.

Usage

logistftest(formula=attr(data, "formula"), data=sys.parent(),
  test, values, maxit = 25, maxhs=5, epsilon = .0001,
  maxstep = 10, firth=TRUE, beta0)

Arguments

formula
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 model outcome, where the higher value (1 or TRUE) is modeled. It's possible
data
a data.frame where the variables named in the formula can be found, i. e. the variables containing the binary response and the covariates.
test
righthand formula of parameters to test (e.g. ~ B + D - 1). As default all parameter apart from the intercept are tested. If -1 is not included in the formula, the intercept would be tested, too! As alternative to the formula one
values
null hypothesis values, default values are 0. For testing the specific hypothesis 1 = 1,4 = 2,5 = 0 we specify test= ~ B1 + B4 + B5 - 1 and values=c(1, 2, 0).
maxit
maximum number of iterations (default value is 25)
maxhs
maximum number of step-halvings per iterations (default value is 5)
epsilon
specifies the maximum allowed change in penalized log likelihood to declare convergence. Default value is 0.0001.
maxstep
specifies the maximum change of (standardized) parameter values allowed in one iteration. Default value is 0.5.
firth
use of Firth's penalized maximum likelihood (firth=TRUE, default) or the standard maximum likelihood method (firth=FALSE) for the logistic regression. Note that by specifying pl=TRUE and firth=FALSE (and probably a lower number of iterations)
beta0

values

The object returned is of the class logistf and has the following attributes: testcov{a vector of the fixed values of each covariate; NA stands for a parameter which is not tested.} loglik{a vector of the (penalized) log-likelihood of the full and the restricted models. If the argument beta0 not missing, the full model isn't evaluated.} df: the number of degrees of freedom in the model. prob{the p-value of the test.} call{the call object} method{depending on the fitting method "Penalized ML" or "Standard ML".} beta{the coefficients on the restricted solution.}

Details

This function performs a penalized likelihood ratio test on some (or all) selected factors. The resulting object is of the class logistftest and includes the information printed by the proper print method.

References

Firth D (1993). Bias reduction of maximum likelihood estimates. Biometrika 80, 27--38.

Heinze G (1999). Technical Report 10: The application of Firth's procedure to Cox and logistic regression. Department of Medical Computer Sciences, Section of Clinical Biometrics, Vienna University, Vienna.

Heinze G, Ploner M (2001). SAS and SPLUS programs to perform Cox regression without convergence problems. Computer methods and programs in Biomedicine, to appear.

Heinze G, Schemper M (2001). A solution to the problem of monotone likelihood in logistic regression. submitted.

See Also

logistf, logistfplot

Examples

Run this code
data(sex2)
logistftest(case ~ age+oc+vic+vicl+vis+dia,  sex2, 
            test = ~ vic + vicl - 1, values = c(2, 0))

Run the code above in your browser using DataLab