- Home
- R-Forge
**surveillance**: Temporal and Spatio-Temporal Modeling and Monitoring of Epidemic Phenomena**residualsCT**: Extract Cox-Snell-like Residuals of a Fitted Point Process

# Extract Cox-Snell-like Residuals of a Fitted Point Process

### Description

Extract the “residual process” (cf. Ogata, 1988) of a fitted
point process model specified through the conditional intensity
function, for instance a model of class `"twinSIR"`

or
`"twinstim"`

(and also `"simEpidataCS"`

).
The residuals are defined as the fitted cumulative intensities at the
event times, and are generalized residuals similar to those discussed in
Cox and Snell (1968).

### Usage

1 2 3 4 5 6 |

### Arguments

`object` |
an object of one of the aforementioned model classes. |

`...` |
unused (argument of the generic). |

### Details

For objects of class `twinstim`

, the residuals may already be
stored in the object as component `object$tau`

if the model was
fitted with `cumCIF = TRUE`

(and they always are for
`"simEpidataCS"`

). In this case, the `residuals`

method just extracts these values. Otherwise, the residuals have to
be calculated, which is only possible with access to the model
environment, i.e. `object`

must have been fitted with
`model = TRUE`

. The calculated residuals are then also appended
to `object`

for future use. However, if `cumCIF`

and
`model`

were both set to true in the `object`

fit, then it
is not possible to calculate the residuals and the method returns an
error.

### Value

Numeric vector of length the number of events of the corresponding point
process fitted by `object`

. This is the observed residual process.

### Author(s)

Sebastian Meyer

### References

Ogata, Y. (1988)
Statistical models for earthquake occurrences and residual analysis
for point processes.
*Journal of the American Statistical Association*, 83, 9-27

Cox, D. R. & Snell, E. J. (1968)
A general definition of residuals.
*Journal of the Royal Statistical Society. Series B (Methodological)*, 30, 248-275

### See Also

`checkResidualProcess`

to graphically check the
goodness-of-fit of the underlying model.

### Examples

1 2 3 4 5 |

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.

