search for: statfan

Displaying 9 results from an estimated 9 matches for "statfan".

Did you mean: statcan
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
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
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.
2011 Oct 23
0
FW: Re: symmetric matrix multiplication
...at wlandres.net> To: r-help at r-project.org Subject: Re: [R] symmetric matrix multiplication On 23-Oct-11 07:00:07, Daniel Nordlund wrote: >> -----Original Message----- >> From: r-help-bounces at r-project.org >> [mailto:r-help-bounces at r-project.org] >> On Behalf Of statfan >> Sent: Saturday, October 22, 2011 10:45 PM >> To: r-help at r-project.org >> Subject: [R] symmetric matrix multiplication >> >> I have a symmetric matrix B (17x17), and a (17x17) square matrix A. >> If do >> the following matrix multiplication I SHOULD...
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
2011 Apr 07
0
multivariate t distribution
I have been working the the pmt function in the {mnormt} package and which requires "S a positive definite matrix representing the scale matrix of the distribution, such that S*df/(df-2) is the variance-covariance matrix when df>2; a vector of length 1 is also allowed (in this case, d=1 is set)" is there a way that I can specify the scale covariance matrix instead? Or
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
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: >