scv_stats: Poisson-Gamma systematic component of variation

Description Usage Arguments Value Examples

View source: R/scv_stats.R

Description

Extension of the empbaysmooth function in DCluster. Adds a computation of the SCV as 100* nu/alpha^2. Computes from simulations a bootstrapped variance and 95% CI of the SCV.

Usage

1
scv_stats(obsx, expx)

Arguments

obsx

observed cases for a given population

expx

expected cases from standardization of given population

Value

obs

exp

pval Probability of O/E ratio in empirical Poisson-Gamma distribution

smoothed Empirical bayes smoothing of O/E ratio

scv Systematic component of variation

scv_var Bootstrapped variance of the scv

scv_CI_low Bootstrapped lower 95% confidence interval of SCV

scv_CI_upp Bootstrapped upper 95% confidence interval of SCV

Examples

1
2
3
4
5
6
7
data(nc.sids, package= "spData")

obs<-nc.sids$SID74

exp<-nc.sids$BIR74*sum(nc.sids$SID74)/sum(nc.sids$BIR74)

scv_stats(obs,exp)

guidopowell/scv documentation built on Nov. 4, 2019, 1:24 p.m.