Closed Rmadillo closed 6 months ago
Thanx, Rmadillo
This is exactly what open source is about :) The calculation is correct. However, I wonder why I subtract the center line from y before calculating amr. There must have been a reason. I'll look into that.
But subtracting a constant (x$cl[base] from the y values before calculating the pairwise differences makes no difference to the result. Here is an example.
` set.seed(1) y <- rnorm(12)
cl <- mean(y) amr <- mean(abs(diff(y))) ucl1 <- cl + 3 * amr / 1.128
ucl2 <- qicharts2::qic(y, chart = 'i')$data$ucl[1] identical(ucl1, ucl2) `
Ah, of course. 1) I miscounted the parentheses and 2) (worse) I was testing results for a t-chart but in in qic
I had written chart = 'g'
. Idiot = me. But thank you for responding to a dumb question!
No such thing as a dumb question. You got my pulse up, though, which is a good thing :)
In the helper functions file, I was wondering whether this was a typo or purposeful to calculate the moving range for the t/i charts:
Typically, the MR is based on the difference between x and x-1, rather than the center line (cl), which is what it looks like this code is doing? Or am I missing how this code worked?
Thanks!