initZtwDEMCNormal: initZtwDEMCNormal

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Generate an initial population of states for twDEMCBlockInt.

Usage

1
2
3
initZtwDEMCNormal(thetaPrior, covarTheta, nChainPop = 4, nPop = 2, 
    m0 = ceiling(calcM0twDEMC(length(thetaPrior), nChainPop)/(m0FiniteFac)), 
    m0FiniteFac = 1, doIncludePrior = TRUE)

Arguments

thetaPrior

numeric vector (nParm) of point estimate of the mean

covarTheta

numeric matrix (nParm x nParm) the covariance of parameters. << Alternatively, can be given as vector (nParm) of the diagonal, i.e. variances, if all dimensions are independent

nChainPop

number of chains to run

nPop

number of independent populations among the chains

m0

number of initial states for each chain

m0FiniteFac

use a factor smaller than 1 to increase default m0 to account for only a portion of proposal results in finite densities

doIncludePrior

If TRUE, then set last sample of chain 1 to the prior estimate, which might be already a kind of best estimates by an optimization.

Details

There are several methods to establish the initial population for a twDEMC run.

Value

a matrix of number of parameters by number of individuals (m0 x d x Npop), with d dimension of theta

Author(s)

Thomas Wutzler

See Also

twDEMCBlockInt calcM0twDEMC

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(twLinreg1)
attach( twLinreg1 )

.nChainPop=4
.nPop=2
.nPar=length(theta0)
Zinit <- initZtwDEMCNormal( theta0, diag(sdTheta^2), nChainPop=.nChainPop, nPop=.nPop)
head(Zinit[,,1])
all.equal( c(calcM0twDEMC(.nPar,.nChainPop), .nPar, .nChainPop*.nPop), dim(Zinit) )

detach()

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