Lines Matching full:old
39 welch.sd = function (old.rate, new.rate) {
40 old.se.squared = var(old.rate) / length(old.rate)
42 return(sqrt(old.se.squared + new.se.squared))
46 # by dividing by old.mu and not new.mu, because old.mu is what the mean
48 confidence.interval = function (shared.se, old.mu, w, risk) {
50 return(sprintf("±%.2f%%", (interval / old.mu) * 100))
55 old.rate = subset(subdat, binary == "old")$rate;
58 # Calculate improvement for the "new" binary compared with the "old" binary
59 old.mu = mean(old.rate);
61 improvement = sprintf("%.2f %%", ((new.mu - old.mu) / old.mu * 100));
72 if (length(old.rate) > 1 && length(new.rate) > 1) {
76 shared.se = welch.sd(old.rate, new.rate)
92 "accuracy (*)" = confidence.interval(shared.se, old.mu, w, 0.05),
93 "(**)" = confidence.interval(shared.se, old.mu, w, 0.01),
94 "(***)" = confidence.interval(shared.se, old.mu, w, 0.001)