MSE: 'MSE()' computes the mean squared error

Description Usage Arguments Value See Also Examples

View source: R/MSE.R

Description

MSE() computes the mean squared error

Usage

1
MSE(obs, pred, na.rm = FALSE, weighted = FALSE, n = NULL, ...)

Arguments

obs

A numeric vector or matrix, the observed data. Can be continuous values or dicrete. Can be aggregated, and if so you must supply n (see below). The default assumes raw data.

pred

A numeric vector or matrix with predictions, in the same order as obs.

na.rm

(optional) Logical (default FALSE). TRUE removes all NA rows in pred or obs jointly (list-wise removal).

weighted

(optional) Logical (dfault FALSE), if TRUE variance-weighted sums of squares are calculated, otherwise unweighted sums of squares.

n

(optional), number of integer vector, required if weighted = TRUE. Number of observations underlying each entry in obs. One number if each entry in obs is the aggregate of the same number, a vector if different numbers of observations underly entries in codeobs.

...

other arguments are ignored

Value

Mean of squared deviations between obs and pred

See Also

Other goodness of fit functions: APE(), Accuracy(), MAPE(), MDAPE(), RMSE(), SSE(), gof()

Examples

1
# None so far

JanaJarecki/cognitiveutils documentation built on Sept. 9, 2020, 9:11 a.m.