GetEstimate_ML {HydroPortailStats} | R Documentation |
Maximum-likelihood estimate of a distribution
Description
Returns an estimate of a distribution using the method of maximum likelihood.
Usage
GetEstimate_ML(
y,
dist,
par0 = NULL,
method = optim_method_def,
lower = -Inf,
upper = Inf
)
Arguments
y |
numeric vector, data |
dist |
character, distribution name |
par0 |
numeric vector, initial parameter guess. You may use GetEstimate_ROUGH(). |
method |
character, method used to maximize likelihood, see ?optim |
lower |
numeric vector, lower bounds, see ?optim |
upper |
numeric vector, upper bounds, see ?optim |
Value
A list with the following components:
par |
numeric vector, estimated parameter vector. |
obj |
numeric, objective fonction (maximum log-likelihood) |
ok |
logical, did computation succeed? |
err |
integer, error code (0 if ok) |
message |
error message |
Examples
y=c(9.2,9.5,11.4,9.5,9.4,9.6,10.5,11.1,10.5,10.4)
GetEstimate_ML(y,'Normal')
GetEstimate_ML(y,'LogNormal')
GetEstimate_ML(y,'Gumbel')
GetEstimate_ML(y,'Gumbel',par0=GetEstimate_ROUGH(y,'Gumbel')$par)
GetEstimate_ML(y,'GEV',par0=GetEstimate_ROUGH(y,'GEV')$par)
GetEstimate_ML(y,'Poisson')
[Package HydroPortailStats version 1.0.3 Index]