# Weighted Analysis

## !WT

Weighted analyses are achieved by using
!WT ` weight `
as a qualifier to the response variable.
An example of this is

y !WT wt ~ mu A X

where y is the name of the response variable
and wt is the name
of a variate in the data containing weights. If these are relative
weights (to be scaled by the units variance) then this is all
that is required. If they are absolute weights, that is, the
reciprocal of known variances, use the
!S2==1 qualifier
to fix the unit variance. When a
structure is present in the residuals the weights are applied as a
matrix product. If
**S**
is the structure and
**W**
is the diagonal
matrix constructed from the square root of the values of the variate
weight,
then
**R**
inverse =
**W**
(
**S**
inverse)
**W.**
Negative weights are treated as zeros.
#### Example

Analysing means with known absolute weights
Trial !A
Genotype !A
meanyld
weight
Summary.asd !skip 1
meanyld !WT weight ~ mu Trial !r Trial.Genotype
predict Genotype
1 1 1
0 !S2==1
Trial.Genotype 2
Trial 0 CORUH .8
10 * 3.5 # assuming 10 trials
Genotype

**Return to start**