Learn R Programming

Sim.DiffProc (version 2.5)

fctrep_Meth: Calculating the Empirical Distribution of Random Variable X

Description

Calculating your empirical distribution of random variable X.

Usage

fctrep_Meth(X)

Arguments

X
a numeric vector of the observed values.

Value

  • Plot the empirical distribution.

Details

calculating the empirical distribution F[i]= (1/n)*Sum(V[i]) with V[i]= 1 if x[i] <= x="" else="" v[i]="0.

See Also

hist_meth Histograms,Kern_meth Kernel Density.

Examples

Run this code
X <- rexp(1000,2)
 Y <- rgamma(1000,1,2)
 Z <- rweibull(1000,1,1)
 G <- rnorm(1000,mean(X),sd(X))
 par(mfrow=c(2,2))
 fctrep_Meth(X)
 fctrep_Meth(Y)
 fctrep_Meth(Z)
 fctrep_Meth(G)

Run the code above in your browser using DataLab