Skip to content

Instantly share code, notes, and snippets.

@sjp
Created February 23, 2010 05:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sjp/311872 to your computer and use it in GitHub Desktop.
Save sjp/311872 to your computer and use it in GitHub Desktop.
> library(GeneralizedHyperbolic)
> dghyp(2)
[1] 0.08878272
> dghyp(0)
[1] 0.3055948
> dghyp(3, mu = 4)
[1] 0.2019553
> dghyp(3, mu = 4, alpha = 3)
[1] 0.1789202
> ghypdata <- rghyp(1000)
> fitteddata <- hyperbFit(ghypdata, hessian = TRUE)
> summary(fitteddata) # Printing fitted paramaters & std errors
Data: ghypdata
Parameter estimates:
mu delta alpha beta
-0.02921 0.57314 0.94262 -0.03066
( 0.08689) ( 0.19332) ( 0.05222) ( 0.03881)
Likelihood: -1852.273
Method: Nelder-Mead
Convergence code: 0
Iterations: 169
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment