[R] rtmvt function in tmvtnorm package

2017-03-30 Thread Maity, Arnab K
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

[R] rtmvt

2011-05-30 Thread statfan
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=

Re: [R] rtmvt

2011-04-11 Thread Tóth Dénes
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

[R] rtmvt

2011-04-10 Thread statfan
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