Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

scoreresid.msm

Score residuals


Description

Score residuals for detecting outlying subjects.

Usage

scoreresid.msm(x, plot=FALSE)

Arguments

x

A fitted multi-state model, as returned by msm.

plot

If TRUE, display a simple plot of the residuals in subject order, labelled by subject identifiers

Details

The score residual for a single subject is

U(theta)^T I(theta)^{-1} U(theta)

where U(theta) is the vector of first derivatives of the log-likelihood for that subject at maximum likelihood estimates theta, and theta is the observed Fisher information matrix, that is, the matrix of second derivatives of minus the log-likelihood for that subject at theta.

Subjects with a higher influence on the maximum likelihood estimates will have higher score residuals.

These are only available for models with analytic derivatives (which includes all non-hidden and most hidden Markov models).

Value

Vector of the residuals, named by subject identifiers.

Author(s)

Andrew Titman a.titman@lancaster.ac.uk (theory), Chris Jackson chris.jackson@mrc-bsu.cam.ac.uk (code)


msm

Multi-State Markov and Hidden Markov Models in Continuous Time

v1.6.8
GPL (>= 2)
Authors
Christopher Jackson <chris.jackson@mrc-bsu.cam.ac.uk>
Initial release
2019-12-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.