Description Usage Arguments Author(s) Examples
Initialize twDEMCBlockInt
by array of initial population and remove those generations from results afterwards
1 2 3 4 |
x |
initial population: a numeric array (M0 x d x nChain) see details in |
... |
further arguments to |
nPop |
number of populations in x |
X |
initial state (nParm x nChain) |
logDenCompX |
numeric matrix (nResComp x nChains) initial state |
upperParBounds |
list of named numeric vectors: giving upper parameter bounds for each population for exploring subspaces of the limiting distribution, see details , Alternatively a single numeric vector can be supplied, which is replicated for each population. |
lowerParBounds |
similar to upperParBounds |
Thomas Wutzler
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | data(twLinreg1)
attach( twLinreg1 )
argsFLogDen <- list(
fModel=dummyTwDEMCModel, ### the model function, which predicts the output based on theta
obs=obs, ### vector of data to compare with
invCovar=invCovar, ### the inverse of the Covariance of obs (its uncertainty)
thetaPrior = thetaTrue, ### the prior estimate of the parameters
invCovarTheta = invCovarTheta, ### the inverse of the Covariance of the prior parameter estimates
xval=xval
)
do.call( logDenGaussian, c(list(theta=theta0),argsFLogDen))
.nPop = 2
Zinit <- initZtwDEMCNormal( theta0, diag(sdTheta^2), nChainPop=4, nPop=.nPop)
dim(Zinit)
.nGen=100
#nGen=3
#mtrace(twDEMC.array)
#mtrace(.updateIntervalTwDEMCPar)
#mtrace(twDEMCBlockInt)
tmp1 <- tmp <- twDEMCBlock( Zinit, nPop=.nPop
,dInfos=list(list(fLogDen=logDenGaussian, argsFLogDen=argsFLogDen))
,nGen=.nGen
)
plot( as.mcmc.list(tmp), smooth=FALSE )
tmp2 <- tmp <- twDEMCBlock( tmp1, nGen=200 )
str(tmp)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.