[R] Problem with reproducing log likelihood estimated with ghyp package

Steinar steinar.veka at gmail.com
Sat Dec 17 10:57:55 CET 2011

I was playing around with the ghyp package and simulated series of
t-distributed variables when suddenly i was not able to reproduce the log
likelihood values reported by the package. When trying to reproduce the
likelihood values, I summed the log(dt(x,v)) values and it worked with some
simulated series but not all. 

Is there any obvious flaws with this script?


#simulating 10000 relation of student t variables with df=4
#Which implies a standrad deviation equal to sqrt(2)


#To get student t distributed variabler with standard
#deviation equal to 5 I rescale the first series

#When i check the first series with the ghyp package, the result coincides
#the sum of log likelihood calculated with dt(x, df, ncp, log = FALSE)

fit_1=fit.tuv(series_1, silent=T, symmetric=T)

#The two log likelihood estimates is approximatly equal, and the parameters

#When I check series 2, i get a very different result. The estimate for mu
and nu 
#is still sensible, but the log likelihood is very different from what i get
#dt(x, df, ncp, log = FALSE)

fit_2=fit.tuv(series_2, silent=T, symmetric=T)

#This is very different

View this message in context: http://r.789695.n4.nabble.com/Problem-with-reproducing-log-likelihood-estimated-with-ghyp-package-tp4207833p4207833.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list