Description Usage Arguments Details Author(s)
Calculates the size of the population for each time step based on the observed sample size.
1 | generate_popSize<-function(sampleSize, nSamples, timePoints, sMean, sVariance)
|
sampleSize |
vector of sample sizes at time points tj, j=1,...,nSamples |
timePoints |
vector specifying the time points tj, j=1,...,nSamples |
nSamples |
number of observed samples |
sMean |
mean value of the ratio s between sample size and population size |
sVariance |
variance of the ratio s between sample size and population size |
This function will generate a vector of size (tnSamples-t1+1) containing an estimate of the population size at each intermediate time step. The estimation assumes that the sample size is a fraction of population size at tj, j=1,...,nSamples. In detail it holds N(tj)=1/s*n(tj) with s being normally distributed with mean sMean and variance sVariance. Population sizes at intermediate time points are obtained by linear interpolation.
Clementine Straub
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.