Learn R Programming

rebmix (version 2.10.2)

coef-methods: Prints Univariate or Multivariate REBMIX Coefficients

Description

Returns the w and Theta output at pos.

Usage

# S4 method for REBMIX
coef(x = NULL, pos = 1, ...)
## ... and for other signatures

Arguments

x

see Methods section below.

pos

a desired row number in x@summary to be printed. The default value is 1.

currently not used..

Methods

signature(x = "REBMIX")

an object of class REBMIX.

signature(x = "REBMVNORM")

an object of class REBMVNORM.

Examples

Run this code
# NOT RUN {
# Generate and print simulated dataset.

Theta <- list(pdf1 = "Weibull",
  theta1.1 = c(2, 10, 30),
  theta2.1 = c(2, 4, 7))

simulated <- RNGMIX(Dataset.name = paste("simulated_", 1:5, sep = ""),
  rseed = -1,
  n = c(40, 60, 50),
  Theta = Theta)
  
simulated

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

simulatedest <- REBMIX(Dataset = simulated@Dataset, 
  Preprocessing = "histogram", 
  cmax = 6, 
  Criterion = "AIC", 
  pdf = "Weibull", 
  K = 8:25)
  
# Print coefficients and plot finite mixture.  

coef(simulatedest, pos = 3)

plot(simulatedest)
# }

Run the code above in your browser using DataLab