Learn R Programming

rebmix (version 2.8.0)

RCLRMIX-methods: Predicts Cluster Membership Based Upon a Model Trained by REBMIX

Description

Returns as default the RCLRMIX algorithm output for mixtures of conditionally independent normal, lognormal, Weibull, gamma, binomial, Poisson or Dirac component densities. If model equals "RCLRMVNORM" output for mixtures of multivariate normal component densities with unrestricted variance-covariance matrices is returned.

Usage

## S3 method for class 'RCLRMIX':
RCLRMIX(model = "RCLRMIX", x = NULL, pos = 1, Zt = factor(), ...)
## ... and for other signatures
## S3 method for class 'RCLRMIX':
summary(object, ...)
## ... and for other signatures

Arguments

model
see Methods section below.
x
an object of class REBMIX.
pos
a desired row number in x@summary to be clustered. The default value is 1.
Zt
a factor of true cluster membership. The default value is factor().
object
see Methods section below.
...
currently not used; additional arguments affecting the summary produced.

Value

  • Returns an object of class RCLRMIX or RCLRMVNORM.

Examples

Run this code
devAskNewPage(ask = TRUE)

# Generate Poisson dataset.

n <- c(500, 200, 400)

Theta <- list(pdf1 = "Poisson",
  theta1.1 = 3,
  theta2.1 = NA,
  pdf2 = "Poisson",
  theta1.2 = 12,
  theta2.2 = NA,
  pdf3 = "Poisson",
  theta1.3 = 36,
  theta2.3 = NA)

poisson <- RNGMIX(Dataset.name = "Poisson_1", n = n, Theta = Theta)

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

poissonest <- REBMIX(Dataset = poisson@Dataset,
  Preprocessing = "histogram",
  cmax = 6,
  Criterion = "BIC",
  pdf = rep("Poisson", 1),
  K = 1)

summary(poissonest)

# Plot finite mixture.

plot(poissonest)

# Cluster dataset.

poissonclu <- RCLRMIX(x = poissonest, Zt = poisson@Zt)

# Plot clusters.

plot(poissonclu)

Run the code above in your browser using DataLab