RunMCMC: Run MCMC to Fit Contour Model

Description Usage Arguments Value

Description

Run MCMC to Fit Contour Model

Usage

1
2
3
RunMCMC(n_iter, dists, x, xU_vecs, xU_years, xU_prop_sd, xU_lb, xU_ub, mu,
  mu0, lambda0, sigma, sigma_ind_1, sigma_ind_2, sigma_prop_cov, rho,
  rho0_lb, rho0_ub, rho_prop_sd, sigma0_lb, sigma0_ub, w)

Arguments

n_iter

number of iterations to run the MCMC

dists

symmetric matrix of the same dimension as the number of lines being used, specifying distances among starting locations or angles.

x

a matrix of observed distances (y) of dimension number of vectors by number of years

xU_vecs

vector giving the indices of each x value vector in each year that is not observed (vector indices and year indices are paired, so must be ordered the same as xU_years)

xU_years

vector giving the indices of each year in which each x value vector is not observed (vector indices and year indices are paired, so must be ordered the same as xU_vecs)

xU_prop_sd

Standard deviation for proposals for xU

xU_lb

Lower bounds for xU values being sampled (order must match orded of xU_vecs and xU_years)

xU_ub

Upper bounds for xU values being sampled (order must match orded of xU_vecs and xU_years)

mu

vector of the same length as the number of lines which specifies the values from which each element of mu will be initialized in the MCMC.

mu0

vector of the same length as the number of lines which specifies the prior mean for mu.

lambda0

matrix of the same dimension as the number of lines which specifices the prior covariance matrix for mu.

sigma

vector of the same length as the number of lines which specifies the values from which each element in sigma will be initialized from

sigma_ind_1

vector giving the first index of each section of sigma's to be sampled together

sigma_ind_2

vector giving the last index of each section of sigma's to be sampled together

sigma_prop_cov

covariance matrix of the same length as the number of lines that is used in sampling sigma values

rho

double between 0 and 1 from which the value of rho will be initialized

rho0_lb

double between 0 and 1 which gives the lower bound of the uniform prior for rho

rho0_ub

double between 0 and 1 which gives the upper bound of the uniform prior for rho.

rho_prop_sd

standard deviation for the normal proposal distribution used when proposing value for rho in the sampler. Defaults to 0.01

sigma0_lb

vector of the same length as the number of lines which specifies the lower bound of the uniform prior for each sigma value

sigma0_ub

vector of the same length as the number of lines which specifies the upper bound of the uniform prior for each sigma value.

w

Integer specifying how many samples of the parameters will be maintained. Samples from every wth iteration is stored.

Value

List of length 7 that gives the values of the MCMC chain for xU, mu, sigma and rho along with indicators of acceptance on each iteration: xURate, sigmaRate, and rhoRate.


IceCast documentation built on June 24, 2019, 9:03 a.m.