# pemix: Empirical Distribution Function Calculation In rebmix: Finite Mixture Modeling, Clustering & Classification

## Description

Returns the data frame containing observations \bm{x}_{1}, …, \bm{x}_{n} and empirical distribution functions F_{1}, …, F_{n}. Vectors \bm{x} are subvectors of \bm{y} = (y_{1}, …, y_{d})^{\top}.

## Usage

 ```1 2 3 4``` ```## S4 method for signature 'REBMIX' pemix(x = NULL, pos = 1, variables = expression(1:d), lower.tail = TRUE, log.p = FALSE, ...) ## ... and for other signatures ```

## Arguments

 `x` see Methods section below. `pos` a desired row number in `[email protected]` for which the empirical distribution functions are calculated. The default value is `1`. `variables` a vector containing indices of variables in subvectors \bm{x}. The default value is `1:d`. `lower.tail` logical. If `TRUE`, probabilities are P[X ≤q x], otherwise, P[X > x]. The default value is `TRUE`. `log.p` logical. if `TRUE`, probabilities p are given as \log(p). The default value is `FALSE`. `...` currently not used.

## Methods

`signature(x = "REBMIX")`

an object of class `REBMIX`.

`signature(x = "REBMVNORM")`

an object of class `REBMVNORM`.

Marko Nagode

## References

M. Nagode and M. Fajdiga. The rebmix algorithm for the univariate finite mixture estimation. Communications in Statistics - Theory and Methods, 40(5):876-892, 2011a. http://dx.doi.org/10.1080/03610920903480890.

M. Nagode and M. Fajdiga. The rebmix algorithm for the multivariate finite mixture estimation. Communications in Statistics - Theory and Methods, 40(11):2022-2034, 2011b. http://dx.doi.org/10.1080/03610921003725788.

M. Nagode. Finite mixture modeling via REBMIX. Journal of Algorithms and Optimization, 3(2):14-28, 2015. http://dx.doi.org/10.5963/JAO0302001.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44``` ```# Generate simulated dataset. n <- c(15, 15) Theta <- list(pdf1 = rep("normal", 3), theta1.1 = c(10, 20, 30), theta2.1 = c(3, 2, 1), pdf2 = rep("normal", 3), theta1.2 = c(3, 4, 5), theta2.2 = c(15, 10, 5)) simulated <- RNGMIX(Dataset.name = paste("simulated_", 1:4, sep = ""), rseed = -1, n = n, Theta = Theta) # Number of classes or nearest neighbours to be processed. K <- c(as.integer(1 + log2(sum(n))), # Minimum v follows Sturges rule. as.integer(10 * log10(sum(n)))) # Maximum v follows log10 rule. # Estimate number of components, component weights and component parameters. simulatedest <- REBMIX(Dataset = simulated@Dataset, Preprocessing = "P", cmax = 4, Criterion = "BIC", pdf = c("n", "n", "n"), K = K[1]:K[2]) # Preprocess simulated dataset. f <- pemix(simulatedest, pos = 3, variables = c(1, 2)) f # Plot finite mixture. opar <- plot(simulatedest, pos = 3, nrow = 3, ncol = 1, what = "dist") par(usr = opar[[1]]\$usr, mfg = c(1, 1)) text(x = f[20:25, 1], y = f[20:25, 2], labels = format(f[20:25, 3], digits = 3), cex = 0.8, pos = 1) ```

rebmix documentation built on May 22, 2018, 5:08 p.m.