R: Summarizing Normal Inverse Gaussian Distribution Fit
summary.gigFit
R Documentation
Summarizing Normal Inverse Gaussian Distribution Fit
Description
summary Method for class "gigFit".
Usage
## S3 method for class 'gigFit'
summary(object, hessian = FALSE,
hessianMethod = c("tsHessian","exact"), ...)
## S3 method for class 'summary.gigFit'
print(x,
digits = max(3, getOption("digits") - 3), ...)
Arguments
object
An object of class "gigFit", resulting from a call to
gigFit.
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.gigFit", resulting from
a call to summary.gigFit.
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 gigFit to
summary.gigFit so that it can be passed to
print.summary.gigFit for printing in a convenient form.
If hessian = TRUE the Hessian is calculated via a call to
gigHessian 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.gigFit.
Value
summary.gigFit 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.gigFit.
See gigFit for the composition of an object of class
gigFit.
If the Hessian and standard errors have not been added to the object
x, print.summary.gigFit prints a summary in the same
format as print.gigFit. 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.
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.gigFit.Rd_%03d_medium.png", width=480, height=480)
> ### Name: summary.gigFit
> ### Title: Summarizing Normal Inverse Gaussian Distribution Fit
> ### Aliases: summary.gigFit print.summary.gigFit
> ### Keywords: distribution
>
> ### ** Examples
>
> ### Continuing the gigFit(.) example:
> param <- c(1,1,1)
> dataVector <- rgig(500, param = param)
> fit <- gigFit(dataVector)
> print(fit)
Data: dataVector
Parameter estimates:
chi psi lambda
0.4305 1.1983 1.3922
Likelihood: -571.8416
Method: Nelder-Mead
Convergence code: 0
Iterations: 280
> summary(fit, hessian = TRUE, hessianMethod = "tsHessian")
Data: dataVector
Hessian: tsHessian
chi psi lambda
[1,] -32.63525 259.3988 -146.0166
[2,] 259.39879 -1892.1068 353.9889
[3,] -146.01664 353.9889 -171.4743
Parameter estimates:
chi psi lambda
0.43052 1.19830 1.39225
( NaN) (0.02910) (0.01727)
Likelihood: -571.8416
Method: Nelder-Mead
Convergence code: 0
Iterations: 280
Warning message:
In sqrt(diag(varcov)) : NaNs produced
>
>
>
>
>
> dev.off()
null device
1
>