gamma_est: Method of Moments Estimation of Gamma distribution

View source: R/gamma.est.R

gamma_estR Documentation

Method of Moments Estimation of Gamma distribution

Description

function to get the method of moment estimate(s) of gamma distribution

Usage

gamma_est(
  data,
  unknown = c("shape", "scale", "both"),
  shape = NULL,
  scale = NULL,
  plot = TRUE,
  curvecol = "red",
  ...
)

Arguments

data

A numeric vector.

unknown

A character string specifying which parameter is (are) unknown to the user.

shape, scale

positive shape and scale parameters of the gamma distribution.

plot

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

curvecol

color of the theoretical density curve

...

additional plotting parameters

Value

the estimated parameters by the method of moments of the data assuming the underlying distribution is gamma distribution

Examples

gamma_est(rgamma(1000,shape=2,scale=1),unknown="scale",shape=2)#shape is known
gamma_est(rgamma(1000,shape=2,scale=1),unknown="shape",scale=1)#scale is known
gamma_est(rgamma(1000,shape=2,scale=1),unknown="both")#both will be estimated

MOM documentation built on Aug. 21, 2025, 5:54 p.m.

Related to gamma_est in MOM...