View source: R/datalow_utils.r
calcrmse | R Documentation |
given a set of observations and predicted values, calcrmse calculates the root mean square error sqrt(resid^2/n) to provide a measure of relative fit. An assumption of normal errors is made so if the observations and predicted values actually have a log-normal distribution one should log-transform the input values.
calcrmse(obs, pred)
obs |
the observed data |
pred |
the predicted values whose fit to the observations is to measured |
a scalar value which is the rmse.
## Not run:
x <- rep(1,10)
y <- c(1.109,1.210,0.947,0.933,0.832,0.864,0.633,0.820,1.004,1.049)
calcrmse(log(x),log(y)) # should be 0.1899495
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.