pwigls2 {pwlmm} | R Documentation |
Fit Weighted Linear Multilevel Model
Description
Fit a probability-weighted two-level linear model with unequal selection probabilities at each level, via IGLS algorithm.
Usage
pwigls2(formula, data = NULL, wj, wij)
Arguments
formula |
a two-sided linear formula object describing both the fixed-effects and random-effects part of the model, with the response on the left of a ~ operator and the terms, separated by + operators, on the right. Random-effects terms are distinguished by vertical bars (|) separating expressions for design matrices from grouping factors. |
data |
an optional data frame containing the variables in |
wj |
a vector of sampling weights for level two units. Level two units are selected with inclusion probabilities. Then, sampling weights for the level two units are defined as the inverse of these probabilities. |
wij |
a vector of sampling weights for level one units. After selecting a level two unit, level one units belonging to them are selected with inclusion probabilities. Then, sampling weights for the level one units are defined as the inverse of these probabilities. |
Details
Follows estimation process described in Pfeffermann et al. (1998). Uses probability-weighted IGLS with scaled weights.
Value
Estimated list of estimators
References
D. Pfeffermann; C. J. Skinner; D. J. Holmes; H. Goldstein; J. Rasbash, 2008, Weighting for Unequal Selection Probabilities in Multilevel Models Journal of the Royal Statistical Society. Series B (Statistical Methodology), Vol. 60, No. 1. (1998), pp. 23-40.
Examples
data(dataw1)
pwigls2( Y ~ X1 + X2 + (1 | PSU), data = dataw1, wj, wi_j)