Documentation ¶
Index ¶
Constants ¶
const ( // Less specifies the alternative hypothesis that the // location of the first sample is less than the second. This // is a one-tailed test. Less Hypothesis = -1 // TwoSided specifies the alternative hypothesis that // the locations of the two samples are not equal. This is a // two-tailed test. TwoSided Hypothesis = 0 // Greater specifies the alternative hypothesis that // the location of the first sample is greater than the // second. This is a one-tailed test. Greater Hypothesis = 1 // LogTransform specifies the input of the wilcox test should be log transformed. // The resulting point estimate and the boundaries are delta percentage. LogTransform DataTransform = 0 // NormalizeResult specifies the output of the wilcox test should be normalized by // dividing the median of the second input of the wilcox test. The point estimate and // the boundaries are delta percentage. NormalizeResult DataTransform = 1 // OriginalResult specifies that we don't need to do additional processing of the // output of the wilcox test. OriginalResult DataTransform = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataTransform ¶
type DataTransform int
A DataTransform specifies transform of the input/output of WilcoxonSignedRankedTest. The default (zero) value is to use the log transform.
type Hypothesis ¶
type Hypothesis int
A Hypothesis specifies the alternative hypothesis of a location test such as a WilcoxonSignedRankedTest. The default (zero) value is to test against the alternative hypothesis that they differ.
type PairwiseWilcoxonSignedRankedTestResult ¶
type PairwiseWilcoxonSignedRankedTestResult struct { // An estimate of the location parameter. Estimate float64 // Lower boundary of the confidence interval. LowerCi float64 // Upper boundary of the confidence interval. UpperCi float64 // The p-value for the test PValue float64 // The median of the first input. By convention, this is the treatment. XMedian float64 // The median of the second input. By convention, this is the control. YMedian float64 }
PairwiseWilcoxonSignedRankedTestResult is the result of a PairwiseWilcoxonSignedRankedTest.
func PairwiseWilcoxonSignedRankedTest ¶
func PairwiseWilcoxonSignedRankedTest(x, y []float64, alt Hypothesis, transform DataTransform) (PairwiseWilcoxonSignedRankedTestResult, error)
PairwiseWilcoxonSignedRankedTest conducts WilcoxonSignedRankedTest on Pinpoint's pairwise job. It performs a Wilcoxon signed rank test of the null that the distribution of x - y is symmetric about mu. y acts as baseline (control) and x acts as treatment. The resulting estimate/CI indicates % change relative to y when using LogTransform and NormalizeResult, and difference relative to y when using OriginalResult.
type WilcoxonSignedRankedTestResult ¶
type WilcoxonSignedRankedTestResult struct { // An estimate of the location parameter. Estimate float64 // Lower boundary of the confidence interval. LowerCi float64 // Upper boundary of the confidence interval. UpperCi float64 // The p-value for the test PValue float64 }
WilcoxonSignedRankedTestResult is the result of a WilcoxonSignedRankedTest.
func WilcoxonSignedRankedTest ¶
func WilcoxonSignedRankedTest(x, y []float64, alt Hypothesis) (WilcoxonSignedRankedTestResult, error)
WilcoxonSignedRankedTest conducts WilcoxonSignedRankedTest based on R implementation.