Learn R Programming

ihs (version 1.0)

summary.MLE: Summary the Maximum-Likelihood Estimation with the Inverse Hyperbolic Sine Distribution

Description

Summary the maximum-likelihood estimation including standard errors and t-values.

Usage

"summary"(object, ...) "summary"(object, ...)

Arguments

object
object of class 'MLE' or of class 'mult.MLE', usually a result from maximum-likelihood estimation.
...
currently not used.

Value

summary.MLE returns an object of class 'summary.MLE' with the following components:
parameters
names of parameters used in the estimation procedure.
type
type of maximisation.
iterations
number of iterations.
code
code of success.
message
a short message describing the code.
loglik
the loglik value in the maximum.
estimate
numeric matrix, the first column contains the parameter estimates, the second the standard errors, third t-values and fourth corresponding probabilities.
fixed
logical vector, which parameters are treated as constants.
NActivePar
number of free parameters.
constraints
information about the constrained optimization. Passed directly further from maxim-object. NULL if unconstrained maximization.
summary.mult.MLE returns a list of class 'summary.mult.MLE' with components of class 'summary.MLE'.

See Also

the maxLik CRAN package

Examples

Run this code
### Showing how to fit a simple vector of data to the inverse 
### hyperbolic sine distribution. 
require(graphics)
require(stats)
set.seed(123456)
x = rnorm(100)
X.f = X ~ x
start = list(mu = 0, sigma = 2, lambda = 0, k = 1)
result = ihs.mle(X.f = X.f, start = start)
sumResult = summary(result)
print(result)
coef(result)
print(sumResult)

### Comparing the fit
xvals = seq(-5, 5, by = 0.05)
coefs = coef(result)
mu = coefs[1]
sigma = coefs[2]
lambda = coefs[3]
k = coefs[4]
plot(xvals, dnorm(xvals), type = "l", col = "blue")
lines(xvals, dihs(xvals, mu = mu, sigma = sigma, 
lambda = lambda, k = k), col = "red")

Run the code above in your browser using DataLab