Hello,

I believe the package has a bug in it that when dim=1, the density of t
distribution isn't correct.

Here is the code that shows visually that the density doesn't match the
random variates.

####################

library(fMultivar)

n = 50000
qtile = seq(-5,5,by=0.05)

xtt = rmvst(n,dim=1,df=3)
hist(xtt,300,xlim=c(-5,5),probability=TRUE)
lines(qtile,dmvst(qtile,dim=1,df=3),col='red')

xn = rmvsnorm(n,dim=1)
hist(xn,300,xlim=c(-5,5),probability=TRUE)
lines(qtile,dmvsnorm(qtile,dim=1),col='red')

xt = rt(n,df=3)
hist(xt,300,xlim=c(-5,5),probability=TRUE)
lines(qtile,dt(qtile,df=3),col='red')

####################

I am trying to compare histogram of randomly generated data versus their
corresponding density functions.

The question is regarding "xtt" variable which are random t.
The histogram and the density function doesn't seem to agree.
If you try the others ("xn" and "xt"), you'll see that these "hug the
curve" especially in the beginning part of the tails.
But "xt" seem to be quite a bit off.

Thank you for your help.

Best,

Sang

	[[alternative HTML version deleted]]

