View source: R/accept.calculate.r
accept.calculate | R Documentation |
Calculate acceptance rates of parameters in the IFM.
accept.calculate(x, model = c("naive", "missing", "robust"))
x |
A named list with the MCMC chains estimated by ifm.naive.MCMC, ifm.missing.MCMC, or ifm.robust.MCMC. |
model |
Either "naive", "missing", or "robust" |
Named list containing MCMC chain acceptance rates. Names are built from the input list, e.g., for model=“naive":
acc.b.chain |
Acceptance rates of parameter b |
acc.e.chain |
Acceptance rates of parameter e |
acc.y.chain |
Acceptance rates of parameter y |
acc.alpha.chain |
Acceptance rates of parameter alpha |
acc.x.chain |
Acceptance rates of parameter x |
Benjamin Risk
data(simulatedifm) # Here, we run a chain with random initial values: init1=list(alpha=runif(1,1,30), b=runif(1,0,5),y=runif(1,0,20),e=runif(1,0,1),x=runif(1,0,5)) inm1 <- ifm.naive.MCMC(niter=1000,init=init1,z.data = z.sim,site.distance=sim.distance,site.area=sim.area, sd.prop.alpha=4,sd.prop.b=0.6,sd.prop.y=40,sd.prop.e=0.05,sd.prop.x=0.4,nthin=1,print.by=100) accept.calculate(inm1,model='naive')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.