Logistf {EHR}R Documentation

Firth's penalized-likelihood logistic regression with more decimal places of p-value than logistf function in the R package ‘logistf’

Description

Adapted from logistf in the R package ‘logistf’, this is the same as logistf except that it provides more decimal places of p-value that would be useful for Genome-Wide Association Study (GWAS) or Phenome Wide Association Study (PheWAS).

Usage

Logistf(
  formula = attr(data, "formula"),
  data = sys.parent(),
  pl = TRUE,
  alpha = 0.05,
  control,
  plcontrol,
  firth = TRUE,
  init,
  weights,
  plconf = NULL,
  dataout = TRUE,
  ...
)

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 outcome, where the higher value (1 or TRUE) is modeled. It is possible to include contrasts, interactions, nested effects, cubic or polynomial splines and all S features as well, e.g. Y ~ X1*X2 + ns(X3, df=4). From version 1.10, you may also include offset() terms.

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.

pl

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

alpha

the significance level (1-\alpha the confidence level, 0.05 as default).

control

Controls Newton-Raphson iteration. Default is
control=logistf.control(maxstep, maxit, maxhs, lconv, gconv, xconv)

plcontrol

Controls Newton-Raphson iteration for the estimation of the profile likelihood confidence intervals. Default is
plcontrol=logistpl.control(maxstep, maxit, maxhs, lconv, xconv, ortho, pr)

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) one obtains profile likelihood confidence intervals for maximum likelihood logistic regression parameters.

init

specifies the initial values of the coefficients for the fitting algorithm.

weights

specifies case weights. Each line of the input data set is multiplied by the corresponding element of weights.

plconf

specifies the variables (as vector of their indices) for which profile likelihood confidence intervals should be computed. Default is to compute for all variables.

dataout

If TRUE, copies the data set to the output object.

...

Further arguments to be passed to logistf.

Value

same as logistf except for providing more decimal places of p-value.

Author(s)

Leena Choi leena.choi@vanderbilt.edu and Cole Beck cole.beck@vumc.org

References

same as those provided in the R package ‘logistf’.

Examples

data(dataPheWAS)
fit <- Logistf(X264.3 ~ exposure + age + race + gender, data=dd)
summary(fit)

[Package EHR version 0.4-11 Index]