search for: 20stability

Displaying 4 results from an estimated 4 matches for "20stability".

2017 Dec 27
2
Numerical stability in chisq.test
The chisq.test on line 57 contains following code: STATISTIC <- sum(sort((x - E)^2/E, decreasing = TRUE)) However, based on book "Accuracy and stability of numerical algorithms" available from: http://ftp.demec.ufpr.br/CFD/bibliografia/Higham_2002_Accuracy%20and%20Stability%20of%20Numerical%20Algorithms.pdf Table 4.1 on page 89, it is better to sort the data in increasing order than in decreasing order, when the data are non-negative. An example: x = matrix(c(rep(1.1, 10000)), 10^16, nrow = 10001, ncol = 1) # We have a vector with 10000*1.1 and 1*10^16 c(sum(sor...
2017 Dec 28
0
Numerical stability in chisq.test
...ay to deal with rounding issues (PR#3486): STATISTIC <- sum(sort((x - E) ^ 2 / E, decreasing = TRUE)) -k > However, based on book "Accuracy and stability of numerical algorithms" available from: > http://ftp.demec.ufpr.br/CFD/bibliografia/Higham_2002_Accuracy%20and%20Stability%20of%20Numerical%20Algorithms.pdf > Table 4.1 on page 89, it is better to sort the data in increasing order than in decreasing order, when the data are non-negative. > An example: > x = matrix(c(rep(1.1, 10000)), 10^16, nrow = 10001, ncol = 1) # We have a vector with 10000*1.1 and 1*1...
2017 Dec 27
0
Numerical stability in chisq.test
The chisq.test contains following code: STATISTIC <- sum(sort((x - E)^2/E, decreasing = TRUE)) However, based on book Accuracy and stability of numerical algorithms <http://ftp.demec.ufpr.br/CFD/bibliografia/Higham_2002_Accuracy%20and%20Stability%20of%20Numerical%20Algorithms.pdf> Table 4.1 on page 89, it is better to sort the data in increasing order than in decreasing order, when the data are non-negative. A demonstrative example: x = matrix(c(rep(1.1, 10000)), 10^16, nrow = 10001, ncol = 1) # We have a vector with 10000*1.1 and 1*...
2017 Dec 28
1
Numerical stability in chisq.test
...the code may therefore unfix PR#3486; at the very least some care is required if this is modified. -pd > >> However, based on book "Accuracy and stability of numerical algorithms" available from: >> http://ftp.demec.ufpr.br/CFD/bibliografia/Higham_2002_Accuracy%20and%20Stability%20of%20Numerical%20Algorithms.pdf >> Table 4.1 on page 89, it is better to sort the data in increasing order than in decreasing order, when the data are non-negative. > >> An example: >> x = matrix(c(rep(1.1, 10000)), 10^16, nrow = 10001, ncol = 1) # We have a vector with...