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

fitted

Extract Model Fitted Values


Description

Extract fitted values for each component from a flexmix object.

Usage

## S4 method for signature 'flexmix'
fitted(object, drop = TRUE, aggregate = FALSE, ...)

Arguments

object

an object of class "flexmix" or "FLXR"

drop

logical, if TRUE then the function tries to simplify the return object by combining lists of length 1 into matrices.

aggregate

logical, if TRUE then the fitted values for each model aggregated over the components are returned.

...

currently not used

Author(s)

Friedrich Leisch and Bettina Gruen

Examples

data("NPreg", package = "flexmix")
ex1 <- flexmix(yn ~ x + I(x^2), data = NPreg, k = 2)
matplot(NPreg$x, fitted(ex1), pch = 16, type = "p")
points(NPreg$x, NPreg$yn)

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.