Displaying 20 results from an estimated 1000 matches similar to: "rtmvt"
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:
>
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 Apr 02
1
truncated distributions
I am sampling from the truncated multivariate student t distribution "rtmvt"
in the package {tmvtnorm}. My question is about the mean vector. Is it
possible to define a mean vector outside of the truncated region? Thank you
in advance for any help.
--
View this message in context: http://r.789695.n4.nabble.com/truncated-distributions-tp3422245p3422245.html
Sent from the R help mailing
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
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
2006 Aug 11
2
about MCMC pack again...
Hello, thank you very much for your previous answers about the C++ code.
I am interested in the application of the Gibbs Sampler in the IRT
models, so in the function MCMCirt1d and MCMCirtkd. I've found the C++
source codes, as you suggested, but I cannot find anything about the
Gibbs Sampler. All the files are for the Metropolis algorithm.
Maybe I am not able to read them very well, by the
2009 Aug 17
1
Bayesian data analysis - help with sampler function
I have downloaded the Umacs (Universal Markov chain sampler) and submitted the following sample code from Kerman and Gelman.
s <-Sampler(
J=8,
sigma.y =c(15,10,16,11,9,11,10,18),
y =c(28, 8,-3,7,-1,1,18,12),
theta =Gibbs(theta.update,theta.init),
V =Gibbs(V.update,mu.init),
mu =Gibbs(mu.update,mu.init),
tau =Gibbs(tau.update,tau.init),
2004 Mar 19
1
R_qsort_int_I() error
Hi,
I want to use R_qsort_int_I() in my C function, but getting the
following error. It looks like there is a conflict between Rmath.h,
which I use to generate random numbers, and R_ext/Boolean.h I would
appreciate any help to fix this problem.
gcc -ansi -g -o Gibbs gibbs.c subroutines.o rand.o vector.o -lm -lRmath
-llapack -lblas -lfrtbegin -lg2c -lm -shared-libgcc
In file included from
2011 Nov 07
3
Correction in error
Hello R community, following is my code and it shows error, can some one
fix this error and explain why this occurs?
gibbs <-function(m,n, theta = 0, lambda = 1){
alpha <- 1.5
beta <- 1.5
gamma <- 1.5
x<- array(0,c(m+1, 3))
x[1,1] <- theta
x[1,2] <- lambda
x[1,3]<- n
for(t in 2:m+1){
x[t,1] <- rbinom(x[t-1,3], 1, x[t-1,1])
2010 Oct 11
2
topicmodels error
I try to fit a LDA model to a TermDocumentMatrix with the topicmodels
package...
but R says:
> Error in LDA(TDM, k = k, method = "Gibbs", control = list(seed = SEED, :
> x is of class ?TermDocumentMatrix??simple_triplet_matrix?
> class(TDM)
> [1] "TermDocumentMatrix" "simple_triplet_matrix"
I try to use a matrix... but don't work:
> MAT
2008 Nov 01
2
sampling from Laplace-Normal
Hi,
I have to draw samples from an asymmetric-Laplace-Normal distribution:
f(u|y, x, beta, phi, sigma, tau) \propto exp( - sum( ( abs(lo) +
(2*tau-1)*lo )/(2*sigma) ) - 0.5/phi*u^2), where lo = (y - x*beta) and
y=(y_1, ..., y_n), x=(x_1, ..., x_n)
-- sorry for this huge formula --
A WinBUGS Gibbs sampler and the HI package arms sampler were used with the
same initial data for all parameters. I
2005 Jul 19
1
initial points for arms in package HI
Dear R-users
I have a problem choosing initial points for the function arms()
in the package HI
I intend to implement a Gibbs sampler and one of my conditional
distributions is nonstandard and not logconcave.
Therefore I'd like to use arms.
But there seem to be a strong influence of the initial point
y.start. To show the effect I constructed a demonstration
example. It is reproducible
2011 Nov 10
1
Gibbs sampler
I have the following code,
gibbs <-function(m,theta = 0.25, lambda =0.55, n =1){
alpha <- 1.5
beta <- 1.5
gamma <- 1.5
x<- array(0,c(m+1, 3))
x[1,1] <- theta
x[1,2] <- lambda
x[1,3]<- n
for(t in 2:(m+1)){
x[t,1] <- rbinom(1, x[t-1,3], x[t-1,1])
x[t,2]<-rbeta(1, x[t-1,1] + alpha, x[t-1,3] - x[t-1,1] + beta)
x[t,3]
2008 May 09
1
Have you ever experienced this problem with REAL in a C code
Dear all,
I'm currently experiencing big troubles with my C code called by .Call
in a R function.
I know this may not be the right place for such things but these errors
are driving me crazy. And I hope other people may have already
experienced these problems so that they could give me good suggestions.
Sorry if I'm completely out of topic.
Well let's go...
I'm writing a
2006 Jul 29
2
deflexion exercise?
I read the Ed Gibbs blog posting on BDD, and there was a reference to
implementing the game Deflexions as a way of learning about
expectations...
I''d like to do this exercise, can you provide me with the details
(starting points, objectives, etc...)
Thanks!
Dominique
-------------------------------------------------------------
dom.website = http://www.binaryshift.com