- y
matrix of multivariate outcomes with \(n\) rows and \(q\) columns. Each row of y corresponds to a row of coords. NA values are accepted in any combination and will be predicted via MCMC.
- x
matrix of covariates with \(n\) rows and \(p\) columns.
- coords
matrix of coordinates with \(n\) rows and \(d=2\) or \(d=3\) columns for spatial or spacetime regression, respectively.
- k
integer \(k\leq q\), number of latent processes to use for the linear model of coregionalization. If unspecified, this is set to \(q\)=ncol(y).
- family
a vector with length \(1\) or \(q\) whose elements corresponds to the data types of columns of y. Available choices are gaussian, poisson, binomial, beta for outcomes that are continuous, count, binary, or \((0,1)\) proportions.
- axis_partition
integer vector of size \(d\): number of intervals each coordinate axis is split into
- block_size
integer approximate size of the blocks after domain partitioning. Only used if axis_partition is not specified.
- grid_size
integer vector of size \(d\): number of 'knots' of the reference grid along each axis.
This grid is then partitioned using either axis_partition or block_size.
If unspecified, this is set so that the eventual grid size is close to \(n\).
This parameter is ignored if settings$forced_grid=FALSE in which case the data are assumed to be on a grid.
- grid_custom
list with elements grid and axis_interval_partition. grid is a data.frame with the user supplied grid of knots. It is possible to include covariate values for the grid locations as additional columns, as long as their number matches ncol(x) - this is useful to make raster images of predictions. axis_interval_partition is the user supplied set of cuts for each coordinate axis (Note: these are the actual cutpoints along the axes, not the number of cuts). If left empty, axis_partition will be used to partition the custom grid. No checks are made on the validity of this grid. This parameter is ignored if settings$forced_grid=FALSE in which case the data are assumed to be on a grid.
- n_samples
integer number of MCMC samples at which all the unknowns are stored (including the latent effects).
- n_burnin
integer number of MCMC samples to discard at the beginning of the chain.
- n_thin
integer thinning parameter for the MCMC chain. Only the chain of latent effects (\(w\)) is thinned to save memory in big data problems. Chains for other unknowns are not thinned and thus will be of length n_thin * n_samples.
- n_threads
integer number of OpenMP threads. This is ineffective if meshed was not compiled with OpenMP support.
- verbose
integer. If verbose<=20, then this is the number of times a message is displayed during MCMC. If verbose>20, then this is the number of MCMC iterations to wait until the next message update. If verbose=Inf, then a message will be printed at each MCMC iteration.
- predict_everywhere
bool used if settings$forced_grid=T. Should predictions be made at the reference grid locations? If not, predictions will be made only at the supplied NA values of Y.
- settings
list: settings$adapting turns the adaptation of MCMC on/off, settings$forced_grid determines whether or not to use the data grid or a forced grid; if unspecified, the function will try to see what the data look like. Note: if forced_grid=FALSE and \(n\) is very large and \(coords\) are irregularly spaced, then expect slowdowns in preprocessing and consider using forced_grid=TRUE instead. settings$saving will save model data if set to TRUE. settings$low_mem will only save beta_mcmc, lambda_mcmc, v_mcmc, tausq_mcmc (and not w_mcmc and lp_mcmc, which can be recovered from the others), thereby using less memory. All fitted predictions remain available in yhat_mcmc for convenience. settings$ps (default TRUE) determines whether to use the PS parametrization (Peruzzi et al 2021). settings$hmc, used if any outcome is not Gaussian, (1: MALA, 2: NUTS, 3: RM-MALA, 4: Simplified manifold preconditioning (default))
- prior
list: setup for priors of unknown parameters. prior$phi needs to be specified as the support of the Uniform prior for \(\phi\). There is currently limited functionality here and some inputs are currently ignored. Defaults are: a vague Gaussian for \(\beta\), \(\tau^2_i \sim IG(2,1)\), \(\theta_j \sim IG(2,2)\), all subject to change.
- starting
list: setup for starting values of unknown parameters. starting$mcmcsd is the initial standard deviation of proposals. starting$mcmc_startfrom is input to the adaptive MCMC and can be used to manually restart MCMC. There is currently limited functionality here and some parameters may be ignored.
- debug
list: setup for debugging things. Some parts of MCMC can be turned off here.
- indpart
bool defaults to FALSE. If TRUE, this computes an independent partition model.