Description Usage Arguments Value Author(s) Examples
Draws a nice plot.
1 | fitmix.plot(x, p, mu, sigma)
|
x |
Real vector of data. |
p |
Real vector of mixture proportions. |
mu |
Real vector of mixture component means. |
sigma |
Real vector of mixture component standard deviations. |
Returns an invisible null.
Toby Johnson Toby.x.Johnson@gsk.com
1 2 3 4 5 6 7 8 9 10 | xx <- fitmix.simulate(100, c(0.49, 0.42, 0.09), c(0, 1, 2), c(.3, .3, .3))
## additive model, common variance, Hardy--Weinberg
fit.a <- fitmix(xx, 3, maxit = 10, restarts = 3,
sigma.common = TRUE, p.binomial = TRUE, mu.additive = TRUE)
fitmix.plot(xx, fit.a$p, fit.a$mu, fit.a$sigma)
## general (unrestricted) fit
fit.g <- fitmix(xx, 3, maxit = 10, restarts = 3)
fitmix.plot(xx, fit.g$p, fit.g$mu, fit.g$sigma)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.