Learn R Programming

stdReg2 (version 1.0.3)

sandwich: Compute the sandwich variance components from a model fit

Description

Compute the sandwich variance components from a model fit

Usage

sandwich(fit, data, weights, t, fit.detail)

Value

A list consisting of the Fisher information matrix (I) and the Score equations (U)

Arguments

fit

A fitted model object of class glm, coxph, ah, or survfit

data

The data used to fit the model

weights

Optional weights

t

Optional fixed time point for survival objects

fit.detail

For Cox models, the result of running coxph.detail on the model fit