Learn R Programming

rebmix (version 2.6.1)

pemix: Empirical Distribution Function Calculation

Description

pemix returns (invisibly) 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

pemix(x = NULL, lower.tail = TRUE, log.p = FALSE, ...)

Arguments

x
a vector, a matrix or a data frame containing continuous or discrete vector observations $\bm{x}$.
lower.tail
logical. If TRUE (default), probabilities are $P[X \leq x]$, otherwise, $P[X > x]$.
log.p
logical. if TRUE, probabilities $p$ are given as $\log(p)$.
...
currently not used.

Examples

Run this code
## Generate simulated dataset.

Theta <- rbind(pdf1 = rep("normal", 2),
  theta1.1 = c(10, 20),
  theta2.1 = c(3.0, 2.0),
  pdf1 = rep("normal", 2),
  theta1.1 = c(3, 2),
  theta2.1 = c(20, 10))

simulated <- RNGMIX(Dataset = "simulated",
  rseed = -1,
  n = c(15, 15),
  Theta = Theta)

## Preprocess simulated dataset.

y1y2F <- pemix(x = simulated$Dataset[[1]])
  
y1y2F

Run the code above in your browser using DataLab