get.groups: Generate Time Series with Negative Binomial Distribution and...

Description Usage Arguments Details Value Source References See Also Examples

View source: R/get.groups.r

Description

rnbinom.gf generates one or more independent time series following the Gamma frailty model. The generated data has negative binomial marginal distribution and the underlying multivariate Gamma frailty an autoregressive covariance structure.

Usage

1
get.groups(n, size, lambda, rho, tp, trend)

Arguments

n

number of observations.

size

dispersion parameter (the shape parameter of the gamma mixing distribution). Must be strictly positive, need not be integer.

lambda

vector of means of trend parameters.

rho

correlation coefficient of the underlying autoregressive Gamma frailty. Must be between 0 and 1.

tp

number of observed time points.

trend

a string giving the trend which is to be simulated.

Details

The function relies on rnbinom.gf for creating data with underlying constant or exponential trends.

Value

get.groups returns a matrix of dimension n x tp with marginal negative binomial distribution with means corresponding to trend parameters lambda, common dispersion parameter size and a correlation induce by rho, the correlation coefficient of the autoregressive multivariate Gamma frailty.

Source

rnbinom.gf computes observations from a Gamma frailty model by Fiocco et. al. 2009 using code contributed by Thomas Asendorf.

References

Fiocco M, Putter H, Van Houwelingen JC, (2009), A new serially correlated gamma-frailty process for longitudinal count data Biostatistics Vol. 10, No. 2, pp. 245-257.

See Also

rnbinom.gf for information on the Gamma frailty model.

Examples

1
2
3
random<-get.groups(n=c(1000,1000), size=c(0.5, 0.5), lambda=c(1, 2), rho=c(0.6, 0.6), tp=7,
  trend="constant")
head(random)

spass documentation built on Jan. 13, 2021, 7:57 p.m.

Related to get.groups in spass...