st_tgmrf: Spatio-temporal Transformed Gaussian Markov Random Field

View source: R/st_tgmrf.R

st_tgmrfR Documentation

Spatio-temporal Transformed Gaussian Markov Random Field

Description

Uses this function to fit spatio-temporal data using non-guassian copulas.

Usage

st_tgmrf(y, X, n_reg, n_var, beta, nu, eps, mu, rho_s, rho_t, rho_st, tau,
  family, type, mat_type, method, nsim, burnin, thin, E, n, neigh,
  prior_param, MCMC_config, fix_rho, range, verbose, c_beta, c_eps, c_mu,
  c_nu, c_rho, conj_beta)

Arguments

y

Response variable

X

Matrix or data.frame of covariates

n_reg

Number of regions in study

n_var

Number of variables in study

beta

Vector of the initial values to coeficients vector

nu

A Initial value to variance of copula

rho_s

Spatial dependence parameter

rho_t

Temporal dependence parameter

rho_st

Spatio-temporal dependence parameter

tau

Vector of precisions of variables

family

'Poisson' or 'Binary'

type

Depends of family. 'lognormal', 'lognormal-precision', 'gamma-shape', 'gamma-scale', 'weibull-shape', 'weibull-scale' for Poisson family 'beta-logit', 'beta-probit', 'beta-alpha', 'beta-beta' for Binomial family

mat_type

car or leroux

method

'arms' or 'metropolis'

nsim

Number of MCMC iterations

burnin

number of discards iterations

thin

Lag to collect the observations

E

Offsets for Poisson data

n

Number of trials in Binomial data

neigh

Neighborhood structure of nb class or a neighborhood matrix

prior_param

List of priors parameters. Gaussian for beta vector and IGamma for nu. Entrys are: 'nu' and 'beta'

MCMC_config

Parameters to tunning MCMC

fix_rho

A list informing if any rho (rho_s, rho_t, rho_st) is fixed

range

Range to use during the MCMC. Entrys are: 'rho_s', 'rho_t' and 'rho_st'

range

A list informing a range for sampling rho (rho_s, rho_t, rho_st). Each entre must be a vector in the interval (-1, 1).

Value

beta A matrix with samples of beta

nu A vector with samples of nu

rho A vector with samples of rho

Examples

s_tgmrf(1,1,1,1)


DouglasMesquita/TGMRF documentation built on May 28, 2022, 8:34 p.m.