Description Usage Arguments Value See Also Examples
Function to calculate goodness of fit measures for regressions.
1 | calc_goodnessOfFit(predicted, observed)
|
predicted |
vector of predicted values |
observed |
vector of observed values |
A list with the following items:
rmse
Root mean square error
= sqrt(mean((predicted - observed)^2), na.rm = TRUE))
rSquared
Coefficient of determination =
1 - sum((predicted - observed)^2) / sum((observed - mean(observed, na.rm = TRUE))^2)
Useful indicator, although for non-linear models it is not strictly appropriate since the
'null hypothesis', a horizontal line, is not necessarily a subset of the model space.
Based on the traditional definition, see ?caret::R2
.
normalityTestResiduals
P-value of a kolmogorov-smirnoff test
(ks.test
). Null-hypothesis: Normal distribution
with mean 0 and standard deviation = sd(predicted - observed))
1 | test <- calc_goodnessOfFit(predicted = 1:10 + rnorm(10,0,0.3), observed = 1:10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.