logScoreMultDirPrepare: Internal functions.

Description Usage Arguments Details Value See Also

View source: R/score-multdir.R

Description

Convert a data frame to the appropriate format for the fast/incremental logScoreMultDir functions, and return as part of the logScoreParameters list.

Usage

1
2
  logScoreMultDirPrepare(data, logScoreParameters,
    checkInput = T)

Arguments

data

A data.frame, with columns being factors giving the values of each random variable.

logScoreParameters

A list, optionally containing other parameters. In particular, it may contain 'hyperparameters'.

data

A matrix (NOT data.frame), with columns being integers in the range 0, 1, 2, .... giving the values of each random variable. **** The integers MUST start numbering at 0 NOT 1 ****

nl

A numeric vector of length ncol(data), specifying the number of levels that each random variable takes.

hyperparameters

A character vector of length one. Either "bdeu", "qi", "one", or "point9"

checkInput

A logical of length 1, specifying whether to check the inputs to the function.

Details

In particular, the data is converted to a matrix, and the factor levels taken integer values from 0, 1, .... ie not on 1, 2, 3.

Value

A list with the contents of logScoreParameters, with the following components added or altered:

data

A matrix (NOT data.frame), with columns being integers in the range 0, 1, 2, .... giving the values of each random variable.

nl

A numeric vector of length ncol(data), specifying the number of levels that each random variable takes.

See Also

logScoreMultDir


rjbgoudie/structmcmc documentation built on Nov. 3, 2020, 3:41 a.m.