Library: | stats |
See also: | estmixexp |
Quantlet: | estmommixexp | |
Description: | computes method of moments (MoM) estimators of parameters (a, beta1, beta2) of mixture of 2 exponentials distribution. |
Usage: | {a,b1,b2} = estmommixexp(x) | |
Input: | ||
x | n x 1 vector, sample from which parameters will be estimated. | |
Output: | ||
a | scalar, Parameter a from MoM estimation. | |
b1 | scalar, Parameter beta1 from MoM estimation. | |
b2 | scalar, Parameter beta2 from MoM estimation. |
library("xplore") library("stats") library("distribs") library("nummath") randomize(101) sample=rndmixexp(10000,1,0.4,3,20) estmommixexp(sample)
Contents of _tmp.a [1,] 0.41388 Contents of _tmp.b1 [1,] 3.0485 Contents of _tmp.b2 [1,] 21.13
library("xplore") library("stats") library("distribs") library("nummath") randomize(101) sample=uniform(10000,1) estmommixexp(sample)
Contents of _tmp.a [1,] +NaN Contents of _tmp.b1 [1,] +NaN Contents of _tmp.b2 [1,] +NaN