# gof: Computes Various Model Fit Measures In JanaJarecki/cogscimodels: Cognitive Models - Estimation, Prediction, and Development of Models for Cognitive Scientists

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

 ``` 1 2 3 4 5 6 7 8 9 10``` ```## S3 method for class 'cm' logLik(object, ...) 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.

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

 ```1 2 3 4 5 6 7 8``` ```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 Sept. 8, 2020, 7:28 p.m.