www.gllamm.org

Why do I get the message "weight variables not found" when I specify the pweight() option?

Title   Specifying survey weights in gllamm
Author Minjeong Jeon, University of California, Berkeley
Date July 2012

This problem is related to specifying weight variables in the pweight(stubname) option. pweight(stubname) specifies that variables stubname1, stubname2, etc. contain sampling weights for level 1, 2, etc. Specifying pweight() is very similar to specifying weight().

For instance, suppose you specify pweight(pw) for sampling weights in your data consisting of three levels. Then you need at least one of these three variables: pw1, pw2, and pw3 for sampling weights at levels 1, 2, and 3. If one or two of these variables do not exist, it is assumed that the corresponding weights are 1. But if none of the variables exist, you get the error message "weight variables not found". It is important to remember that the weight variables must end in a number corresponding to the level to which they apply and that only the "stub" (the variable name up to the number) is specified in the pweight() option. So if the variables are called pw1, pw2, and pw3, use the syntax:

gllamm ... , pweight(pw)
Remember you have to type pw, not pw1 or pw2, inside the parentheses. As for frequency weights, you do not need sampling weights at all levels. For example, if you have only pw2 and pw3 in your data set, then gllamm would assume that the sampling weights in level 1 are equal to 1.

Examples and documentation

References