logisticMargins: Perform marginal analysis for a logistic regression model

Description Usage Arguments Value

View source: R/logisticMargins.R

Description

For a logistic regression model with a binary main effect, obtain predicitive margins along with their corresponding risk ratio, relative risk, odds ratio, and standard errors.

Usage

1
logisticMargins(formula, main_effect, over, data)

Arguments

formula

The formula for the logistic regression model

main_effect

The variable name of the main effect in your model.

over

A Boolean variable. If TRUE, compute the equivalent of the Stata command margins, over(var_name). If FALSE, compute the equivalent of margins var_name.

data

The data that will be used to fit the logistic regression model.

Value

A data.frame containing the predictive margins, a risk ratio, a relative risk, an odds ratio, and their standard errors.


jameshenegan/dmsepmlr documentation built on Jan. 1, 2021, 4:27 a.m.