Learn R Programming

DAMisc (version 1.7.2)

effect_logistf: Plot Effects from Firth Logit

Description

Plots the effect of a variable in a model estimated with Firth Logit.

Usage

effect_logistf(var, obj, data, ...)

Arguments

var

A character string giving the name of the variable whose effect is to be generated.

obj

An object of class logistf.

data

A data frame.

...

Other arguments to be passed down to the Effect function.

Value

An object of class eff that can be used with other functions from the effects package.

Details

The effect.logistf function calculates the effect (predicted probabilities) of a variable in a Firth logit model estimated with the logistf function. The function estimates the analogous glm. It then replaces the coefficient vector in that model object with the Frith logit coefficients. It also puts the variance-covariance matrix from the Firth logit in the model object and uses a custom extractor function in the Effect function to extract that variance-covariance matrix rather than the one usually extracted with vcov. Note that variability and confidence intervals for the effects will not be calculated using profile likelihood as they are in the Firth logit, but will be calculated using the appropriate variance-covariance matrix.