tslumley / svylme

Mixed models for complex surveys
34 stars 6 forks source link

replicate weights design #2

Closed Amy-z-fong closed 1 year ago

Amy-z-fong commented 1 year ago

Hi, this package is very exciting! I am hoping to estimate a mixed model with survey data with replicate weights. Is that possible in svylme?

I was thinking that since replicate weights don't seem native to svy2lme, I could implement it myself. For each of my replicate weights, I would create a survey design object using a replicate weight as the sampling weight, but without clusters/strata. Then I would use svy2lme to estimate the betas without standard errors. I would use the repeated estimates to estimate standard errors. Does that sound reasonable/appropriate to you?

tslumley commented 1 year ago

This is actually hard -- you need weights at each stage and the clusters/strata in order to get the correct pairwise probabilities. For example, p_ij=p_ip_j if units i and j are in separate strata, but usually p_ij>p_ip_j if they are in the same cluster. In contrast to most design-based estimation, the point estimates depend on the pairwise probabilities, not just the standard errors.

It might be better to decide what approximation you want to use for the pairwise probabilities and to then provide a matrix of either pairwise probabilities or of covariances of sampling indicators (p_ij-p_ip_j) to the pps= option of svydesign. Just providing weights is equivalent to the approximation p_ij=p_ip_j

tslumley commented 1 year ago

Actually, having thought about this again, it should be possible to compute (approximate) covariances of sampling indicators from the correlations of the replicate weights somehow. I will look into it.

tslumley commented 1 year ago

There seems to be less bias than I had expected from doing what you initially suggested. I'm still a bit nervous that I don't have a good understanding of when it would be biased, but it's probably ok. I will continue to think about extracting approximate joint probabilities from the replicate weights.