Description Usage Arguments Details Value Options for variable type Author(s) References See Also Examples
Calculate trend from data collected with complex survey designs by incorporating weights with a linear mixed model. This is an internal function called from TrendNPS_Cont.
1 | PWIGLS_ALL(Z, dat, stage1wt, stage2wt, type, stratum, slope)
|
Z |
Random-effects design matrix from the unweighted (PO) model. |
dat |
Data frame containing columns at least for |
stage1wt |
Design weights from the original sample draw without accounting for temporal revisit designs. |
stage2wt |
Panel inclusion weights for each site each year. |
type |
Scaling type when |
stratum |
Text string identifying an optional two-level stratification
factor in |
slope |
Logical value indicating inclusion of a random site-level slope effect in the variance components structure in addition to the Site- and Year- level random intercept terms. Default = TRUE. |
Calculates the probability-weighted iterative generalized least squares (PWIGLS) trend model (Pfeffermann et al. 1998; Asparouhov 2006).
Returns a vector of regression coefficient estimates for the trend model.
type
Selection of method="PWIGLS"
requires further specification of
argument type
. Valid options include
"Aonly" | Probability weighting but no scaling at either stage |
"A" | Panel-weights scaling with mean site-level design weight |
"AI" | Panel-weights scaling with mean site-level design weight, but no site-level scaling |
"B" | Panel-weights scaling with effective mean site-level design weight |
"BI" | Panel-weights scaling with effective mean site-level design weight, but no site-level scaling |
"C" | Year-level scaling only with inverse of the average year-level weight |
Leigh Ann Starcevich of Western EcoSystems Technology, Inc.
Asparouhov, T. (2006). General multi-level modeling with sampling weights. Communications in Statistics - Theory and Methods 35: 439-460.
Pfeffermann, D., C.J. Skinner, D.J. Holmes, H. Goldstein, and J. Rasbash (1998). Weighting for unequal selection probabilities in multilevel models. Journal of the Royal Statistical Society, Series B 60(1): 23-40.
TrendNPS_Cont
, LinearizationVar
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
# ---- Read example data set.
fit<-PWIGLS_ALL(Z=getME(fit_PO,"Z"),
dat=dat,
stage1wt=stage1wt,
stage2wt=stage2wt,
type=type,
stratum=stratum,
slope=slope)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.