-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Joining separate as_survey
objects together
#148
Comments
sorry reading comprehension is bad at the end of my day, interesting idea not currently possible |
Is there a way to weight that one specific variable with its different weighting var in the same |
Could you share a little about why there are different weights? Is it because one is a base weight and the other is raked/poststratified/nonresponse-adjusted? In general, switching weights used for different variables isn't something covered by survey or srvyr. I'm not sure how common it is. The best example I can think of where a big survey does this is NHANES, where some variables use specialized weights. In these cases, normally folks just create multiple survey design objects. I wonder if it could be worth adding a helper function like |
If you have replicate weights, you can "stack" replicate designs with the 'svrep' package and compare estimates from the different designs. https://bschneidr.github.io/svrep/reference/stack_replicate_designs.html That's useful for example if you want to compare estimates from different sets of weights. But this will only work correctly if you are given multiple sets of replicate weights from the data provider, or if you have the base weights and other design information needed to correctly create replicate weights. |
Yes, its much like NHANES were some variables dealing with certain physical/mental health conditions use specialised weights to account for non-response etc. The |
I have complex survey data that has phase 1 and phase 2 weights. Is it possible to combine separate
as_survey
design objects together?They all exist within the same survey wave, same amount of rows/obs etc, however some variables have their own specific weighting variable (e.g. "condition_2" has its own weighting variable "wt2_var").
Small example below (apologies it's not a reprex, I couldn't find an open df that had this issue):
The text was updated successfully, but these errors were encountered: