Learn R Programming

flexmix (version 2.3-19)

BregFix: 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")

Arguments

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

Run this code
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)

Run the code above in your browser using DataLab