fitted-methods | R Documentation |
Extract fitted values for each component from a flexmix object.
## S4 method for signature 'flexmix'
fitted(object, drop = TRUE, aggregate = FALSE, ...)
object |
an object of class |
drop |
logical, if |
aggregate |
logical, if |
... |
currently not used |
Friedrich Leisch and Bettina Gruen
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.