Learn R Programming

Sim.DiffProc (version 2.5)

hist_general: Adjustment the Density of Random Variable X by Histograms Methods

Description

Adjusted your density of random variable X by histograms methods with Different number of cells.

Usage

hist_general(Data, Breaks, Law = c("exp", "GAmma", "chisq", "Beta", 
             "fisher", "student", "weibull", "Normlog", "Norm"))

Arguments

Data
a numeric vector of the observed values.
Breaks
one of: o a vector giving the breakpoints between histogram cells. o a single number giving the number of cells for the histogram. o a function to compute the number of cells. o Breaks = c('scott','Sturges','FD') or manual.
Law
distribution function with Adjusted. see details Distributions (R >= 2.12.1)

Value

  • plot.histogram with Adjustment and Estimation.

Details

Ajusted the density for random variable X by histograms methods with Different number of cells see details nclass.scott, ajusted with the Distribution c("dexp","dgamma", "dchisq","dbeta","df","dt","dweibull", "dlnorm","dnorm").

See Also

fctgeneral empirical distribution, Kern_general Kernel Methods.

Examples

Run this code
X <- rexp(1000,2)
 par(mfrow=c(2,2))
 hist_general(Data=X, Breaks='FD', Law="exp")
 hist_general(Data=X, Breaks='scott', Law="exp")
 hist_general(Data=X, Breaks='Sturges', Law="exp")
 hist_general(Data=X, Breaks=60, Law="exp")

Run the code above in your browser using DataLab