baseCode.math.distribution
Class Wishart

java.lang.Object
  extended bybaseCode.math.distribution.Wishart

public class Wishart
extends java.lang.Object

Wishart distribution, used to simulate covariance matrices.

Based on method in Odell and Feiveson JASA 1966 p.199-203

The interface is modeled after ContinuousDistribution from colt, which unfortunately is designed only for univariate distributions.


Copyright (c) 2004 Columbia University

Version:
$Id: Wishart.java,v 1.1 2005/01/16 03:51:11 pavlidis Exp $
Author:
pavlidis

Constructor Summary
Wishart(double df, cern.colt.matrix.DoubleMatrix2D covariance, cern.jet.random.engine.RandomEngine randomGenerator)
           
 
Method Summary
 cern.colt.matrix.DoubleMatrix2D nextDoubleMatrix()
          Based on R code from Francesca Dominici, http://www.biostat.jhsph.edu/~fdominic/teaching/BM/bm.html
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Wishart

public Wishart(double df,
               cern.colt.matrix.DoubleMatrix2D covariance,
               cern.jet.random.engine.RandomEngine randomGenerator)
Parameters:
df -
covariance -
randomGenerator -
Method Detail

nextDoubleMatrix

public cern.colt.matrix.DoubleMatrix2D nextDoubleMatrix()
Based on R code from Francesca Dominici, http://www.biostat.jhsph.edu/~fdominic/teaching/BM/bm.html

Returns

 
  
   
    
     
            
                 w=(RU)'RU
       
      
     
    
   
  
 
where
 
  
   
    
     
      
       
        
         Cov=U'U (U is upper triang) 
    
   
  
 
and where upper-tri R is
 
  
                                         R_ij˜N(0,1), i<j ; (R_ii)ˆ2˜Chisq(nu-s+i)
    
   
  
 

Returns:


Copyright © 2003-2005 Columbia University. All Rights Reserved.