|
WEIGHTED SUM OF SQUARED DEVIATIONS FROM MEANName:
where X is the response variable, W is the weights variable, and is the sample mean. The response variable and weights variable must have the same number of observations. For this command, the weights are not normalized. However, at least one of the weights must be positive and none of the weights can be negative. Otherwise, an error message is reported.
<x> <w> <SUBSET/EXCEPT/FOR qualification> where <x> is the response variable; <w> is the weights variable; <par> is a parameter where the weighted sum of squared deviations from the mean is saved; and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Y1 WEIGHT LET A = WEIGHTED SUM OF SQUARED DEVIATIONS FROM MEAN ... Y1 WEIGHT SUBSET Y1 > 0
LET Y = DATA 2 3 5 7 11 13 17 19 23 LET W = DATA 1 1 0 0 4 1 2 1 0 . LET A = WEIGHTED SUM OF DEVIATIONS FROM THE MEAN Y WThe returned result is 284.0123.
Date created: 06/29/2012 |