Dataplot Vol 2 Vol 1

# WEIGHTED SUM OF ABSOLUTE VALUES

Name:
WEIGHTED SUM OF ABSOLUTE VALUES (LET)
Type:
Let Subcommand
Purpose:
Compute the weighted sum of absolute values of a variable.
Description:
The weighted sum of absolute values is defined as

where X is the response variable and W is the weights variable. 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.

Syntax:
LET <par> = WEIGHTED SUM OF ABSOLUTE VALUES<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 absolute values is saved;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
LET A = WEIGHTED SUM OF ABSOLUTE VALUES Y1 WEIGHT
LET A = WEIGHTED SUM OF ABSOLUTE VALUES Y1 WEIGHT SUBSET Y1 > 0
Note:
Dataplot statistics can be used in a number of commands. For details, enter

Default:
None
Synonyms:
None
Related Commands:
 WEIGHTED SUM = Compute the weighted sum of a variable. WEIGHTED SUM OF SQUARES = Compute the weighted sum of squares of a variable. WEIGHTED AVERAGE OF ABSOLUTE VALUES = Compute the weighted average of absolute values of a variable. WEIGHTED SUM OF DEVIATIONS FROM THE MEAN = Compute the weighted sum of deviations from the mean of a variable. WEIGHTED SUM OF SQUARED DEVIATIONS FROM MEAN = Compute the weighted sum of squared deviations from the mean of a variable. WEIGHTED MEAN = Compute the weighted mean of a variable. WEIGHTED STANDARD DEVIATION = Compute the weighted standard deviation of a variable. WEIGHTED VARIANCE = Compute the weighted variance of a variable.
Applications:
Data Analysis
Implementation Date:
2012/06
Program:
```
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 ABSOLUTE VALUES Y W
```
The returned value is 115.

Date created: 06/29/2012
Last updated: 06/29/2012