thin.twDEMCPops: thin twDEMCPops

Description Usage Arguments Author(s) See Also Examples

Description

Reduces the rows of an twDEMCPops object (list returned by twDEMCBlockInt) to correspond to a thinning of newThin.

Usage

1
2
3
## S3 method for class 'twDEMCPops'
thin(x, newThin = x$thin, start = 0, end = NA, ..., 
    doKeepBatchCall = FALSE)

Arguments

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

Author(s)

Thomas Wutzler

See Also

subset.twDEMCPops

Examples

 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

twDEMC documentation built on May 2, 2019, 5:38 p.m.