geo.joint.fit: Function to fit a either a spatial or spatio-temporal joint...

Description Usage Arguments Value

View source: R/geo_joint_fit.r

Description

Function to fit a either a spatial or spatio-temporal joint model to geo-statistical data with an intercept and covariates for each likelihood

Usage

1
2
3
4
5
6
7
8
geo.joint.fit(mesh = NULL, locs = NULL, response = NULL, temp = NULL,
  covariates = NULL, family = c("gaussian", "gaussian"),
  control.time = list(model = "ar1", param = list(theta = list(prior =
  "pccor1", param = c(0, 0.9)))), control.inla = list(strategy = "gaussian",
  int.strategy = "eb"), hyper = list(theta = list(prior = "normal", param =
  c(0, 10))), control.compute = list(dic = TRUE, waic = TRUE, cpo = TRUE,
  config = TRUE), non.linear = NULL, sig0 = 1, Psig = 0.5, rho0 = 0.3,
  Prho = 0.5, verbose = FALSE, ...)

Arguments

mesh

a “mesh” object i.e. delauney triangulation of the domain, an object returned by make.mesh.

locs

a list of matrcies. The first element holds observation locations for the first likelihood, where each row corresponds to an observation. The second elemenr holds the observation locations for the second likelihood, each row corresponds to an observation. If no second element is supplied the observation locations for the first likelihood are used.

response

a list (length two) of vectors of each response variable, each corresponds to the respective spatial locations in locs.

temp

(optional) a list of numeric vectors specifying the temporal indcies for each response respectively.

covariates

(optional) a list (length 2) each element should contain a named data.frame of covariates. The first corresponding to the first likelihood, the second corresponding the the second likelihood.

family

a character vector of length two specifying the assumed likelihood of each response, by default is c("gaussian","gaussian").

control.time

(optional) supplied if the temp argumet is given to fit a spatio-temporal model. This argument controls the model and prior put on the hyperparameters of the model for the temporal component of the spatio-temporal model. By default this is list(model = 'ar1', param = list(theta = list(prior='pccor1', param = c(0, 0.9)))) which is a pc.prior put on the rho coefficient of a AR(1) model with P(rho>0)=0.9. Assumed to be shared accross both responses Refer to Simpson, martins, and rue for further details *****put in proper refs*****

control.inla

a list which controls the fitting procedures INLA uses see Rue et al. ***ref book*** by default this is list(strategy='gaussian',int.strategy = 'eb') for quick and dirty fitting.

hyper

prior for the copy parameter by default is a N(0,10) i.e., list(theta=list(prior='normal', param=c(0,10)))

control.compute

a list of fit statistics the user wants INLA to return. By default this is list(dic = TRUE, waic = TRUE,cpo = TRUE, config = TRUE).

non.linear

(optional) a list of named lists should be used if the user requires a non-linear covariate to be included for each likelihood. (i.e., non.linear = list(list(random.effect = idx.1, model = "iid"),list(random.effect = idx.2, model = "iid")) if the user wnats a iid effect for some idx.1 for the first likelihood and another for idx.2 for the second) Must be supplied as a named list with elements random.effect a numeric vector of the random effect indecies, and model the random effect model the user wishes to use for random.effect

sig0

by default = 1, typical standard deviation to use pc priors for hyperparams of spde model

Psig

by default = 0.5 prob for sigma of pc prior

rho0

by default = 0.3, typical range to use pc priors for hyperparams of spde model

Prho

by default = 0.5 prob for rho of pc prior

verbose

Logical if TRUE model fit is output to screen.

...

add inla options to speed up computation i.e., by giving starting values from a previos model

Value

A inla result object


cmjt/lgcpSPDE documentation built on July 25, 2019, 3:05 p.m.