[ top | up ]

Median Polish of a Matrix

Usage

medpolish(x, eps=0.01, maxiter=10)

plot(medpolish.obj)
print(medpolish.obj)

Description

medpolish fits an additive constant-plus-rows-plus-columns model to the values given in x using Tukey's median polish procedure.

Sweeping out for row and column effects continues until the proportional reduction in the sum of absolute residuals is less than eps or until the have been maxiter iterations. The sum of absolute residuals is printed at each iteration of the fitting process.

The value returned by medpolish is an object of class medpolish. Printing and plotting methods are defined for this class, and can be invoked via the generic functions print and plot.

Value

An object of class medpolish with the following named components:
overall the fitted constant term.
row the fitted row effects.
col the fitted column effects.
residuals the residuals.
name the name of the dataset.