Description Usage Arguments Details Value References Examples
Fits univariate and multivariate mixtures of Erlang distributions to possibly censored and/or truncated data. The censoring and/or truncation can be left, right or interval.
1 2 3 4 |
lower,upper |
Matrix specifying the lower and upper censoring points, observations in rows, dimensions in coloms. |
trunclower,truncupper |
Numeric vector specifying the lower and upper truncation points in each dimension. |
M |
Numeric vector of values for the tuning parameter M. |
s |
Numeric vector of values for the tuning parameter s (the spread). |
nCores |
Number of cores available for parallel computation. |
criterium |
Character vector specifying information criterium to use, either "AIC" or "BIC". |
eps |
Numeric: covergence threshold used in the EM algorithm. |
beta_tol |
Numeric: threshold for the mixing weights below which the corresponding shape parameter vector is considered neglectable. |
print |
Logical: print intermediate results, either TRUE or FALSE. |
file |
If print is TRUE, specify file name. |
max_iter |
Maximum number of iterations in a single EM algorithm. |
MME_tune
implements the estimation procedure for univariate and
multivariate mixtures of Erlangs (MME) by repeatedly using the EM algorithm. More information
on the initialization and adjustment strategy for the shape parameter vectors based on an
information criterium (AIC and BIC implemented) can be found in Verbelen et al. (2015).
The data can be censored and/or truncated. The censoring status of a particular observation in a certain dimension is determined as follows:
Uncensored: lower and upper are equal (upper is set equal to lower by default).
Left Censored: lower is missing (NA) or equal to trunclower, but upper is present.
Right Censored: lower is present, but upper is missing (NA) or equal to truncupper.
Interval Censored: lower and upper are present and different.
E.g.: lower[1, ] = c(2, NA, 4, 5) and upper[1, ] = c(2, 3, NA, 6); specifies a first four-dimensional observation having an observed event at 2 in dimension 1, left censoring at 3 in dimension 2, right censoring at 4 in dimension 3, and interval censoring at [5,6] in dimension 4.
The truncation status in a certain dimension is determined as follows:
Untruncated: trunclower equals 0 and truncupper equals Inf (default).
Left Truncated: trunclower is a nonzero numeric and truncupper is Inf.
Right Truncated: trunclower is 0 and truncupper is a nonzero numeric.
Interval Truncated: trunclower and truncupper are present and different.
E.g.: trunclower = c(0, 1, 0, 1) and truncupper = c(Inf, Inf, 10, 10); specifies no truncation in dimension 1, left truncation at 1 in dimension 2, right truncation at 10 in dimension 3, and interval truncation at [1, 10] in dimension 4.
The lower and upper truncation points are fixed, i.e. the same for all observations.
For all observations and across all dimensions it must hold that trunclower <= lower <= upper <= truncupper.
MME_tune
returns a list
with the following objects:
The final MME, judged to be the best according to the criterium used. Value is a list.
A matrix summarizing the performance of the different fitted MME models (M, s, criterium, R).
A list containing all fitted MME models.
Verbelen, R., Gong, L., Antonio, K., Badescu, A., and Lin, X. S. (2015). Fitting mixtures of Erlangs to censored and truncated data using the EM algorithm. ASTIN Bulletin. Accepted for publication.
Verbelen, R., Antonio, K., and Claeskens, G. (2015). Multivariate mixtures of Erlangs for density estimation under censoring and truncation. Submitted for publication.
1 2 3 4 5 6 7 8 | ## Not run:
data(geyser, package = "MASS")
MME_tune(lower = geyser, upper = geyser, trunclower = c(0, 0),
truncupper = c(Inf, Inf), M = c(5, 10, 20), s = c(seq(10, 100, 10), 200),
nCores = parallel::detectCores(), criterium = "BIC", eps = 1e-03,
beta_tol = 10^(-5), print=TRUE, file="log.txt", max_iter = Inf)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.