Re: [R] Generating samples from truncated multivariate Student-t distribution

2017-08-02 Thread Martin Maechler
> David Winsemius > on Tue, 9 May 2017 14:33:04 -0700 writes: >> On May 9, 2017, at 2:05 PM, Czarek Kowalski wrote: >> >> I have already posted that in attachement - pdf file. > I see that now. I failed to scroll to the 3rd page. from a late reader: Please, Czare

Re: [R] Generating samples from truncated multivariate Student-t distribution

2017-05-10 Thread David Winsemius
> On May 10, 2017, at 11:02 AM, Czarek Kowalski wrote: > > Previously I had used another language to make calculations based on > theory. I have calculated using R and I have received another results. > My theoretical calculation does not take into account the full > covariance matrix (only 6 el

Re: [R] Generating samples from truncated multivariate Student-t distribution

2017-05-10 Thread peter dalgaard
It's not obvious to me that that marginal distribution of one component of a multivariate truncated t is the corresponding univariate truncated t. In fact, I would expect it to differ because of tail-dependence effects, e.g. > r <- rtmvt(1e5, c(30,0), diag(2), lower=c(29,-Inf), upper=c(31, +Inf)

Re: [R] Generating samples from truncated multivariate Student-t distribution

2017-05-10 Thread Czarek Kowalski
Previously I had used another language to make calculations based on theory. I have calculated using R and I have received another results. My theoretical calculation does not take into account the full covariance matrix (only 6 elements from diagonal). Code based on theory: df = 4; #degrees of

Re: [R] Generating samples from truncated multivariate Student-t distribution

2017-05-09 Thread David Winsemius
> On May 9, 2017, at 2:33 PM, David Winsemius wrote: > > >> On May 9, 2017, at 2:05 PM, Czarek Kowalski wrote: >> >> I have already posted that in attachement - pdf file. > > I see that now. I failed to scroll to the 3rd page. > >> I am posting >> plain text here: >> >>> library(tmvtnorm)

Re: [R] Generating samples from truncated multivariate Student-t distribution

2017-05-09 Thread David Winsemius
> On May 9, 2017, at 2:05 PM, Czarek Kowalski wrote: > > I have already posted that in attachement - pdf file. I see that now. I failed to scroll to the 3rd page. > I am posting > plain text here: > >> library(tmvtnorm) >> meann = c(55, 40, 50, 35, 45, 30) >> covv = matrix(c( 1, 1, 0, 2, -1,

Re: [R] Generating samples from truncated multivariate Student-t distribution

2017-05-09 Thread Czarek Kowalski
I have already posted that in attachement - pdf file. I am posting plain text here: > library(tmvtnorm) > meann = c(55, 40, 50, 35, 45, 30) > covv = matrix(c( 1, 1, 0, 2, -1, -1, + 1, 16, -6, -6, -2, 12, + 0, -6, 4, 2, -2, -5, + 2, -6, 2,

Re: [R] Generating samples from truncated multivariate Student-t distribution

2017-05-09 Thread David Winsemius
> On May 9, 2017, at 1:11 PM, Czarek Kowalski wrote: > > Of course I have expected the difference between theory and a sample > of realizations of RV's and result mean should still be a random > variable. But, for example for 4th element of mean vector: 35.31 - > 34.69571 = 0.61429. It is quite

Re: [R] Generating samples from truncated multivariate Student-t distribution

2017-05-09 Thread Czarek Kowalski
Of course I have expected the difference between theory and a sample of realizations of RV's and result mean should still be a random variable. But, for example for 4th element of mean vector: 35.31 - 34.69571 = 0.61429. It is quite big difference, nieprawdaĊĵ? I have expected that the difference wo

Re: [R] Generating samples from truncated multivariate Student-t distribution

2017-05-09 Thread David Winsemius
> On May 9, 2017, at 10:09 AM, Czarek Kowalski wrote: > > Dear Members, > I am working with 6-dimensional Student-t distribution with 4 degrees > of freedom truncated to [20; 60]. I have generated 100 000 samples > from truncated multivariate Student-t distribution using rtmvt > function from pa