MCMCinput: Settings for the MCMC Algorithm

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

Description

This function sets up the parameters and initial values used for the MCMC algorithms.

Usage

1
2
3
4
5
6
7
MCMCinput(run = 200, run.S = 1, rho.family = "rhoPowerExp", 
        Y.family = "Poisson", 
        priorSigma = "Halft", parSigma = c(1, 1),
        ifkappa = 0, 
        scales = c(0.5, 1.65^2 + 0.8, 0.8, 0.7, 0.15), 
        phi.bound = c(0.005, 1), 
        initials = list(c(1), 1.5, 0.2, 1))

Arguments

run

the number of iterations

run.S

the number of internal iterations for latent variables

rho.family

take the value of "rhoPowerExp", "rhoMatern", or "rhoSph" which indicates the powered exponential, Matern, or Spherical correlation function is used

Y.family

take the value of "Poisson" or "Binomial" which indicates Poisson or Binomial distribution for response variables

priorSigma

the prior distribution for σ, the options include "Halft" (positive-truncated t distribution), "InvGamma" (inverse gamma distribution), and "Reciprocal" (reciprocal distribution)

parSigma

the parameters for the prior distribution of σ: when priorSigma = "Halft" the first parameter is scale and the second is degree of freedom; when priorSigma = "InvGamma" the first parameter is shape and the second is scale; when priorSigma = "Reciprocal" both parameters are ignored

ifkappa

take zero or non-zero value which indicates whether κ should be sampled

scales

a vector which indicates the tuning parameters for (S, β, σ,φ,κ) respectively

phi.bound

the upper and lower bound for φ

initials

a list which indicates the initial values for (β, σ,φ,κ) respectively

Details

During each iteration of Gibbs sampling process, the group of latent variables is updated "run.S" times to improve accuracy and reduce autocorrelations.

Value

A list of setting parameters.

Author(s)

Liang Jing ljing918@gmail.com

See Also

runMCMC, runMCMC.sf.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
  input <- MCMCinput( run = 10000, run.S = 10, 
          rho.family = "rhoPowerExp", 
          Y.family = "Poisson", 
          priorSigma = "Halft", parSigma = c(1, 1),
          ifkappa=0,
          scales=c(0.5, 1.5, 0.9, 0.6, 0.5), 
          phi.bound=c(0.005, 1), 
          initials=list(c(-1, 2, 1), 1, 0.1, 1) )
  res <- runMCMC(Y, L=0, loc=loc, X=loc, MCMCinput = input )

## End(Not run)

geoCount documentation built on May 2, 2019, 12:38 a.m.

Related to MCMCinput in geoCount...