Learn R Programming

rebmix (version 2.8.0)

boot-methods: Parametric or Nonparametric Bootstrap for Standard Error and Coefficient of Variation Estimation

Description

Returns as default the boot output for mixtures of conditionally independent normal, lognormal, Weibull, gamma, binomial, Poisson or Dirac component densities. If x is of class RNGMVNORM the boot output for mixtures of multivariate normal component densities with unrestricted variance-covariance matrices is returned.

Usage

## S3 method for class 'REBMIX':
boot(x = NULL, pos = 1, Bootstrap = "parametric", 
     B = 100, n = numeric(), replace = TRUE, prob = numeric(), ...)
## ... and for other signatures
## S3 method for class 'REBMIX.boot':
summary(object, ...)
## ... and for other signatures

Arguments

x
see Methods section below.
pos
a desired row number in x@summary to be bootstrapped. The default value is 1.
Bootstrap
a character giving the bootstrap type. One of default "parametric" or "nonparametric".
B
number of bootstrap datasets. The default value is 100.
n
number of observations. The default value is numeric().
replace
logical. The sampling is with replacement if TRUE, see also sample. The default value is TRUE.
prob
a vector of length $n$ containing probability weights, see also sample. The default value is numeric().
...
further arguments to sample; additional arguments affecting the summary produced.
object
see Methods section below.

Value

  • Returns an object of class REBMIX.boot or REBMVNORM.boot.

References

G. McLachlan and D. Peel. Finite Mixture Models. John Wiley & Sons, New York, 2000.

Examples

Run this code
data("weibull")

n <- nrow(weibull)

# 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(n))) # Maximum v follows log10 rule.

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

weibullest <- REBMIX(Dataset = list(weibull),
  Preprocessing = "Parzen window", 
  cmax = 4,
  Criterion = "BIC", 
  pdf = "Weibull", 
  K = K[1]:K[2], 
  Restraints = "loose")
  
# Plot finite mixture.

plot(weibullest, what = c("density", "distribution", "IC", "logL", "D"), 
  nrow = 3, ncol = 2, npts = 1000)
  
# Bootstrap finite mixture.  

weibullboot <- boot(x = weibullest, Bootstrap = "nonparametric", B = 10)

weibullboot

Run the code above in your browser using DataLab