nag_robust_trimmed_1var (g07ddc) calculates the trimmed and Winsorized means of a sample and estimates of the variances of the two means.
Then the trimmed mean is defined as:
and the Winsorized mean is defined as:
nag_robust_trimmed_1var (g07ddc) then calculates the Winsorized variance about the trimmed and Winsorized means respectively and divides by
to obtain estimates of the variances of the above two means.
- 1:
n – IntegerInput
On entry: the number of observations, .
Constraint:
.
- 2:
x[n] – const doubleInput
-
On entry: the sample observations, , for .
- 3:
alpha – doubleInput
-
On entry: the proportion of observations to be trimmed at each end of the sorted sample, .
Constraint:
.
- 4:
tmean – double *Output
-
On exit: the -trimmed mean, .
- 5:
wmean – double *Output
-
On exit: the -Winsorized mean, .
- 6:
tvar – double *Output
-
On exit: contains an estimate of the variance of the trimmed mean.
- 7:
wvar – double *Output
-
On exit: contains an estimate of the variance of the Winsorized mean.
- 8:
k – Integer *Output
-
On exit: contains the number of observations trimmed at each end, .
- 9:
sx[n] – doubleOutput
-
On exit: contains the sample observations sorted into ascending order.
- 10:
fail – NagError *Input/Output
-
The NAG error argument (see
Section 3.6 in the Essential Introduction).
Not applicable.