rgeneric.ar1: rgeneric model for first order autoregressive forcing model...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/rgeneric.ar1.R

Description

A script to allow fractional Gaussian noise adapted to the climate forcing model to be passed into the R-INLA framework.

Usage

1
rgeneric.ar1(cmd = c("graph", "Q", "mu", "initial", "log.norm.const", "log.prior", "quit"), theta = NULL)

Arguments

cmd

Functions that specifies the latent Gaussian field and the prior distributions of the hyperparameters.

theta

The hyperparameters of the latent Gaussian model in logarithmic scaling.

Details

This function sets up the radiative forcing long memory process as an R-INLA rgeneric model. It is used internally by INLA.climate and is not intended to be used separately by the user.

Value

When used as an input argument for inla.rgeneric.define this will return a model eligible to be used within the R-INLA framework (see example).

Author(s)

Eirik Myrvoll-Nilsen <eirikmn91@gmail.com>

See Also

rgeneric

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
  if(require("INLA",quietly=TRUE)){
  data(GISS_E2_R)
  n <- dim(GISS_E2_R)[1]
  
  
  model.approx <- inla.rgeneric.define(rgeneric.ar1,
                                        n=n,forcing=GISS_E2_R$Forcing)
                                        
  formula = y ~ -1+ f(idy, model=model.approx)
  result.approx = inla(formula,family="gaussian", data=data.frame(y=GISS_E2_R$Temperature,idy=1:n),
                        num.threads=1, control.inla=list(reordering="metis"),
                        control.family = list(hyper = list(prec = list(initial = 12, fixed=TRUE))))
}

## End(Not run)

eirikmn/INLA.climate.test documentation built on Feb. 2, 2020, 9:17 a.m.