path.fmrReg {fmerPack}R Documentation

Finite Mixture Model with lasso and adaptive penalty

Description

Produce solution paths of regularized finite mixture model with lasso or adaptive lasso penalty; compute the degrees of freeom, likelihood and information criteria (AIC, BIC and GIC) of the estimators. Model fitting is conducted by EM algorithm and coordinate descent.

Usage

path.fmrReg(y, X, m, equal.var = FALSE,
            ic.type = "ALL", B = NULL, prob = NULL, rho = NULL, 
            control = list(), modstr = list(), report = FALSE)

Arguments

y

a vector of response (n \times 1)

X

a matrix of covariate (n \times p)

m

number of components

equal.var

indicating whether variances of different components are equal

ic.type

the information criterion to be used; currently supporting "ALL", "AIC", "BIC", and "GIC".

B

initial values for the rescaled coefficients with columns being the columns being the coefficient for different components

prob

initial values for prior probabilitis for different components

rho

initial values for rho vector (1 / \sigma), the reciprocal of standard deviation

control

a list of parameters for controlling the fitting process

modstr

a list of model parameters controlling the model fitting

report

indicating whether printing the value of objective function during EM algorithm for validation checking of initial value.

Details

Model parameters can be specified through argument modstr. The available include

The available elements for argument control include

Value

A list consisting of

lambda

vector of lambda used in model fitting

B.hat

estimated rescaled coefficient (p \times m \times nlambda)

pi.hat

estimated prior probabilities (m \times nlambda)

rho.hat

estimated rho values (m \times nlambda)

IC

values of information criteria

Examples


library(fmerPack)
## problem settings
n <- 100; m <- 3; p <- 5;
sigma2 <- c(0.1, 0.1, 0.4); rho <- 1 / sqrt(sigma2)
phi <- rbind(c(1, 1, 1), c(1, 1, 1), c(1, 1, 1), c(-3, 3, 0), c(3, 0, -3))
beta <- t(t(phi) / rho)
## generate response and covariates
z <- rmultinom(n, 1, prob= rep(1 / m, m))
X <- matrix(rnorm(n * p), nrow = n, ncol = p)
y <- MASS::mvrnorm(1, mu = rowSums(t(z) * X[, 1:(nrow(beta))] %*% beta), 
                   Sigma = diag(colSums(z * sigma2)))
## lasso
fit1 <- path.fmrReg(y, X, m = m, modstr = list(nlambda = 10), control = list(n.ini = 1))
## adaptive lasso
fit2 <- path.fmrReg(y, X, m = m, 
                   modstr = list(w = abs(select.tuning(fit1)$B + 1e-6)^2))


[Package fmerPack version 0.0-1 Index]