writeModelGP: Write a JAGS model to fit a Gaussian Process model

Description Usage Arguments Value Examples

View source: R/writemodelgp.R

Description

Write a JAGS model to fit Gaussian Process model, with either exponential or Matern covariance function, with or without time trend

Usage

1
2
writeModelGP(cov.fun = "sqexp", cs.smoothing = T, time.trend = T,
  nserror.estimated = T, file.name = "model.txt")

Arguments

cov.fun

either squared exponential ("sqexp") or matern ("matern")

cs.smoothing

whether smoothing paramter is country specific. If 'FALSE', smoothing parameter is global.

time.trend

if 'TRUE' a linear time trend is estimated.

nserror.estimated

whether to estimate non-sampling error. IF 'FALSE', fixed sampling error is inputted.

file.name

name of file to be saved. Must be a '.txt' file

Value

A text file that contains a JAGS model

Examples

1
2
3
4
5
cov.fun <- "sqexp"
cs.smoothing <- TRUE
time.trend <- TRUE
nserror.estimated <- TRUE
writeModelGP(cov.fun = cov.fun, cs.smoothing = cs.smoothing, time.trend = time.trend, nserror.estimated = nserror.estimated)

MJAlexander/distortr documentation built on July 17, 2020, 4:06 p.m.