1. Home
  2. TUKEYBIWEIGHT procedure

TUKEYBIWEIGHT procedure

Estimates means using the Tukey biweight algorithm (D.B. Baird).

Options

CUTPOINT = scalar Cut point after which weight is set to zero; default 5
TOLERANCE = scalar Tolerance to avoid division by zero; default 0.00001

Parameters

DATA = variates or pointers Data values
GROUPS = factors Groupings of the data values
MEANS = variates Saves the means
SE = variates Saves standard errors

Description

TUKEYBIWEIGHT estimates means using the Tukey biweight algorithm. This weights the data values depending on how far they are from the median, and discards any that are more than a specified number of median absolute distances away. The number of differences is specified by the CUTPOINT, with a default of 5.

The data values are specified by the DATA parameter. They can be in a single variate, with any groupings specified by the GROUPS parameter. Alternatively, they can be in separate variates, one for each group. The MEANS parameter saves the estimated means, and the SE parameter saves standard errors for the means.

Options: CUTPOINT, TOLERANCE.

Parameters: DATA, GROUPS, MEANS, SE.

Action with RESTRICT

TUKEYBIWEIGHT respects any restrictions on DATA or GROUPS.

See also

Procedures: MPOLISH, ROBSSPM.

Commands for: Calculations and manipulation.

Example

CAPTION       'TUKEYBIWEIGHT example','Mean vs. Tukey BiWeight';\
              STYLE=meta,minor
FACTOR        [LEVELS=100; VALUES=(1...100)100] Group
"Create X as a mixture of 2 normals, 10% with SE of 10 vs 1"
CALCULATE     [SEED=498725] X1,X2 = GRNORMAL(9000,1000;10;1,100)
APPEND        [NEWVECTOR=X] X1,X2
TABULATE      [CLASS=Group] X; MEANS=AMeans
VTABLE        AMeans; VARIATE=Average
TUKEYBIWEIGHT [CUTPOINT=3] X; GROUPS=Group; MEANS=TukeyBiWt
DHISTOGRAM    [TITLE='Distribution of Mean vs Tukey Biweight'; NGROUPS=15]\
              Average,TukeyBiWt
Updated on March 4, 2019

Was this article helpful?