rtgmrf_st: Random observations of a Transformed Gaussian Markov Random...

View source: R/rtgmrf_st.R

rtgmrf_stR Documentation

Random observations of a Transformed Gaussian Markov Random Field

Description

Use this function to simulate a data of a spatio-temporal TGMRF.

Usage

rtgmrf_st(rowid = 10, colid = 10, n_var = 2, X = NULL,
  neigh = NULL, n_trials = NULL, E = NULL, rho_s = 0.9,
  rho_t = 0, rho_st = 0, betas = c(-0.1, 0.3, 0.8), intercept = T,
  nu = 2, tau = 1, type_data = "gamma-shape", family = "poisson",
  mat_type = "car", seed = 1)

Arguments

rowid

Number of lines of a lattice. (Used if neigh = NULL)

colid

Number of columns of a lattice. (Used if neigh = NULL)

n_var

Number of variables in problem (for multivariate problems)

neigh

A object of class nb

rho_s

Spatial dependence parameter

rho_t

Temporal dependence parameter

rho_st

Spatio-temporal dependence parameter

betas

Coeficients

nu

Dispersion parameter for gamma models

tau

Vector of precisions of variables

type_data

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

family

'poisson' or 'binary'

seed

A seed to reproduce the reuslts

n

Vector with size of binomial trials

Value

y Response variable

X Covariates matrix

neigh Neighborhood structure

Q Covariance matrix

mu Means (TGMRF)

eps Errors (GMRF)


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