Dear R users.
I am trying to generate random numbers from truncated multivariate t
distribution. I use the following:
as.vector(rtmvt(n = 1, sigma = Qc.inv, df = 3, lower = logtime[censored.id],
+ algorithm = "gibbs"))
Error in while (!acceptedW) { : missing value where TRUE/FA
I want to use the rtmvt from the {tmvtnorm} package using the "gibbs"
algorithm but how to i specify the nested function rtmvnorm to use gibbs as
well?
Right now I am using the code:
for (i in 1:g){
for (j in 1:n){
sgamma[,,i,j] = rtmvt(n=50, mean=
Hi there,
Since you failed to provide us with data and sessionInfo(), I can only
guess that for some reason you call the rtmvt.rejection function instead
of rtmvt.gibbs.
Just look at the code of rtvmt by typing:
rtmvt
There you can see that it is a wrapper for rtmvt.rejection or rtmvt.gibbs.
You
I have been using the rtmvt function in the {tmvtnorm} package i'm getting
the warning:
"Acceptance rate is very low and rejection sampling becomes inefficient.
Consider using Gibbs sampling."
but i AM specifying the gibbs algorithm!!:
rtmvt(M, mean=q[,,i,j], sigma=((u[i,j] + nu[i])/(p+nu[i]))*d
4 matches
Mail list logo