het.population: Sample Population with Heterogeneous Contact Rates

View source: R/heterogeneityTutorial.R

het.populationR Documentation

Sample Population with Heterogeneous Contact Rates

Description

Create a sample of individuals with heterogeneous contact rates

Usage

het.population(n, beta.mean, beta.var, seed)

Arguments

n

Number of individuals in the population

beta.mean

Mean contact rate

beta.var

Variance of contact rate

seed

Seed for random number generation

Details

Per ?rgamma, the gamma distribution is parameterized by shape and scale parameters. These parameters are related to the mean by

E(X)=shape*scale

and the variance by

Var(X)=shape*scale^2

.

Value

A numeric vector of contact rates, sorted from highest to lowest

See Also

Other heterogeneity: het.hist(), het.run(), sample_pair(), sample_until()

Examples

require(ICI3D)
egpop <- het.population(1000, 2, .5)
het.hist(egpop, 2)

ICI3D/ici3d-pkg documentation built on July 2, 2024, 12:35 p.m.