# Why do I get this error using ghyp-distribution function?

I want to fit multivariate GH distribution on my data, and then generate simulations for that distribution. Using the instructions given in ghyp package, I wrote following lines of code in R.

> data(smi.stocks)
> fitted <- fit.ghypmv(data = smi.stocks, silent=TRUE)
> rghyp(n = 100, fitted)
Error in ghypCheckPars(param) :
(list) object cannot be coerced to type 'double'


However, it gives me the error as shown above.

Any thoughts on why is it happening?

• check structure of your data – Neeraj Nov 28 '15 at 10:34
• @Neeraj The data I'm using is the one provided by ghyp package. It's a matrix of daily returns from January 2000 to January 2007 of five swiss blue chips and the Swiss Market Index (SMI). – HasnainMamdani Nov 28 '15 at 16:10
• this fits at most to stackoverflow as it is purely a coding question. – Richard Nov 28 '15 at 16:37
• I'm voting to close this question as off-topic because see comment. – Richard Nov 28 '15 at 16:37
• I can not install the package at the moment as there is a time out (?) for this package and its dependencies (installing other packages works ..) did you check the properties of fitted? if smi.stocks is multivariate, can you calibrate it with one call? I doubt that. So check all data and objects using print() or head(). – Richard Nov 28 '15 at 17:13

• I reinstalled packages using commands like install.packages("ghyp") and re-ran my code, but got the same error. (I'm using R 3.2.2 GUI 1.66 Mavericks build (6996)) – HasnainMamdani Nov 29 '15 at 15:52