Learn R Programming

MOM (version 0.1.0)

exp_est: Method of Moments Estimation of Exponential Distribution

Description

function to get the method of moment estimate of exponential distribution

Usage

exp_est(data, plot = TRUE, curvecol = "red", ...)

Value

the estimated positive rate parameter by the method of moments of the data assuming the underlying distribution is exponential distribution

Arguments

data

An object of numeric vector.

plot

logical which controls whether the histogram of the data along with the density curve of the theoretical exponential distribution with the estimated parameters.

curvecol

color of the theoretical density curve

...

additional plotting parameters

Examples

Run this code
exp_est(rexp(1000,rate=0.1))

Run the code above in your browser using DataLab