Learn R Programming

BSagri (version 0.1-6)

R2Bugsdat1w: For internal use

Description

Transform a data set to a dataset appropriate for certain OpenBUGS models.

Usage

R2Bugsdat1w(formula, data)

Arguments

formula
a formula of the style response ~ treatment, where response is a numeric or integer variable, and treatment is a factor variable in data
data
a data.frame, containing the response- and treatment-variables in formula

Value

  • a list, containing the elements
  • bugsdata list of variables appropriate for certain BUGS models
  • parametersa vector of character strings, naming the parameters to save for a call to OpenBUGS
  • initsa vector of initial values for the parameters
  • datathe original data set
  • Intercepta single logical indicating whether an Intercept was used to parameterize the factor variable

Details

For internal use.