robincar_contrast {RobinCar}R Documentation

Estimate a treatment contrast

Description

Estimate a treatment contrast using the result of RobinCar::robincar_linear(), RobinCar::robincar_glm(), or RobinCar::robincar_SL() using the delta method.

Usage

robincar_contrast(result, contrast_h, contrast_dh = NULL)

Arguments

result

A LinModelResult or GLMModelResult

contrast_h

An optional function to specify a desired contrast

contrast_dh

An optional jacobian function for the contrast

Value

A contrast object which has the following attributes:

result

A dplyr::tibble() with the label of the treatment contrast (e.g., 1 vs. 0), the estimate of the treatment contrast, estimated SE, and p-value based on a z-test with estimate and SE.

varcov

The variance-covariance matrix for the treatment contrast estimates.

settings

List of model settings used for the contrast.


[Package RobinCar version 0.3.0 Index]