Learn R Programming

blm (version 2011.2.0)

logistic.rd: Estimate a risk difference between two subject types from a logistic regression model

Description

Point estimate and confidence interval for an absolute risk difference based on a logistic regression model of cohort binary data.

Usage

logistic.rd(type1, type2, type1.zero, type2.zero,fit, data, sig = 4, alpha = 0.05)

Arguments

type1
vector of covariate values for first probability estimate
type2
vector of covariate value for second probability estmate
type1.zero
vector of logical indicators for type1 covariates to be set to zero
type2.zero
vector of logical indicators for type2 covariates to be set to zero
fit
glm object for logistic regression
data
data frame on which the fit was based
sig
numeric number of significant digits for reported estimate
alpha
numeric value to specify the 100(1-alpha)% confidence interval for the risk difference

Value

  • For probability of type1 - probability of type2, returns a list of est, se, lower, upper and CI.

Details

For covariates that are not given a fixed value of set to zero, the empirical distribution is determined from data and the marginal risk difference is computed by integrating over these factors.