A data set's cases may optionally be weighted by the value of a numeric variable. See WEIGHT, for a user view of weight variables.
The weight variable is written to and read from system and portable files.
The most commonly useful function related to weighting is a convenience function to retrieve a weighting value from a case.
Retrieves and returns the value of the weighting variable specified by dict from case. Returns 1.0 if dict has no weighting variable.
Returns 0.0 if c's weight value is user- or system-missing, zero, or negative. In such a case, if warn_on_invalid is non-null and
*warn_on_invalid is true,
dict_get_case_weightalso issues an error message and sets
*warn_on_invalid to false. To disable error reporting, pass a null pointer or a pointer to false as warn_on_invalid or use a
The dictionary also has a pair of functions for getting and setting the weight variable.
Returns dict's current weighting variable, or a null pointer if the dictionary does not have a weighting variable.