pctDiff {ssExtra} | R Documentation |
This is a very simple little function to calculate the percentage difference between an ‘estimate’ and the ‘true’ value.
pctDiff(est, true, ...)
est |
The ‘estimate’ value, which can be a vector, to test
against the |
true |
The ‘true’ value, which can be a vector, to test
against the |
... |
The simple percent difference: (est-true)/true*100.
The result of the above computation, which can be a vector or scalar.
Jeffrey H. Gove
pctDiff(8, 10) pctDiff(c(8, 12), 10) pctDiff(c(8, 12), c(10, 6))