Description Usage Arguments Author(s) See Also Examples
Reduces the rows of an twDEMCPops object (list returned by twDEMCBlockInt
) to correspond to a thinning of newThin
.
1 2 3 |
x |
the twDEMCPops list to thin |
newThin |
finite numeric scalar: the target thinning factor, must be positive multiple of x$thin |
start |
numeric scalar: the start time of the chain. Note that time starts from zero. If a vector or matrix is supplied (e.g. nGenBurnin) then the maximum is used |
end |
numeric vector the maximum end time of the populations. Note that time starts from zero. If a scalar is supplied, then it is repeateed NPop times |
... |
|
doKeepBatchCall |
wheter to retain the batch call attribute of x |
Thomas Wutzler
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | if( FALSE ){
#mtrace(thin.twDEMCPops)
tmp <- thin(res, start=4, newThin=8 )
all.equals( c(1, 11), getNSamples(tmp))
}
data(twdemcEx1)
x <- twdemcEx1
c( nGen=getNGen(twdemcEx1), thin=twdemcEx1$thin, nSample=getNSamples(twdemcEx1) )
.nGenBurnin <- max(getNGen(twdemcEx1))-50
thinned <- thin(twdemcEx1, start=.nGenBurnin) # removing burnin period
c( nGen=getNGen(thinned), thin=thinned$thin, nSample=getNSamples(thinned) ) #13 sample describing 48 generations
thinned <- thin(twdemcEx1, start=.nGenBurnin, newThin=8)
c( nGen=getNGen(thinned), thin=thinned$thin, nSample=getNSamples(thinned), nGenBurnin=thinned$nGenBurnin ) #7 samples describing 48 generations
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.