1
$\begingroup$

I want to calculate MPSE, mean square prediction error, to compare the performance of several regression models that I developed with training data on new testing data.

Is the mean square prediction error simply calculated as the mean of (Predicted Values - Observed Values)^2? The observed values here are the response variable from the testing dataset.

Also, can the predicted values be obtained from the R code below?

predict(lm.fit, newdata=testing, interval="prediction")
$\endgroup$

1 Answer 1

2
$\begingroup$

Yes, you simply take the mean of the squared errors. This is often simply called Mean Squared Error ( - take a look at the tag), since the P often refers to percentages, e.g. in the . I'd argue that "prediction" is redundant, since you should always evaluate your prediction on holdout data, anyway.

And yes, you can obtain your predictions from an lm object by using predict(). (More precisely, predict.lm().) However, since the MSE is a point accuracy measure, you only need point predictions, not intervals, so you can go with the default parameter interval="none".

$\endgroup$
1
  • $\begingroup$ But mean squared error can also address, for example, estimation precision of a model parameter. So the P for prediction in MSPE is not entirely redundant, IMHO. $\endgroup$ Commented Nov 2, 2016 at 10:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.