Code covered by the BSD License  

Highlights from
Median Polish

4.0

4.0 | 1 rating Rate this file 2 Downloads (last 30 days) File Size: 2.26 KB File ID: #23464

Median Polish

by Adam Auton

 

28 Mar 2009

Fits an additive model using Tukey's median polish procedure.

| Watch this File

File Information
Description

MEDIAN_POLISH(X) fits an additive model to a 2D input matrix, X, assuming a decomposition of (constant + rows + columns).

Median polishing is useful for removing spatial trends in the data by alternately removing medians from the rows and columns of the data. The algorithm proceeds as follows. Considering the rows first, for each row the row median is subtracted from every element in that row. Then, for each column, the median of the revised numbers is then subtracted from every element in that column. This process is repeated until all convergence, or a maximum number of iterations.

MATLAB release MATLAB 7.6 (R2008a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
02 Dec 2010 Inema

Hello Adam,

Nice Submission. I believe the final x matrix is the residual values and the matrix that you labeled resid is actually the fitted values; however I am not 100% sure. Maybe should check this and change the comments and labeling accordingly.

Regards

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
median polish Helen Chen 30 Mar 2009 14:14:58
statistics Adam Auton 30 Mar 2009 14:15:52
data exploration Adam Auton 30 Mar 2009 14:15:52

Contact us at files@mathworks.com