Auxiliary function that provides a user interface to control the georamps
model fitting algorithm.
ramps.control(iter = 1000, beta, sigma2.e, phi, sigma2.z, sigma2.re,
z.monitor = TRUE, mpdfun = c("mpdbeta", "mpdbetaz"), file)
A list containing the following components:
sorted numerical vector of unique MCMC iterations to be monitored.
'param'
object of initial values for the main effects coefficients.
'param'
object of initial values for the measurement error variances.
'param'
object of initial values for the spatial correlation parameters.
'param'
object of initial values for the spatial variances.
'param'
object of initial values for the random effects variances.
list with element: monitor
containing a logical monitoring indicator for the latent spatial parameters or a data frame of coordinates at which to monitor the parameters.
character string specifying the marginalized posterior distribution.
list with elements: params
and z
character strings specifying external files to which to save monitored model and spatial parameters.
non-negative integer value indicating the starting point of the MCMC sampler, initialized to zero.
numerical value indicating the number of consecutive MCMC samples to generate, or a vector indicating specific iterations to monitor.
'param'
object of initial values and hyperparameters for the main effects coefficients. Flat priors are currently supported for these parameters. Argument is optional if no main effects appear in the model.
'param'
object of initial values and hyperparameters for the measurement error variances. Inverse-gamma priors are currently supported. Argument is optional if no measurement error variances appear in the model.
'param'
object of initial values and hyperparameters for the spatial correlation parameters. Uniform and user-defined priors are currently supported. Argument is optional if no correlation parameters appear in the model.
'param'
object of initial values and hyperparameters for the spatial variances. Inverse-gamma priors are currently supported. Argument is optional if no spatial variances appear in the model.
'param'
object of initial values and hyperparameters for the random effects variances. Inverse-gamma priors are currently supported. Argument is optional if no random effects appear in the model.
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.
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 "mpdbeta"
, and the alternative is with respect to both the beta and z parameters "mpdbetaz"
. The latter may provide faster MCMC sampling when analyzing data with multiple observation per measurement site. The two options generate samples from the same posterior distribution.
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.
Brian Smith brian-j-smith@uiowa.edu
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.
georamps
,
param
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")
)
Run the code above in your browser using DataLab