masurp / specr

Conducting and Visualizing Specification Curve Analyses
https://masurp.github.io/specr
GNU General Public License v3.0
67 stars 5 forks source link

specs using weighted survey data #27

Open stuartjames1990 opened 2 years ago

stuartjames1990 commented 2 years ago

Is there a way to specify the inclusion of weights in the specifications?

I'm replying on cross-national survey data (European Social Survey) where combined post-stratifcation and country population weight is required to produce representative results.

mscharkow commented 2 years ago

If you use custom estimation functions (e.g. https://masurp.github.io/specr/articles/random_effects.html), it should be pretty easy to use weights (just add them to the function at some point during or post-estimation), at least when the weighting procedure is not varied as part of the multiverse. In that case, you'd probably need multiple custom functions.