Description Usage Arguments Value Author(s) References Examples
Fit a 2-component Gaussian mixture model.
1 2 3 |
data |
a data frame or tibble |
formula |
a formula model formula for the relationship |
B |
a positive integer giving the number of bootstrap samples used to obtain the estimates of the variance associated with the parameter estimates. |
se.method |
The method to compute the standard errors. Defaults to "bootstrap" but "wlbs" (weighted likelihood bootstrap) is probably a more robust bet. |
mu |
A starting value for the mu component. Defaults to NA (which means that the starting value is calculated from the average value of the outcomes) |
mufixed |
A boolean stating whether the mu component should be fixed at the given value. Defaults to FALSE. |
maxit |
The maximum number of iterations used for computing the estimates from the gaussian mixture model. Defaults to 200. |
... |
Additional arguments passed on to the fitting process. |
Returns a list with the following elements: ...
Claus Ekstrom ekstrom@sund.ku.dk and Christian Pipper pipper@sund.ku.dk
Unpublished manuscript by authors and Newton and Raftery (1994): "Approximate Bayesian Inference with the Weighted Likelihood Boostrap". JRSS-
1 2 3 4 5 6 7 8 9 10 | p <- 0.7 #
N <- 100
x <- rnorm(N)
x2 <- rnorm(N)
y <- rnorm(N, mean=x)
y[1:(N*p)] <- rnorm(N*p, mean=0, sd=.25)
DF <- data.frame(x, x2, y)
gaussian_mixture_model(DF, y ~ x + x2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.