approxerror | R Documentation |
This function computes the "approximate estimate of the error" ("percent relative error").
approxerror(pres, prev)
pres |
numeric vector that contains the "present approximation" value(s) |
prev |
numeric vector that contains the "previous approximation" value(s) |
Approximate error is expressed as
\varepsilon_{a} = \frac{{present \: approximation} - {previous \: approximation}}{present \: approximation} \cdot 100
\varepsilon_a
the "approximate estimate of the error"
the "present approximation"
the "previous approximation"
approximate error, as a percent (%), as a numeric vector
.
Irucka Embry
Steven C. Chapra, Applied Numerical Methods with MATLAB for Engineers and Scientists, Second Edition, Boston, Massachusetts: McGraw-Hill, 2008, page 82-84.
sgm
for geometric mean, shm
for harmonic mean, cv
for
coefficient of variation (CV), rms
for root-mean-square (RMS), relerror
for relative error, and ranges
for sample range.
library(iemisc)
# Example 4.1 from the Reference text (page 84)
approxerror(1.5, 1) # answer as a percent (\%)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.