survspat: survspat function

Description Usage Arguments Value References See Also

View source: R/survspat.R

Description

A function to run a Bayesian analysis on censored spatial survial data assuming a proportional hazards model using an adaptive Metropolis-adjusted Langevin algorithm.

Usage

1
2
3
survspat(formula, data, dist, cov.model, mcmc.control, priors, shape = NULL,
  ids = list(shpid = NULL, dataid = NULL),
  control = inference.control(gridded = FALSE), boundingbox = NULL)

Arguments

formula

the model formula in a format compatible with the function flexsurvreg from the flexsurv package

data

a SpatialPointsDataFrame object containing the survival data as one of the columns OR for polygonal data a data.frame, in which case, the argument shape must also be supplied

dist

choice of distribution function for baseline hazard. Current options are: exponentialHaz, weibullHaz, gompertzHaz, makehamHaz, tpowHaz

cov.model

an object of class covmodel, see ?covmodel ?ExponentialCovFct or ?SpikedExponentialCovFct

mcmc.control

mcmc control parameters, see ?mcmcpars

priors

an object of class Priors, see ?mcmcPriors

shape

when data is a data.frame, this can be a SpatialPolygonsDataFrame, or a SpatialPointsDataFrame, used to model spatial variation at the small region level. The regions are the polygons, or they represent the (possibly weighted) centroids of the polygons.

ids

named list entry shpid character string giving name of variable in shape to be matched to variable dataid in data. dataid is the second entry of the named list.

control

additional control parameters, see ?inference.control

boundingbox

optional bounding box over which to construct computational grid, supplied as an object on which the function 'bbox' returns the bounding box

Value

an object inheriting class 'mcmcspatsurv' for which there exist methods for printing, summarising and making inference from.

References

  1. Benjamin M. Taylor and Barry S. Rowlingson (2017). spatsurv: An R Package for Bayesian Inference with Spatial Survival Models. Journal of Statistical Software, 77(4), 1-32, doi:10.18637/jss.v077.i04.

See Also

tpowHaz, exponentialHaz, gompertzHaz, makehamHaz, weibullHaz, covmodel, linkExponentialCovFct, SpikedExponentialCovFct, mcmcpars, mcmcPriors, inference.control


spatsurv documentation built on May 19, 2017, 10:15 a.m.

Search within the spatsurv package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.