Description Usage Arguments Value Author(s) References Examples
Calculates and returns mean error (ME).
1 | gofME(Obs, Prd, dgt = 3)
|
Obs |
Observed or measured values or target vector. |
Prd |
Predicted or fitted values by the model. Values produced by approximation or regression. |
dgt |
Number of digits in decimal places. Default is 3. |
MeanError |
Goodness of fit - mean error (ME) |
Prof. Dr. Ecevit Eyduran, TA. Alper Gulbe
Comparison of the Predictive Capabilities of Several Data Mining Algorithms and Multiple Linear Regression in the Prediction of Body Weight by Means of Body Measurements in the Indigenous Beetal Goat of Pakistan - Ecevit Eyduran, Daniel Zaborski, Abdul Waheed, Senol Celik, Koksal Karadas, Wilhelm Grzesiak.
Prediction of Selected Reproductive Traits of Indigenous Harnai Sheep under the Farm Management System via various Data Mining Algorithms - Daniel Zaborski, Muhammad Ali, Ecevit Eyduran, Wilhelm Grzesiak, Mohammad Masood Tariq, Ferhat Abbas, Abdul Waheed, Cem Tirink - Pakistan journal of zoology, 2019.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # dummy inputs, independent variable
# integers from 0 to 19
inputs <- 0:19
# dummy targets/observed values, dependent variable
# a product of 2*times inputs minus 5 with some normal noise
targets <- -5 + inputs*1.2 + rnorm(20)
# linear regression model
model<-lm(targets~inputs)
# About the model
summary(model)
# model's predicted values against targets
predicted<-model$fitted.values
# using library ehaGoF for goodness of fit.
library(ehaGoF)
# Goodness of fit : mean error (ME)
gofME(targets, predicted)
|
Call:
lm(formula = targets ~ inputs)
Residuals:
Min 1Q Median 3Q Max
-2.44637 -1.01714 -0.05805 0.82213 2.59971
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -4.49813 0.58241 -7.723 4.03e-07 ***
inputs 1.17456 0.05241 22.412 1.34e-14 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 1.351 on 18 degrees of freedom
Multiple R-squared: 0.9654, Adjusted R-squared: 0.9635
F-statistic: 502.3 on 1 and 18 DF, p-value: 1.338e-14
[1] 0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.