getScoreResidualsFromClogit {drgee} | R Documentation |
Get the (conditional) score residuals from conditional logistic regression
Description
A function to obtain the conditional score residuals from conditional logistic regression as well as the sum of derivatives of these residuals with respect to the parameters evaluated at the estimated parameters.
Usage
getScoreResidualsFromClogit(fit, coefs, y, x, id)
Arguments
fit |
A fitted object. Could be any object that has a
class.function |
coefs |
An estimate of the parameters. If the argument |
y |
The observed outcomes. |
x |
The design matrix. |
id |
The cluster identification variable. |
Details
getScoreResidualsFromClogit
calculates the residuals from the
conditional score equations used in conditional logistic regression as
we as the sums of their derivatives with respect to the paramaters.
This is useful if one wants to use a calculate the sandwich estimate of a variance where the uncertainty in the estimation of a conditional odds ratio needs to be taken into account.
Value
getScoreResidualsFromClogit
return a list containing:
U |
An |
dU.sum |
An |
dU.mean |
The mean cluster sum of the derivatives of the score residuals from the conditional likelihood. |
Author(s)
Johan Zetterqvist, Arvid Sjölander