writeModelSplines: Write a JAGS model to fit penalized splines regression

Description Usage Arguments Value Examples

View source: R/writemodelsplines.R

Description

Write a JAGS model to fit first- and second-order penalized splines regression

Usage

1
2
writeModelSplines(order = NULL, cs.smoothing = T, nserror.estimated = T,
  file.name = "model.txt")

Arguments

order

order of penalization (either 1 or 2).

cs.smoothing

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

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
order <- 1
cs.smoothing <- TRUE
nserror.estimated <- TRUE
writeModelSplines(order = order, nserror.estimated = nserror.estimated, cs.smoothing = cs.smoothing)

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