ltmm | R Documentation |
This function generates a mixture model combining left-truncated lognormal, gamma, and weibull distributions
ltmm(
x,
G,
distributions,
trunc = NULL,
EM_init_method = "emEM",
EM_starts = 5,
init_pars = NULL,
init_pi = NULL,
init_classes = NULL,
one_group_reps = 50,
eps = 1e-06,
max.it = 1000,
verbose = FALSE
)
x |
data vector |
G |
number of components |
distributions |
densities to combine |
trunc |
left truncation point (optional) |
EM_init_method |
initialization method for EM algorithm |
EM_starts |
number of random starts for initialization of EM algorithm. (only for G > 1) |
init_pars |
initial parameter values (list of length G) |
init_pi |
manually specified initial component proportions (for init_method=specified) |
init_classes |
manually specified initial classes. will overwrite init_pars and init_pi |
one_group_reps |
number of random starts for each numerical optimization in 1-component model |
eps |
stopping tolerance for EM algoithm |
max.it |
maximum number of iterations of EM algorithm |
verbose |
print information as fitting progresses? |
An ltmm model object, with the following properties:
Copy of the input data
The selected distributions
The left truncation value, if specified
The probability density function of the fitted model
The cumulative density function of the fitted model
The value-at-risk of the fitted model (function with p taken as onl yargument)
The expected shortfall of the fitted model (function with p taken as onl yargument)
The number of components in the model
The estimated probabilites of component membership
The estimated model parameters
The log-likelihood of the fitted model
The BIC of the fitted model
The AIC of the fitted model
The MAP component membership for each observation
The number of iterations until convergence for the EM algorithm
The total number of model parameters for the fitted model
The value of log-likelihood at each iteration of the EM algorithm
x <- secura$Loss
fit <- ltmm(x, G = 2, distributions = c('gamma', 'gamma', 'weibull'), trunc = 1.2e6)
summary(fit)
plot(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.