
Spatial epidemiology: ZIP Gibbs, kernel relative risk, Oden Ipop, prospective scan, ecological regression, wombling
Source:R/SpatialEpi2.R
ZipGibbs.RdZipGibbs: Bayesian zero-inflated Poisson relative risks by data
augmentation with Marsaglia-Tsang gammas on Philox streams.
KernelRelativeRisk: Kelsall-Diggle Gaussian-kernel log relative risk.
OdenIpop: Oden's population-adjusted Moran statistic with a
multinomial Monte Carlo test. ProspectiveScan: Kulldorff's
prospective space-time scan (Poisson, windows ending at the last time).
PoissonEcological: IRLS Poisson regression with offset and
quasi-Poisson scale. ArealWombling: boundary likelihood values on
adjacent pairs and barrier edges. BufferRateRatio: exposure-zone
rate ratio with a conditional binomial test. NeedBasedAllocation:
weighted capitation. FunnelControlLimits: Spiegelhalter funnel
limits. GhoseDrugFilter: the Ghose drug-likeness rule. Indices
are 0-based, as the Python arm.
Usage
ZipGibbs(y, expected, n_iter, a = 1, b = 1, burn = 0, seed = 0)
KernelRelativeRisk(cases, controls, points, bandwidth)
OdenIpop(cases, population, W, nsim = 0, seed = 0)
ProspectiveScan(
counts,
expected,
coords,
max_window = 3,
max_pop_frac = 0.5,
nsim = 99,
seed = 0
)
PoissonEcological(y, expected, X)
ArealWombling(values, A, quantile = 0.8)
BufferRateRatio(cases, population, coords, sources, radius)
NeedBasedAllocation(budget, population, need_index, floor_share = 0)
FunnelControlLimits(
target,
sizes,
z = c(1.95996398454005, 3.09023230616781),
kind = "proportion",
phi = 1
)
GhoseDrugFilter(mw, logp, mr, n_atoms)Arguments
- y, cases
Case counts.
- expected
Expected counts.
- n_iter, burn
Gibbs sweeps and burn-in.
- a, b
Gamma prior shape and rate.
- seed
Philox seed.
- controls
Control point coordinates.
- points
Evaluation points.
- bandwidth
Kernel bandwidth.
- population
Populations.
- W
Spatial weights (diagonal allowed).
- nsim
Monte Carlo replicates.
- counts
Times by regions case counts.
- coords
Region centroids.
- max_window
Longest time window.
- max_pop_frac
Largest share of the expected total in a zone.
- X
Covariates (an intercept is added).
- values
Area values.
- A
Adjacency matrix.
- quantile
Barrier quantile.
- sources
Point-source coordinates.
- radius
Buffer radius.
- budget
Total budget.
- need_index
Need indices.
Share of the budget split equally.
- target
Target proportion.
- sizes
Denominators or expected counts.
- z
Normal quantiles of the limits.
- kind
"proportion" or "smr".
- phi
Overdispersion factor.
- mw, logp, mr, n_atoms
Molecular weight, logP, molar refractivity and atom count.
References
Lambert, D. (1992). Technometrics 34, 1-14. Kelsall, J. E. and Diggle, P. J. (1995). Statistics in Medicine 14, 2335-2342. Oden, N. (1995). Statistics in Medicine 14, 17-26. Kulldorff, M. (2001). JRSS A 164, 61-72. Lu, H. and Carlin, B. P. (2005). Geographical Analysis 37, 265-285. Spiegelhalter, D. J. (2005). Statistics in Medicine 24, 1185-1202. Ghose, A. K. et al. (1999). J. Comb. Chem. 1, 55-68.