gof: Computes Various Model Fit Measures

gofR Documentation

Computes Various Model Fit Measures

Description

logLik(m) computes the log likelihood of a cm object, SSE(m) computes the sum of squared errors, MSE(m) computes the mean squared error.

Usage

## S3 method for class 'cm'
logLik(object, newdata = NULL, ...)

MSE(x)

RMSE.cm(x)

SSE(x, ...)

SSE(x)

Arguments

...

other arguments (ignored)

x

a cm object

Details

If a model predicts several values the error measures use the first column of predictions to compute the errors. For example, if the predictions are pr(x) and pr(z), the sum of squared errors is based on the data - pr(x).

Value

A number measuring the goodness of fit between predictions and observed data.

See Also

Other fit measures for cognitive models: AICc.cm(), MSE.cm()

Other fit measures for cognitive models: AICc.cm(), MSE.cm()

Other fit measures for cognitive models: AICc.cm(), MSE.cm()

Other fit measures for cognitive models: AICc.cm(), MSE.cm()

Examples

MSE(M)     # 0.1805

D <- data.frame(x = 1, y = 1:1, z = 0:1)
M <- bayes_beta(y ~ x + z, D, fix = "start")
# If you want, look at the predictions
# predict(M)

SSE(M)     # 0.361


JanaJarecki/cogscimodels documentation built on Nov. 4, 2022, 5:33 p.m.