Learn R Programming

mixtools (version 1.0.4)

try.flare: Mixtures of Regressions with Flare MM Algorithm

Description

The function which flaremixEM actually calls. This only allows one barrier constant to be inputted at a time.

Usage

try.flare(y, x, lambda = NULL, beta = NULL, sigma = NULL, alpha = NULL, nu = 1, epsilon = 1e-04, maxit = 10000, verb = FALSE, restart = 50)

Arguments

y
An n-vector of response values.
x
An n-vector of predictor values. An intercept term will be added by default.
lambda
Initial value of mixing proportions. Entries should sum to 1.
beta
Initial value of beta parameters. Should be a 2x2 matrix where the columns corresond to the component.
sigma
A vector of standard deviations.
alpha
A scalar for the exponential component's rate.
nu
A scalar specifying the barrier constant to use.
epsilon
The convergence criterion.
maxit
The maximum number of iterations.
verb
If TRUE, then various updates are printed during each iteration of the algorithm.
restart
The number of times to restart the algorithm in case convergence is not attained. The default is 50.

Value

try.flare returns a list of class mixEM with items:
x
The set of predictors (which includes a column of 1's).
y
The response values.
posterior
An nx2 matrix of posterior probabilities for observations.
lambda
The final mixing proportions.
beta
The final regression coefficients.
sigma
The final standard deviations.
alpha
The final exponential rate.
loglik
The final log-likelihood.
all.loglik
A vector of each iteration's log-likelihood.
ft
A character vector giving the name of the function.

Details

This usually is not called by the user. The user will likely want flaremixEM, which also has an example to demonstrate this algorithm.

See Also

flaremixEM