All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.maizegenetics.stats.statistics.LikelihoodRatioTest Maven / Gradle / Ivy

Go to download

TASSEL 6 is a software package to evaluate traits association. Feature Tables are at the heart of the package where, a feature is a range of positions or a single position. Row in the that table are taxon.

There is a newer version: 6.0.1
Show newest version
// LikelihoodRatioTest.java
//
// (c) 1999-2001 PAL Development Core Team
//
// This package may be distributed under the
// terms of the Lesser GNU General Public License (LGPL)


package net.maizegenetics.stats.statistics;




/**
 * Likelihood ratio test based on chi-square statistics
 *
 * @version $Id: LikelihoodRatioTest.java,v 1.1 2007/01/12 03:26:16 tcasstevens Exp $ 
 *
 * @author Korbinian Strimmer
 */
public class LikelihoodRatioTest
{
	//
	// Public stuff
	//
	
	/**
	 * compute significance level for the differences
	 * in log-likelihood (based on chi-square distribution)
	 *
	 * @param deltaL  difference of Log Likelihood values (>=0)
	 * @param df      degrees of freedom
	 *
	 * @return        significance level
	 */
	public static double getSignificance(double deltaL, int df)
	{
		return 1.0-ChiSquareDistribution.cdf(2.0*deltaL, df);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy