Package ubic.basecode.math.linearmodels
Class MeanVarianceEstimatorTest
- java.lang.Object
-
- ubic.basecode.math.linearmodels.MeanVarianceEstimatorTest
-
public class MeanVarianceEstimatorTest extends Object
- Author:
- ptan
-
-
Constructor Summary
Constructors Constructor Description MeanVarianceEstimatorTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
testDuplicateRows()
Duplicate rowvoid
testInterpolate()
Tests two things: 1.void
testMeanVarianceNoDesignWithColsRowAllMissing()
Data has missing values, no Design matrix provided so plot a generic mean-variance plotvoid
testMeanVarianceNoDesignWithMissing()
Data has missing values, no Design matrix provided so plot a generic mean-variance plot (no voom)void
testVoom()
Test calculation of weights for LeastSquaresFitting.
-
-
-
Method Detail
-
testInterpolate
public void testInterpolate() throws Exception
Tests two things: 1. Input data's X values are not sorted 2. Interpolated X values are outside the domain.- Throws:
Exception
- R code: x = c(9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0, 0.0) y = c(1.0, 0.25, 0.1111111111111111, 0.0625, 0.04, 0.027777777777777776, 0.02040816326530612, 0.015625, 0.012345679012345678, 0.01) interpolate = c(9.5, 8.5, 7.5, 6.5, 5.5, 4.5, 3.5, 2.5, 1.5, 0.5) f<-approxfun(x,y,rule=2) f(c(interpolate))
-
testVoom
public void testVoom() throws Exception
Test calculation of weights for LeastSquaresFitting. See test-squeezevar.R- Throws:
Exception
-
testMeanVarianceNoDesignWithColsRowAllMissing
public void testMeanVarianceNoDesignWithColsRowAllMissing() throws Exception
Data has missing values, no Design matrix provided so plot a generic mean-variance plot- Throws:
Exception
-
-