search for: riwish

Displaying 3 results from an estimated 3 matches for "riwish".

Did you mean: iwish
2005 Apr 28
1
riwish() problem
R users- In moving from R 2.0.0 to R 2.1.0 in Windows, I have encountered a problem with the "riwish" command in the package "MCMCpack". I've searched the documentation and can't seem to figure it out. For example: Define a matrix: > lam <- matrix(c(.00233,-.00057,-.00057,.00190),2,2) and then use the riwish command to generate a random inverse-Wishart variate:...
2012 Mar 01
1
Parameterization of Inverse Wishart distribution available in MCMCpack and bayesm libraries
...ee of freedom, Scale -> Scale parameter). If we follow standard usage when we refer to the Degree of Freedom of the above IW distribution it is = DOF (and not 0.5* DOF). Similarly the Scale parameters of the above IW it is= Scale (and not 0.5*Scale). For the MCMCpack the IW draws are made by riwish(v,S). *Question:* Does this compute IW( v,S) or IW(0.5*v,0.5*S) ? This is the reason I want to find out the way these libraries parameterize the Inverted Wishart distribution. Best Shantanu [[alternative HTML version deleted]]
2007 Jul 24
1
function optimization: reducing the computing time
...(n-1) s.yy <- (sd.c[2]^2) * (n-1) s.xy <- sd.c[1] * sd.c[2] * r * (n-1) A <- matrix(c(s.xx, s.xy, s.xy, s.yy), ncol=2) #estimation function if(standardized) { estimation <- function(patient, mean.c, n, A) { #estimation of a variance/covariance matrix (sigma) sigma = riwish(n,A) #random obs. from an inverse-Wishart distribution #estimation of the means (mu) z <- rnorm(2) T <- t(chol(sigma)) #Cholesky decomposition mu <- mean.c + T %*% z/sqrt(n) #standardization z.x <- (patient[1]-mu[1]) / sqrt(sigma[1,1]) z.y <- (patient[2]-mu[2...