Last data update: 2014.03.03

R: Summarizing Normal Inverse Gaussian Distribution Fit
summary.nigFitR Documentation

Summarizing Normal Inverse Gaussian Distribution Fit

Description

summary Method for class "nigFit".

Usage

## S3 method for class 'nigFit'
summary(object, hessian = FALSE,
        hessianMethod = c("exact", "tsHessian"), ...)

## S3 method for class 'summary.nigFit'
print(x,
                               digits = max(3, getOption("digits") - 3), ...)

Arguments

object

An object of class "nigFit", resulting from a call to nigFit.

hessian

Logical. If TRUE the Hessian is printed.

hessianMethod

Either the exact Hessian is used (the default) or the two-sided Hessian approximation given by tsHessian from the package DistributionUtils is used.

x

An object of class "summary.nigFit", resulting from a call to summary.nigFit.

digits

The number of significant digits to use when printing.

...

Further arguments passed to or from other methods.

Details

If hessian = FALSE no calculations are performed, the class of object is simply changed from nigFit to summary.nigFit so that it can be passed to print.summary.nigFit for printing in a convenient form.

If hessian = TRUE the Hessian is calculated via a call to nigHessian and the standard errors of the parameter estimates are calculated using the Hessian and these are added to the original list object. The class of the object returned is again changed to summary.nigFit.

Value

summary.nigFit returns a list comprised of the original object object and additional elements hessian and sds if hessian = TRUE, otherwise it returns the original object. The class of the object returned is changed to summary.nigFit.

See nigFit for the composition of an object of class nigFit.

If the Hessian and standard errors have not been added to the object x, print.summary.nigFit prints a summary in the same format as print.nigFit. When the Hessian and standard errors are available, the Hessian is printed and the standard errors for the parameter estimates are printed in parentheses beneath the parameter estimates, in the manner of fitdistr in the package MASS.

Author(s)

David Scott d.scott@auckland.ac.nz, Christine Yang Dong c.dong@auckland.ac.nz

See Also

nigFit, summary, nigHessian.

Examples

### Continuing the  nigFit(.) example:
param <- c(2, 2, 2, 1)
dataVector <- rnig(500, param = param)
fit <- nigFit(dataVector, method = "BFGS")
print(fit)
summary(fit, hessian = TRUE, hessianMethod = "tsHessian")

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(GeneralizedHyperbolic)
Loading required package: DistributionUtils
Loading required package: RUnit
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/GeneralizedHyperbolic/summary.nigFit.Rd_%03d_medium.png", width=480, height=480)
> ### Name: summary.nigFit
> ### Title: Summarizing Normal Inverse Gaussian Distribution Fit
> ### Aliases: summary.nigFit print.summary.nigFit
> ### Keywords: distribution
> 
> ### ** Examples
> 
> ### Continuing the  nigFit(.) example:
> param <- c(2, 2, 2, 1)
> dataVector <- rnig(500, param = param)
> fit <- nigFit(dataVector, method = "BFGS")
> print(fit)

Data:      dataVector 
Parameter estimates:
    mu   delta   alpha    beta  
2.1669  2.1225  1.7505  0.7374  
Likelihood:         -813.836 
criterion :         MLE 
Method:             BFGS 
Convergence code:   0 
Iterations:         73 
> summary(fit, hessian = TRUE, hessianMethod = "tsHessian")

Data:      dataVector 
Hessian:  tsHessian 
             mu      delta     alpha      beta
mu    -366.3858 -124.72867  159.3214 -499.9994
delta -124.7287  -92.56277  129.3905 -232.2608
alpha  159.3214  129.39051 -204.8151  342.4066
beta  -499.9994 -232.26077  342.4066 -812.7068
Parameter estimates:
      mu      delta     alpha      beta 
   2.1669    2.1225    1.7505    0.7374 
  (0.3598)  (0.4496)  (0.5145)  (0.3358)
Likelihood:         -813.836 
Method:             BFGS 
Convergence code:   0 
Iterations:         73 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>