bugsModel {cdfquantreg}R Documentation

Generating OpenBUGS Model File

Description

Generating OpenBUGS model file

Usage

bugsModel(formula, fd, sd, random = NULL, modelname = "bugmodel", wd = getwd())

Arguments

formula

A formula object, with the DV on the left of an ~ operator, and predictors on the right. For the part on the right of '~', the specification of submodels can be separated by '|'. So y ~ X1 | X2 means the DV is y,X1 is the term in the mean submodel, and X2 is the term in the dispersion submodel.

fd

A string that specifies the parent distribution (see cdfqrFamily).

sd

A string that specifies the sub-family distribution.

random

Character or vector of characters that indicates the random effect factors.

modelname

The name of the model file; optional.

wd

The working directory in which OpenBUGS will work (i.e., generate the model files and chain information).

Value

A model ‘.txt’ file is generated in the specified working directory. The function also returns a list of values:

init1,init2

Default initial values for MCMC two chain procedure.

vars

A list of variables that are included in the estimation.

nodes_sample

a list of characters that specify the nodes to be monitored.

Examples

## Not run: 
# Need write access in the working directory before executing the code.
# No random component
bugsModel(y ~ x1 | x2, 't2','t2', random = NULL)
# Random component as subject ID
bugsModel(y ~ x1 | x2, 't2','t2', random = 'ID')

## End(Not run)


[Package cdfquantreg version 1.3.1-2 Index]