I really hope you do more videos on survey weighting in R. For example, videos on how we carryout 'design' weighting and how we use post-stratification weighting with the R survey packages. The huge value of your presentation is that you addressed the 'why weight' question well enough for a new learner like me to be able to wrap his head around the rationale for weighting. There is still a lot for me to work on and understand, but after many introductory video and material on weighting, I finally do not feel lost after watching you excellent video. I have a very good idea of why and when we weight. I can now move on to how we do it as well as learning more on where. Thank you.
Thank you for this video! I hope it is not too much to ask, but I have two follow up questions: 1. I was wondering if it is still possible to determine the median with weighted data (since that depends on the number of observations)? 2. How do you calculate the standard deviation of weighted data? Is that possible at all? Kind regards!
Good questions, Sophie! You can calculate weighted medians, but not with the packages I shared here - have a look at the Wikipedia page for weighted medians for the method and at the weightedMedian function in the matrixStats package to get it done. The standard deviation is just the square root of the mean variance - so it's easy to calculate that with weights. With the srvyr package, you can use the survey_var function to get the variance and then calculate its square root.