- abattoir: Abattoir Data
- addFormattedXAxis: Formatted Time Axis for '"sts"' Objects
- addSeason2formula: Function that adds a sine-/cosine formula to an existing...
- aggregate.disProg: Aggregate the observed counts
- algo.bayes: The Bayes System
- algo.call: Query Transmission to Specified Surveillance Algorithm
- algo.cdc: The CDC Algorithm
- algo.compare: Comparison of Specified Surveillance Systems using Quality...
- algo.cusum: CUSUM method
- algo.farrington: Surveillance for a count data time series using the...
- algo.farrington.assign.weights: Assign weights to base counts
- algo.farrington.fitGLM: Fit the Poisson GLM of the Farrington procedure for a single...
- algo.farrington.threshold: Compute prediction interval for a new observation
- algo.glrnb: Count Data Regression Charts
- algo.hhh: Fit a Classical HHH Model (DEPRECATED)
- algo.hhh.grid: Fit a Classical HHH Model (DEPRECATED) with Varying Start...
- algo.hmm: Hidden Markov Model (HMM) method
- algo.outbreakP: Semiparametric surveillance of outbreaks
- algo.quality: Computation of Quality Values for a Surveillance System...
- algo.rki: The system used at the RKI
- algo.rogerson: Modified CUSUM method as proposed by Rogerson and Yamada...
- algo.summary: Summary Table Generation for Several Disease Chains
- algo.twins: Model fit based on a two-component epidemic model
- all.equal: Test if Two Model Fits are (Nearly) Equal
- animate: Generic animation of spatio-temporal objects
- anscombe.residuals: Compute Anscombe Residuals
- arlCusum: Calculation of Average Run Length for discrete CUSUM schemes
- backprojNP: Non-parametric back-projection of incidence cases to exposure...
- bestCombination: Partition of a number into two factors
- boda: Surveillance for an univariate count data time series using...
- bodaDelay: Bayesian Outbreak Detection in the Presence of Reporting...
- calibration: Calibration Test for Poisson or Negative Binomial Predictions
- campyDE: Cases of Campylobacteriosis and Absolute Humidity in Germany...
- categoricalCUSUM: CUSUM detector for time-varying categorical time series
- checkResidualProcess: Check the residual process of a fitted 'twinSIR' or...
- coeflist: List Coefficients by Model Component
- compMatrix.writeTable: Latex Table Generation
- correct53to52: Data Correction from 53 to 52 weeks
- create.disProg: Creating an object of class disProg
- create.grid: Create a Matrix of Initial Values for 'algo.hhh.grid'
- deleval: Surgical failures data
- discpoly: Polygonal Approximation of a Disc/Circle
- disProg2sts: Convert disProg object to sts and vice versa
- earsC: Surveillance for a count data time series using the EARS C1,...
- enlargeData: Data Enlargement
- epidata: Continuous-Time SIR Event History of a Fixed Population
- epidata_animate: Spatio-Temporal Animation of an Epidemic
- epidataCS: Continuous Space-Time Marked Point Patterns with Grid-Based...
- epidataCS_aggregate: Conversion (aggregation) of '"epidataCS"' to '"epidata"' or...
- epidataCS_animate: Spatio-Temporal Animation of a Continuous-Time...
- epidataCS_permute: Randomly Permute Time Points or Locations of '"epidataCS"'
- epidataCS_plot: Plotting the Events of an Epidemic over Time and Space
- epidataCS_update: Update method for '"epidataCS"'
- epidata_intersperse: Impute Blocks for Extra Stops in '"epidata"' Objects
- epidata_plot: Plotting the Evolution of an Epidemic
- epidata_summary: Summarizing an Epidemic
- estimateGLRNbHook: Hook function for in-control mean estimation
- farringtonFlexible: Surveillance for an univariate count data time series using...
- findH: Find decision interval for given in-control ARL and reference...
- findK: Find reference value
- find.kh: Determine the k and h values in a standard normal setting
- fluBYBW: Influenza in Southern Germany
- formatPval: Pretty p-Value Formatting
- glm_epidataCS: Fit an Endemic-Only 'twinstim' as a Poisson-'glm'
- ha: Hepatitis A in Berlin
- hagelloch: 1861 Measles Epidemic in the City of Hagelloch, Germany
- hepatitisA: Hepatitis A in Germany
- hhh4: Fitting HHH Models with Random Effects and Neighbourhood...
- hhh4_calibration: Test Calibration of a 'hhh4' Model
- hhh4_formula: Specify Formulae in a Random Effects HHH Model
- hhh4_methods: Print, Summary and other Standard Methods for '"hhh4"'...
- hhh4_plot: Plots for Fitted 'hhh4'-models
- hhh4_predict: Predictions from a 'hhh4' Model
- hhh4_simulate: Simulate '"hhh4"' Count Time Series
- hhh4_simulate_plot: Summarize Simulations from '"hhh4"' Models
- hhh4_update: 'update' a fitted '"hhh4"' model
- hhh4_validation: Predictive Model Assessment for 'hhh4' Models
- hhh4_W: Power-Law and Nonparametric Neighbourhood Weights for...
- husO104Hosp: Hospitalization date for HUS cases of the STEC outbreak in...
- imdepi: Occurrence of Invasive Meningococcal Disease in Germany
- influMen: Influenza and meningococcal infections in Germany, 2001-2006
- inside.gpc.poly: Test Whether Points are Inside a '"gpc.poly"' Polygon
- intensityplot: Plot Paths of Point Process Intensities
- intersectPolyCircle: Intersection of a Polygonal and a Circular Domain
- isoWeekYear: Find ISO week and ISO year of a vector of Date objects on...
- isScalar: Checks if the Argument is Scalar
- knox: Knox Test for Space-Time Interaction
- ks.plot.unif: Plot the ECDF of a uniform sample with Kolmogorov-Smirnov...
- layout.labels: Layout Items for 'spplot'
- linelist2sts: Convert individual case information based on dates into an...
- loglikelihood: Calculation of the loglikelihood needed in algo.hhh
- LRCUSUM.runlength: Run length computation of a CUSUM detector
- m1: RKI SurvStat Data
- magic.dim: Returns a suitable k1 x k2 for plotting the disProgObj
- make.design: Create the design matrices
- makePlot: Plot Generation
- marks: Import from package 'spatstat'
- meanResponse: Calculate mean response needed in algo.hhh
- measlesDE: Measles in the 16 states of Germany
- measles.weser: Measles in the Weser-Ems region of Lower Saxony, Germany,...
- meningo.age: Meningococcal infections in France 1985-1995
- MMRcoverageDE: MMR coverage levels in the 16 states of Germany
- momo: Danish 1994-2008 all cause mortality data for six age groups
- multiplicity: Import from package 'spatstat'
- multiplicity.Spatial: Count Number of Instances of Points
- nbOrder: Determine Neighbourhood Order Matrix from Binary Adjacency...
- nowcast: Adjust a univariate time series of counts for observed...
- pairedbinCUSUM: Paired binary CUSUM and its run-length computation
- permutationTest: Monte Carlo Permutation Test for Paired Individual Scores
- pit: Non-Randomized Version of the PIT Histogram (for Count Data)
- plapply: Verbose and Parallel 'lapply'
- plot.atwins: Plot results of a twins model fit
- plot.disProg: Plot Generation of the Observed and the defined Outbreak...
- plot.survRes: Plot a survRes object
- poly2adjmat: Derive Adjacency Structure of '"SpatialPolygons"'
- polyAtBorder: Indicate Polygons at the Border
- predict.ah: Predictions from a HHH model
- primeFactors: Prime number factorization
- print.algoQV: Print quality value object
- qlomax: Quantile Function of the Lomax Distribution
- R0: Computes reproduction numbers from fitted models
- ranef: Import from package 'nlme'
- readData: Reading of Disease Data
- refvalIdxByDate: Compute indices of reference value using Date class
- residuals.ah: Residuals from a HHH model
- residualsCT: Extract Cox-Snell-like Residuals of a Fitted Point Process
- rotaBB: Rotavirus cases in Brandenburg, Germany, during 2002-2013...
- runifdisc: Sample Points Uniformly on a Disc
- salmAllOnset: Salmonella cases in Germany 2001-2014 by data of symptoms...
- salmHospitalized: Hospitalized Salmonella cases in Germany 2004-2014
- salmNewport: Salmonella Newport cases in Germany 2004-2013
- salmonella.agona: Salmonella Agona cases in the UK 1990-1995
- scale.gpc.poly: Centering and Scaling a '"gpc.poly"' Polygon
- shadar: Salmonella Hadar cases in Germany 2001-2006
- simHHH: Simulates data based on the model proposed by Held et. al...
- sim.pointSource: Simulate Point-Source Epidemics
- sim.seasonalNoise: Generation of Background Noise for Simulated Timeseries
- stcd: Spatio-temporal cluster detection
- stK: Diggle et al (1995) K-function test for space-time clustering
- stsAggregate: Aggregate an '"sts"' Object Over Time or Across Units
- sts_animate: Animated Maps and Time Series of Disease Counts or Incidence
- stsBP-class: Class "stsBP" - a class inheriting from class 'sts' which...
- sts-class: Class '"sts"' - surveillance time series
- sts_creation: Function for simulating a time series
- stsNC-class: Class "stsNC" - a class inheriting from class 'sts' which...
- stsNClist_animate: Animate a sequence of nowcasts
- stsNewport: Salmonella Newport cases in Germany 2004-2013
- sts_observation: Function for creating a sts-object with a given observation...
- stsplot: Plot-Methods for Surveillance Time-Series Objects
- stsplot_space: Map of Disease Counts/Incidence accumulated over a Given...
- stsplot_spacetime: Map of Disease Incidence
- stsplot_time: Time-Series Plots for '"sts"' Objects
- stsSlots: Generic functions to access '"sts"' slots
- stsXtrct: Extraction and Subsetting of '"sts"' Objects
- sumNeighbours: Calculates the sum of counts of adjacent areas
- surveillance.options: Options of the 'surveillance' Package
- surveillance-package: \Sexpr[stage=build]{(meta <-...
- test: Print xtable for several diseases and the summary
- testSim: Print xtable for a Simulated Disease and the Summary
- toFileDisProg: Writing of Disease Data
- toLatex.sts: 'toLatex'-Method for '"sts"' Objects
- twinSIR: Fit an Additive-Multiplicative Intensity Model for SIR Data
- twinSIR_cox: Identify Endemic Components in an Intensity Model
- twinSIR_exData: Toy Data for 'twinSIR'
- twinSIR_intensityplot: Plotting Paths of Infection Intensities for 'twinSIR' Models
- twinSIR_methods: Print, Summary and Extraction Methods for '"twinSIR"' Objects
- twinSIR_profile: Profile Likelihood Computation and Confidence Intervals
- twinSIR_simulation: Simulation of Epidemic Data
- twinstim: Fit a Two-Component Spatio-Temporal Point Process Model
- twinstim_epitest: Permutation Test for Space-Time Interaction in '"twinstim"'
- twinstim_iaf: Temporal and Spatial Interaction Functions for 'twinstim'
- twinstim_iafplot: Plot the Spatial or Temporal Interaction Function of a...
- twinstim_intensity: Plotting Intensities of Infection over Time or Space
- twinstim_methods: Print, Summary and Extraction Methods for '"twinstim"'...
- twinstim_plot: Plot methods for fitted 'twinstim"s
- twinstim_profile: Profile Likelihood Computation and Confidence Intervals for...
- twinstim_siaf: Spatial Interaction Function Objects
- twinstim_siaf_simulatePC: Simulation from an Isotropic Spatial Kernel via Polar...
- twinstim_simulation: Simulation of a Self-Exciting Spatio-Temporal Point Process
- twinstim_step: Stepwise Model Selection by AIC
- twinstim_tiaf: Temporal Interaction Function Objects
- twinstim_update: 'update'-method for '"twinstim"'
- unionSpatialPolygons: Compute the Unary Union of '"SpatialPolygons"'
- untie: Randomly Break Ties in Data
- wrap.algo: Multivariate Surveillance through independent univariate...
- xtable.algoQV: Xtable quality value object
- zetaweights: Power-Law Weights According to Neighbourhood Order