writeModelAR: Write a JAGS model to fit AR(1) model

Description Usage Arguments Value Examples

View source: R/writemodelar.R

Description

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

Usage

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

Arguments

cs.arma

whether AR parameter is country specific. If 'FALSE', parameter is 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
writeModelAR(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.