Description Usage Arguments Details Value Author(s) See Also Examples
A script to allow fractional Gaussian noise adapted to the climate forcing model to be passed into the R-INLA framework.
| 1 | rgeneric.lrd(cmd = c("graph", "Q", "mu", "initial", "log.norm.const", "log.prior", "quit"), theta = NULL)
 | 
| 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. | 
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.
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).
Eirik Myrvoll-Nilsen <eirikmn91@gmail.com>
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run: 
  if(require("INLA",quietly=TRUE)){
  data(GISS_E2_R)
  n <- dim(GISS_E2_R)[1]
  m <- 4
  Hprior <- compute.Hprior(n, 0.9, 0.1)
  funks <- h.map.maker(m=m)
  
  model.approx <- inla.rgeneric.define(rgeneric.lrd,lprior.fun.H = Hprior,
                                        n=n,N=m,forcing=GISS_E2_R$Forcing,funks=funks)
                                        
  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)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.