R: Artificial Example for Binomial Regression

BregFix {flexmix} | R Documentation

## Artificial Example for Binomial Regression

### Description

A simple artificial regression example data set with 3 latent classes, one independent variable `x` and a concomitant variable `w`.

### Usage

    data("BregFix")

### Format

A data frame with 200 observations on the following 5 variables.

`yes`

  number of successes

`no`

  number of failures

`x`

  independent variable

`w`

  concomitant variable, a factor with levels `0` `1`

`class`

  latent class memberships

### Examples

    data("BregFix", package = "flexmix")
    Model <- FLXMRglmfix(family="binomial",
                         nested = list(formula = c(~x, ~0), k = c(2, 1)))
    Conc <- FLXPmultinom(~w)
    FittedBin <- initFlexmix(cbind(yes, no) ~ 1, data = BregFix,
                             k = 3, model = Model, concomitant = Conc)
    summary(FittedBin)

[Package flexmix version 2.3-14 Index]