popMeansTwDEMC: popMeansTwDEMC

Description Usage Arguments Author(s) See Also Examples

Description

Calculating population means across chains within each population, and smooth time series.

Usage

1
popMeansTwDEMC(x, nPop, kSmooth = NULL)

Arguments

x

a matrix with columns chains

nPop

number of populations

kSmooth

weights to the filter function, or just number of points

Author(s)

Thomas Wutzler

See Also

popApplyTwDEMC subChains.twDEMC

Examples

1
2
3
4
5
6
7
8
9
data(twdemcEx1)
ex1c <- concatPops(twdemcEx1)
# mean logDen for each case, i.e. step, by population
#mtrace(popMeansTwDEMC)
res1 <- popMeansTwDEMC( ex1c$logDen[,1,], nPop=getNPops(ex1c) )
matplot(res1)
# shifting mean across 4 cases
res2 <- popMeansTwDEMC( ex1c$logDen[,1,], nPop=getNPops(ex1c), kSmooth=5 )
matplot(res2, type="l", add=TRUE)

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