Learn R Programming

CAISEr (version 0.3.3)

calc_phi: Calculates the sample estimator of (simple or percent) differences

Description

Calculates the sample estimator of the (simple or percent) differences between the means of two algorithms on a given instance.

  • If `dif == "simple": estimates \(mu2 - mu1\),

  • If `dif == "perc": estimates \((mu2 - mu1) / mu1\),

Usage

calc_phi(x1, x2, dif)

Arguments

x1

vector of observations

x2

vector of observations

dif

type of difference to estimate ("simple" or "perc")

Value

Estimated value of the statistic given in dif

Details

where \(mu1, mu2\) are the means of the populations that generated the sample vectors \(x1, x2\).

References

  • F. Campelo, F. Takahashi: Sample size estimation for power and accuracy in the experimental comparison of algorithms (submitted, 2017).

Examples

Run this code
# NOT RUN {
x1 <- rnorm(25, 3, 0.5)
x2 <- runif(15, 4, 6)
calc_phi(x1, x2, "simple")
calc_phi(x1, x2, "perc")
# }

Run the code above in your browser using DataLab