latentclasslogit: Perform maximum-likelihood estimation for a latent class...

Description Usage Arguments Value

View source: R/latentclasslogit.R

Description

This function performs maximum-likelihood estimation via the E-M algorithm to obtain estimates of regression coefficients in a latent class logistic regression model.

Usage

1
2
3
latentclasslogit(formula, data, K = 2, start.beta = NULL,
  start.lambda = NULL, id = NULL, tol = 1e-05, theta.lower = NULL,
  theta.upper = NULL, method = "L-BFGS-B")

Arguments

formula

a regression formula describing the relationship between the response and the covariates

data

the data.frame containing the responses and covariates

K

the number of mixtures (or latent classes)

start.beta

a list of length K of starting values for each mixture's beta coefficients

start.lambda

a vector of length K of starting values for the mixing proportions

id

the (character) name of the column containing subject IDs

tol

a numeric tolerance used to determine convergence

theta.lower

a numeric vector of lower bounds for the theta parameters

theta.upper

a numeric vector of upper bounds for the theta parameters

method

a string specifying the optimization routine to be used by optim

Value

a list containing the following elements:

beta

a list containing the estimated regression coefficients

sigma

a vector containing the estimated values of sigma

lambda

a vector containing the estimated mixing proportions

delta

a list of length K containing the estimated class membership probabilities for each observation

ll

the log-likelihood function evaluated at the MLE


WannabeSmith/mixturetobit documentation built on Aug. 3, 2019, 8:27 p.m.