pemix: Empirical Distribution Function Calculation

pemix-methodsR Documentation

Empirical Distribution Function Calculation

Description

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

Usage

## 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 x@summary 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 \leq 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.

Author(s)

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. \Sexpr[results=rd]{tools:::Rd_expr_doi("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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/03610921003725788")}.

M. Nagode. Finite mixture modeling via REBMIX. Journal of Algorithms and Optimization, 3(2):14-28, 2015. https://repozitorij.uni-lj.si/Dokument.php?id=127674&lang=eng.

Examples

# Generate simulated dataset.

n <- c(15, 15)

Theta <- new("RNGMIX.Theta", c = 2, pdf = rep("normal", 3))

a.theta1(Theta, 1) <- c(10, 20, 30)
a.theta1(Theta, 2) <- c(3, 4, 5)
a.theta2(Theta, 1) <- c(3, 2, 1)
a.theta2(Theta, 2) <- c(15, 10, 5)

simulated <- RNGMIX(Dataset.name = paste("simulated_", 1:4, sep = ""),
  rseed = -1,
  n = n,
  Theta = a.Theta(Theta))

# Create object of class EM.Control.

EM <- new("EM.Control", strategy = "exhaustive", variant = "ECM",
  acceleration = "fixed", acceleration.multiplier = 1.0, tolerance = 1.0E-4,
  maximum.iterations = 1000)

# Estimate number of components, component weights and component parameters.

simulatedest <- REBMIX(Dataset = a.Dataset(simulated),
  Preprocessing = "kernel density estimation",
  cmax = 4,
  pdf = c("n", "n", "n"),
  EMcontrol = EM)

# Preprocess simulated dataset.

f <- pemix(simulatedest, pos = 3, variables = c(1))

f

rebmix documentation built on Feb. 9, 2024, 3:01 p.m.