startingFunction {glmmBUGS}R Documentation

Write a function to generate random MCMC starting values

Description

this is a function to generate ramdom MCMC starting values

Usage

startingFunction(startingValues, file = "getInits.R")

Arguments

startingValues list returned from getStartingValues
file character string giving the name of the file to write to

Details

Given a list containing initial estimates of parameters and random effects, a text file is produced containing code for a function to generate random starting values for use with the bugs() function. It is intended that the file produced be checked and edited prior to use.

Value

A file, with the name given by the 'file' argument, is written.

Warning

You are strongly encouraged to edit the file to ensure the result is sensible

Author(s)

Patrick Brown, patrick.brown@utoronto.ca

See Also

getStartingValues, bugs

Examples

##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--    or do  help(data=index)  for the standard data sets.
sval = list(intercept=0, beta = 1:2, Rperson = rep(0, 5), vars=list(person=1))
startingFunction(sval)


[Package glmmBUGS version 1.5 Index]