rsglmm_inla: Restricted Spatial Generalized Linear Mixed model in INLA

View source: R/rsglmm_inla.R

rsglmm_inlaR Documentation

Restricted Spatial Generalized Linear Mixed model in INLA

Description

Fit a Restricted Spatial Generalized Linear Mixed model using INLA

Usage

rsglmm_inla(
  data,
  formula,
  family,
  E = NULL,
  n = NULL,
  proj = "none",
  nsamp = 1000,
  ...
)

Arguments

data

a data frame or list containing the variables in the model.

formula

an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted.

family

some current options are: "gaussian", "poisson" and "binomial"; the choice depending on the approach.

E

known component, in the mean for the Poisson likelihoods defined as E = exp(η), where η is the linear predictor. Default = 1

n

a vector containing the number of trials for the binomial likelihood, or the number of required successes for the nbinomial2 likelihood. Default value is set to 1..

proj

"none", "rhz" or "spock"

nsamp

number of samples. Default = 1000.

...

other parameters used in ?INLA::inla

Value

$unrestricted

A list containing

  • $sample: a sample of size nsamp for all parameters in the model

  • $summary_fixed: summary measures for the coefficients

  • $summary_hyperpar: summary measures for hyperparameters

  • $summary_random: summary measures for random quantities

$restricted

A list containing

  • $sample: a sample of size nsamp for all parameters in the model

  • $summary_fixed: summary measures for the coefficients

  • $summary_hyperpar: summary measures for hyperparameters

  • $summary_random: summary measures for random quantities

$out

INLA output

$time

time elapsed for fitting the model


DouglasMesquita/RASCO documentation built on Nov. 16, 2022, 9:42 p.m.