ramps.control {ramps} | R Documentation |
Auxiliary for Controlling georamps Model Fitting
Description
Auxiliary function that provides a user interface to control the georamps
model fitting algorithm.
Usage
ramps.control(iter = 1000, beta, sigma2.e, phi, sigma2.z, sigma2.re,
z.monitor = TRUE, mpdfun = c("mpdbeta", "mpdbetaz"), file)
Arguments
iter |
numerical value indicating the number of consecutive MCMC samples to generate, or a vector indicating specific iterations to monitor. |
beta |
|
sigma2.e |
|
phi |
|
sigma2.z |
|
sigma2.re |
|
z.monitor |
logical value indicating whether to monitor the latent spatial parameters, or data frame containing a subset of the coordinates at which to monitor the parameters. |
mpdfun |
character string giving the type of marginalized posterior density used for slice sampling and calculation of the data likelihood. Default is marginalization with respect to the beta parameters |
file |
vector or list of character strings specifying external files to which to save monitored parameters. Elements of the object named “params” and “z” will be taken to be the output files for model parameters and latent parameters, respectively. If these element names are not supplied, then the first element is taken to be the “params” output file and the second the “z” output file. Defaults to no external outputting of monitored parameters. |
Details
Tuning parameters may be set for the sigma2
and phi
arguments via the param
function. If a user-defined prior is specified, then tuning parameters must be supplied and are taken to be the initial widths of the slice sampling windows. Otherwise, tuning parameters are taken to be factors by which the initial widths are multiplied. Separate tuning parameters may be set for each of the arguments. However, only the minimum of all sigma2
tuning parameters is used in the sampling of those parameters.
Value
A list containing the following components:
iter |
sorted numerical vector of unique MCMC iterations to be monitored. |
beta |
|
sigma2.e |
|
phi |
|
sigma2.z |
|
sigma2.re |
|
z |
list with element: |
mpdfun |
character string specifying the marginalized posterior distribution. |
file |
list with elements: |
expand |
non-negative integer value indicating the starting point of the MCMC sampler, initialized to zero. |
Author(s)
Brian Smith brian-j-smith@uiowa.edu
See Also
Examples
ctrl <- ramps.control(
iter = seq(1, 100, by = 2),
beta = param(rep(0, 2), "flat"),
sigma2.e = param(rep(1, 2), "invgamma", shape = 2.0, scale = 0.1),
phi = param(10, "uniform", min = 0, max = 100, tuning = 0.5),
sigma2.z = param(1, "invgamma", shape = 2.0, scale = 0.1),
file = c("params.txt", "z.txt")
)