twCalcLogDenPar: twCalcLogDenPar

Description Usage Arguments Value Author(s) See Also Examples

View source: R/twCalcLogDenPar.R

Description

Invokes fLogDen with proposal in a parallel load balanced way.

Usage

1
2
3
twCalcLogDenPar(fLogDen, xProp, logDenCompX = NULL, intResComp = character(0), 
    argsFLogDen = list(), debugSequential = FALSE, remoteDumpfileBasename = NULL, 
    ...)

Arguments

fLogDen

the objective function

xProp

numeric matrix (nCases x nParm) of proposals

logDenCompX

all components of logDensity of xProp (result of fLogDen) colnames must contain intResCompNames rows: number of cases in xProp

intResComp

character vector: names of results components of fLogDen that are used for internal Metropolis decisions

argsFLogDen

arguments passed to fLogDen

debugSequential

see sfFArgsApplyLB

remoteDumpfileBasename

see sfRemoteWrapper

...

further arguments passed to fLogDen

Value

List with the following items

logDen

numeric vector: for each state: the sum of logDens over all components

logDenComp

numeric matrix: return components of fLogDen, one row for each state, columns: components

Author(s)

Thomas Wutzler

See Also

twDEMCBlockInt

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data(twdemcEx1)
xProp <- stackChains(twdemcEx1)[,-1]

data(twLinreg1)
attach( twLinreg1 )
res <- twCalcLogDenPar(logDenGaussian,xProp
	,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
)
str(res)

twDEMC documentation built on May 31, 2017, 3:44 a.m.