Code covered by the BSD License  

Highlights from
apR2p

Be the first to rate this file! 1 Download (last 30 days) File Size: 5.66 KB File ID: #14619

apR2p

by Antonio Trujillo-Ortiz

 

11 Apr 2007 (Updated 13 Apr 2007)

Approximate determination coefficient (R2) for prediction.

| Watch this File

File Information
Description

This m-file computes an approximate determination coefficient (R2) for prediction, say

R2pred = 1 - (PRESS/SST)

where PRESS = prediction error sum of squares, SST = total sum of squares.

This statistic gives some indication of the predictive capability of the regression model. So, we could expect the model 'explain' about a percentage of the variability in predicting new observations, as compared to the approximately percentage of the variability in the original data explained by the least squares fit.

Syntax: function x = apR2p(D)

Inputs:
D - matrix data (=[X Y]) (last column must be the Y-dependent variable; X-independent variables).

Output:
x - approximate determination coefficient (R2) for prediction.

Required Products Statistics Toolbox
MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
13 Apr 2007

It was added an appropriate format to cite this file.

Tag Activity for this File
Tag Applied By Date/Time
statistics Antonio Trujillo-Ortiz 22 Oct 2008 09:08:58
probability Antonio Trujillo-Ortiz 22 Oct 2008 09:08:58
determination coefficient Antonio Trujillo-Ortiz 22 Oct 2008 09:08:58
prediction Antonio Trujillo-Ortiz 22 Oct 2008 09:08:58
prediction error sum of squares Antonio Trujillo-Ortiz 22 Oct 2008 09:08:58
r Antonio Trujillo-Ortiz 22 Oct 2008 09:08:58

Contact us at files@mathworks.com