FitModel: Fit a model with INLA

View source: R/FitModel.R

FitModelR Documentation

Fit a model with INLA

Description

Fit a model with INLA

Usage

FitModel(..., formula = NULL, CovNames = NULL, mesh, spat.ind = "i",
  predictions = FALSE, tag.pred = "pred", control.fixed = NULL,
  waic = FALSE, dic = FALSE)

Arguments

...

Data stacks.

formula

If not NULL (the default), the formula to be used in the model fitting. Does not have to contain the spatial term if spat.ind is specified.

CovNames

Names of covariates to use. If NULL will use all in stack effects.

mesh

INLA mesh.

spat.ind

Index for spatial mesh. Defaults to i (which is used elsewhere n this package). Set to NULL if no spatial term is wanted.

predictions

Boolean: should predictions (on the linear scale) be made? Defaults to FALSE.

tag.pred

Name of tag for predictions. Defaults to "pred".

control.fixed

List of arguments to be passed to INLA via control.fixed (e.g. parameters of priors of fixed effects). Default is NULL.

waic

Should wAIC be calculated? Defaults to FALSE.

dic

Should DIC be calculated? Defaults to FALSE.

Value

If predictions is TRUE, a list with - model: an object of class INLA, with the results of the analysis in them. . predictions: Posterior means and standard deviationsfor linear predictor for predictions. Note that If predictions is FALSE, just the model.


oharar/PointedSDMs documentation built on July 11, 2022, 11:20 a.m.