mixreg function

MLE of Mixture Regression with Normal Errors

MLE of Mixture Regression with Normal Errors

mixreg' provides the MLE estimates of a mixture of regression models with normal errors. The result from this function can be used as initial values of the mixregRM2` function.

mixreg(x, y, C = 2, nstart = 20, tol = 1e-05)

Arguments

  • x: an n by p data matrix where n is the number of observations and p is the number of explanatory variables. The intercept term will automatically be added to the data.
  • y: an n-dimensional vector of response variable.
  • C: number of mixture components. Default is 2.
  • nstart: number of initializations to try. Default is 20.
  • tol: stopping criteria (threshold value) for the EM algorithm. Default is 1e-05.

Returns

A list containing the following elements: - pi: C-dimensional vector of estimated mixing proportions.

  • beta: C by (p + 1) matrix of estimated regression coefficients.

  • sigma: C-dimensional vector of estimated standard deviations.

  • lik: final likelihood.

  • run: total number of iterations after convergence.

Examples

data(tone) y = tone$tuned x = tone$stretchratio k = 160 x[151:k] = 0 y[151:k] = 5 est = mixreg(x, y, 2, nstart = 1)

See Also

mixregRM2

  • Maintainer: Suyeon Kang
  • License: GPL (>= 2)
  • Last published: 2023-09-20

Useful links