Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

NregFix

Artificial Example for Normal Regression


Description

A simple artificial regression example with 3 latent classes, two independent variables, one concomitant variable and a dependent variable which follows a Gaussian distribution.

Usage

data("NregFix")

Format

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

x1

Independent variable: numeric variable.

x2

Independent variable: a factor with two levels: 0 and 1.

w

Concomitant variable: a factor with two levels: 0 and 1.

y

Dependent variable.

class

Latent class memberships.

Examples

data("NregFix", package = "flexmix")
library("lattice")
xyplot(y ~ x1 | x2 * w, data = NregFix, groups = class)
Model <- FLXMRglmfix(~ 1, fixed = ~ x2, 
                     nested = list(k = c(2, 1),
                     formula = c(~x1, ~0)))
fittedModel <- initFlexmix(y ~ 1, model = Model, data = NregFix, k = 3,
                           concomitant = FLXPmultinom(~ w), nrep = 5)
fittedModel

flexmix

Flexible Mixture Modeling

v2.3-17
GPL (>= 2)
Authors
Bettina Gruen [aut, cre] (<https://orcid.org/0000-0001-7265-4773>), Friedrich Leisch [aut] (<https://orcid.org/0000-0001-7278-1983>), Deepayan Sarkar [ctb] (<https://orcid.org/0000-0003-4107-1553>), Frederic Mortier [ctb], Nicolas Picard [ctb] (<https://orcid.org/0000-0001-5548-9171>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.