gammaFit: Maximum likelihood and method of moments estimates for iid...

Description Usage Arguments Examples

View source: R/MLE_MoM.R

Description

This function computes maximum likelihood and method of moments estimates for iid observations of gamma random variables. Maximum likelihood estimatation is via a Newton-Raphson routine.

Usage

1
gammaFit(z, maxIter = 1000, tol = 1e-04)

Arguments

z

data

maxIter

maximum number of iterations (maxIter = 1000 by default)

tol

tolerance for convergence (|logLik_k - logLik_k-1| < tol)

Examples

1
2
3
4
5
6
7
8
9
nx <- 60
ny <- 60
alpha <- 1
lambda <- 4
x <- rgamma(n = nx, shape = alpha, rate = lambda)
y <- rgamma(n = ny, shape = alpha, rate = lambda)
fit <- gammaFit(z = c(x,y))
fit$MLE
fit$MoM

bdsegal/gammaDist documentation built on July 22, 2019, 1:26 p.m.