Learn R Programming

abn (version 3.1.1)

bern_bugs: Bugs code for Bernoulli response

Description

Bugs model for a Binomial response \(X\) in a single trial: \(X \sim \mathcal{B}(n=1, p) = \mathcal{Bernoulli}(p)\).

Usage

bern_bugs(nodename, nodesintercept, parentnames, parentcoefs)

bern_bugsGroup(nodename, nodesintercept, parentnames, parentcoefs, sigma_alpha)

Value

Bugs model returned as stdout.

Arguments

nodename

character string of response variable name.

nodesintercept

overall mean of response. Parameter from fixed-effects intercept.

parentnames

single character string (for one parent) or vector of characters (for multiple parent nodes) with parent node (predictor variables) names.

parentcoefs

overall slope for each predictor (parent node) variable (fixed-effects).

sigma_alpha

between-group variance. Parameter from random-effects intercept.

Functions

  • bern_bugsGroup(): Bugs code for Bernoulli response with varying intercept

See Also

makebugs simulateAbn

Examples

Run this code
bern_bugs(nodename = "a",
          parentnames = c("b", "c"),
          nodesintercept = c(0.318077),
          parentcoefs = list("b"=c(b=0.3059395),
                             "c"=c(c=0.5555)))

Run the code above in your browser using DataLab