similar to: truncated distributions

Displaying 20 results from an estimated 300 matches similar to: "truncated distributions"

2011 Apr 11
1
rtmvt
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]))*delta[,,i], df=ceiling(nu[i]+p), lower=c(0,0), algorithm="gibbs") Any
2017 May 09
3
Generating samples from truncated multivariate Student-t distribution
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 package ?tmvtnorm?. I have also calculated mean vector using equation (3) from attached pdf. The problem is, that after summing all elements in one column of rtmvt result
2011 May 31
0
rtmvt
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=mu[i,j], sigma[i,j], df=nu[i], lower=rep(0,2),algorithm="gibbs") } } heres an example of one iteration: >
2010 Mar 16
0
tmvtnorm: version 1.0-2
Dear R users, the tmvtnorm package, the package for the truncated multivariate normal and Student-t distribution, has been updated on CRAN. The major changes in version 1.0-2 (2010-03-04) are: * The package now provides methods for the truncated multivariate Student-t distribution, i.e. random number generation, density function, distribution functions like rtmvt(), dtmvt() und ptmvt() and
2010 Mar 16
0
tmvtnorm: version 1.0-2
Dear R users, the tmvtnorm package, the package for the truncated multivariate normal and Student-t distribution, has been updated on CRAN. The major changes in version 1.0-2 (2010-03-04) are: * The package now provides methods for the truncated multivariate Student-t distribution, i.e. random number generation, density function, distribution functions like rtmvt(), dtmvt() und ptmvt() and
2017 Aug 02
0
Generating samples from truncated multivariate Student-t distribution
>>>>> David Winsemius <dwinsemius at comcast.net> >>>>> on Tue, 9 May 2017 14:33:04 -0700 writes: >> On May 9, 2017, at 2:05 PM, Czarek Kowalski <czarek230800 at gmail.com> 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:
2011 Feb 07
1
Question about checkTmvArgs function in rtmvnorm (package tmvtnorm)
Hello! I was wondering if it's possible to see the actual code of checkTmvArgs function that is part of the code for rtmvnorm (which is below - I just typed "rtmvnorm" on the prompt). I get an error: Error in checkTmvArgs(mean, sigma, lower, upper) : sigma must be a symmetric matrix At the same time I am pretty sure that the matrix I am passing as sigma is a var-covar matrix
2011 Feb 07
0
under what conditions would rtmvnorm (from package tmvtnorm) produce all NaNs
Hello! I am trying to generate a sample from a truncated multivariate normal distribution using rtmvnorm. I am using Gibbs because my alpha (line below) is teeny-tiny ( 4.083475e-64 ) alpha = pmvnorm(lower=lower, upper=upper, mean=btilde, sigma=MyVarCovar). When I try my Gibbs run, it takes quite a long time (with 10,000 iterations and 5,000 iterations burn-in) ~ 22 sec. And then what I get is
2011 Mar 27
1
pmt
I am working with the pmt function in the {mnormt} package, and i am getting negative values returned. the following is an example of one of my outputs: pmt(x = c(3.024960, -1.010898), mean = c(21.18844, 21.18844), S = matrix(c(.319,.139,.139,0.319), 2, 2),df = 42) # -6.585641e-18 Any help on why i'm getting negative numbers would be very much appreciated. THanks! -- View this message in
2012 Mar 19
2
hypergeometric function in ‘ mvtnorm’
Is there any way to know how the "dmvt" function computes the hypergeometric function needed in the calculation for the density of multivariate t distribution? -- View this message in context: http://r.789695.n4.nabble.com/hypergeometric-function-in-mvtnorm-tp4483730p4483730.html Sent from the R help mailing list archive at Nabble.com.
2011 Dec 22
1
try to silence errors
I am trying to use the dmt function in the package {mnormt}. Throughout my algorithm, the covariance matrix is sometime calculated to be singular. When attempting to calculate the dmt function with a covariance that is not positive definite, I would like it to return Inf or NaN instead of an error message. I have been using the try function, however it is not yeilding the desired result. (I did
2009 Oct 09
0
Updates to tmvtnorm package
Dear R users, the tmvtnorm package, the package for the truncated multivariate normal distribution, has been updated on CRAN. The major changes in version 0.8 are: * Reimplemented the Gibbs' sampler for random number generation in Fortran for performance reasons. This compiled code is now even faster than conventional rejection sampling and allows for the generation of large amounts of
2009 Oct 09
0
Updates to tmvtnorm package
Dear R users, the tmvtnorm package, the package for the truncated multivariate normal distribution, has been updated on CRAN. The major changes in version 0.8 are: * Reimplemented the Gibbs' sampler for random number generation in Fortran for performance reasons. This compiled code is now even faster than conventional rejection sampling and allows for the generation of large amounts of
2011 Oct 23
1
symmetric matrix multiplication
I have a symmetric matrix B (17x17), and a (17x17) square matrix A. If do the following matrix multiplication I SHOULD get a symmetric matrix, however i don't. The computation required is: C = t(A)%*%B%*%A here are some checks for symmetry > (max(abs(B - t(B)))) [1] 0 > C = t(A)%*%B%*%A > (max(abs(C - t(C)))) [1] 3.552714e-15 Any help on the matter would be very much appreciated.
2010 Apr 21
3
Leer datos de Unicode
Hola, Tengo un problema cuando trato de leer datos que contienen caracteres en Unicode en R 2.10 (windows). La tabla que trato de leer tiene caracteres en Unicode en el nombre de las columnas ( si los tiene en el nombre de las filas no falla aunque me modifica el nombre ) La linea que utilizo es: read.table("example_unicode.txt", sep="\t", dec=".", header=T,
2011 Sep 20
0
rtmvnorm performance issues
When sampling from a multi-variate truncated normal using rtmvnorm from the tmvnorm-package, I experience extreme performance differences between two of my computers. On my laptop computer, draws take ~5s, on my desktop ~30s. I need to run MCMCs with repeat calls to rtmvnorm on my desktop. The code in both cases is exactly the same. rtmvnorm seems not to have any machine dependent defaults
2013 May 08
0
how to get samples from rtmvnorm with large dimensions
Hi, dear all, I wish to get one sample (2500-d vector) from the truncated multivariate normal distribution, so I choose use the R function rtmvnorm() to do this. But the error information shows that for this function, the dimension should be lower than 1000, So could you help me to find out if there's any solution could do such sampling from a truncated multivariate normal distribution
2024 Jul 18
1
Printing digits.secs on data.frame?
Is there a way to have printing data.frames with POSIXct to display milliseconds if digits.secs is set as a default? You can use the digits argument in print, such as print(df, digits = 3) to get the intended output, but I assumed it was done with the option digits.secs set. Tibbles by default do this printing, which is shown below, but I was unsure if digits.secs should affect printing
2011 Oct 17
3
Extracting results from a function output
Hello, I am having hard time obtaining a value from a function. "fit" is a survival function that produces some results, such as "median", "confidence intervals" etc. But str() function does not list these values. How can I extract these to be able use them? For example, I need "median" value for the group DrugA which is 48. "Print" function does
2004 Oct 16
3
Cox PH Warning Message
Hi, Can anybody tell me what the message below means and how to overcome it. Thanks, Neil Warning message: X matrix deemed to be singular; variable 2 in: coxph(Surv(age_at_death, death) ~ project$pluralgp + project$yrborn + ......... >