writeModelARMA: Write a JAGS model to fit ARMA(1,1) model

Description Usage Arguments Value Examples

View source: R/writemodelarma.R

Description

Write a JAGS model to fit ARMA(1,1) model, with or without time trend

Usage

1
2
writeModelARMA(cs.arma = T, cs.smoothing = T, time.trend = T,
  nserror.estimated = T, file.name = "model.txt")

Arguments

cs.arma

whether autocorrelation and innovations parameter is country specific. If 'FALSE', parameters are global.

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
cs.arma <- TRUE
cs.smoothing <- TRUE
time.trend <- TRUE
nserror.estimated <- TRUE
writeModelARMA(cs.arma = cs.arma, cs.smoothing = cs.smoothing, time.trend = time.trend, nserror.estimated = nserror.estimated)

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