pp_residual: Compute raw and pearson residuals for point process models

Description Usage Arguments Value Examples

View source: R/pp_residual.R

Description

Compute raw and pearson residuals for point process models

Usage

1
pp_residual(object, events, start = 0, end = max(events), steps = 1000)

Arguments

object

point process model containing the parameters

events

vector of event times

start

start of observation period (default 0)

end

end of observation period (default final event)

steps

number of steps for numeric integration (if needed)

Value

the raw and pearson residuals

Examples

1
2
3
4
5
6
7
Q <- matrix(c(-0.4, 0.4, 0.2, -0.2), ncol = 2, byrow = TRUE)
x <- pp_mmhp(Q,
  delta = c(1 / 3, 2 / 3), lambda0 = 0.9,
  lambda1 = 1.1, alpha = 0.8, beta = 1.2
)
y <- pp_simulate(x, n = 10)
pp_residual(x, events = y$events)

ppdiag documentation built on Aug. 12, 2021, 5:07 p.m.