fitted-methods {flexmix} | R Documentation |
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 |
drop |
logical, if |
aggregate |
logical, if |
... |
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)
[Package flexmix version 2.3-19 Index]