Learn R Programming

tsbugs (version 1.2.1)

inits: Produce a Set of Candidate Initial Values

Description

Creates a list of initial values for a tsbugs object to help shorten your code when running models through R2WinBUGS or R2OpenBUGS.

Usage

inits(bug, warn.mess = TRUE)

Arguments

bug

A time series BUGS model created using the tsbugs package.

warn.mess

Print warning message notifying users that the initial values simple guesses and have nothing to do with data. Default is TRUE.

Value

list with components dependent on model type.

Details

The inits function is intended to provide a set of candidate initial values for BUGS models created using the tsbugs package. The list provided from inits does not guarantee that BUGS model will run from an efficient set of starting points, or indeed that the BUGS model will run at all. Values are set to be in the parameter space and are not based on the data used to create the tsbugs model. If problems do occur running the BUGS model, users are advised to set their own initial values.

See Also

ar.bugs, sv.bugs, rv.bugs

Examples

Run this code
# NOT RUN {
# Create AR(4) model for Lake Huron data
LH <- LakeHuron
ar4 <- ar.bugs(y = diff(LH), ar.order = 4)

# Candidate initial values
inits(ar4) 
# }

Run the code above in your browser using DataLab