pg_splm: Bayesian Polya-gamma regression

View source: R/pg_splm.R

pg_splmR Documentation

Bayesian Polya-gamma regression

Description

this function runs the Bayesian multinomial regression using Polya-gamma data augmentation

Usage

pg_splm(
  Y,
  X,
  locs,
  params,
  priors,
  corr_fun = "exponential",
  shared_covariance_params = TRUE,
  n_cores = 1L,
  inits = NULL,
  config = NULL,
  n_chain = 1,
  progress = FALSE,
  verbose = FALSE
)

Arguments

Y

is a n x J matrix of compositional count data.

X

is a n x p matrix of climate variables.

locs

is a n x 2 matrix of observation locations.

params

is a list of parameter settings. The list params must contain the following values:

  • n_adapt: A positive integer number of adaptive MCMC iterations.

  • n_mcmc: A positive integer number of total MCMC iterations post adaptation.

  • n_thin: A positive integer number of MCMC iterations per saved sample.

  • n_message: A positive integer number of frequency of iterations to output a progress message. For example, n_message = 50 outputs progress messages every 50 iterations.

priors

is the list of prior settings.

corr_fun

is a character that denotes the correlation function form. Current options include "matern" and "exponential".

shared_covariance_params

is a logical input that determines whether to fit the spatial process with component specifice parameters. If TRUE, each component has conditionally independent Gaussian process parameters theta and tau2. If FALSE, all components share the same Gaussian process parameters theta and tau2.

n_cores

is the number of cores for parallel computation using openMP.

inits

is the list of initial values if the user wishes to specify initial values. If these values are not specified, then the intital values will be randomly sampled from the prior.

config

is the list of configuration values if the user wishes to specify initial values. If these values are not specified, then default a configuration will be used.

n_chain

is the MCMC chain id. The default is 1.

progress

is a logical input that determines whether to print a progress bar.

verbose

is a logical input that determines whether to print more detailed messages.


jtipton25/pgR documentation built on July 8, 2022, 12:44 a.m.