File: scoreresid.msm.Rd

package info (click to toggle)
r-cran-msm 1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,740 kB
  • sloc: ansic: 2,700; makefile: 14
file content (37 lines) | stat: -rw-r--r-- 1,200 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
\name{scoreresid.msm}
\alias{scoreresid.msm}
\title{Score residuals}
\description{
  Score residuals for detecting outlying subjects. 
}
\usage{
scoreresid.msm(x, plot=FALSE)
}
\arguments{
  \item{x}{A fitted multi-state model, as returned by
    \code{\link{msm}}.}

  \item{plot}{If \code{TRUE}, display a simple plot of the residuals in
    subject order, labelled by subject identifiers}
}
\value{
  Vector of the residuals, named by subject identifiers. 
}
\details{
  The score residual for a single subject is

  \deqn{U(\theta)^T I(\theta)^{-1} U(\theta)}{U(theta)^T I(theta)^{-1} U(theta)}
  
  where \eqn{U(\theta)}{U(theta)} is the vector of first derivatives of the
  log-likelihood for that subject at maximum likelihood estimates
  \eqn{\theta}{theta}, and \eqn{I(\theta)}{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.
  
}
\author{Andrew Titman  \email{a.titman@lancaster.ac.uk} (theory),   
  Chris Jackson \email{chris.jackson@mrc-bsu.cam.ac.uk} (code)}
\keyword{models}