calc_goodnessOfFit: calc_GoodnessOfFit

Description Usage Arguments Value See Also Examples

Description

Function to calculate goodness of fit measures for regressions.

Usage

1
calc_goodnessOfFit(predicted, observed)

Arguments

predicted

vector of predicted values

observed

vector of observed values

Value

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))

See Also

plot_goodnessOfFit

Examples

1
test <- calc_goodnessOfFit(predicted = 1:10 + rnorm(10,0,0.3), observed = 1:10)

MarkusBonsch/mxLSTM documentation built on May 28, 2019, 6:40 a.m.