Learn R Programming

abn (version 3.1.13)

categorical_bugs: Bugs code for Categorical response

Description

Bugs code for Categorical response

Usage

categorical_bugs(
  nodename,
  nodesCatIdx,
  parentnames,
  nodesintercepts,
  parentcoefs
)

categorical_bugsGroup( nodename, nodesCatIdx, nodesintercepts, parentnames, parentcoefs, sigma, sigma_alpha )

Arguments

Value

Bugs model returned as stdout.

Details

The output of fitAbn with method = "mle" is based on the output of logistic regression models fit with either lm, glm, glmer, multinom, mblogit or internal irls methods. They all use the first factor level as reference level. Therefore, nodesCatIdx starts with index \(2\) and not \(1\). nodesintercepts and parentcoefs refer to the values of (Intercept) and Estimate of the respective model output. Predictor names build the keys in parentcoef.

See Also

makebugs simulateAbn

Examples

Run this code
# A -> B
# Where B is a categorical variable with 4 levels.
categorical_bugs(nodename = "b",
                 nodesCatIdx = c(2, 3, 4),
                 parentnames = "a",
                 nodesintercepts = c(2.188650, 3.133928, 3.138531),
                 parentcoefs = list("a"=c(a=1.686432, a=3.134161, a=5.052104)))

Run the code above in your browser using DataLab