Support #2233
openBlood Biomarker Survey Weights
80%
Description
Hi there,
I am using the blood biomarker survey weights in my analysis for Wave_2: indbdub_xw. However, when I load this variable into RStudio I get two options: indbdub_xw.x and indbdub_xw.y.
When I run code to check if the two variables are equal, they are not:
all.equal(Wave_2$indbdub_xw.x, Wave_2$indbdub_xw.y)
[1] "Mean relative difference: 9.993738e-08"
I'm also unable to find examples within the USoc literature on survey weight guidance where w_xxxyyzz_aa has a decimal point and .x or .y at the end.
Please can you tell me what the difference between these two weight options is?
Thanks in advance!
Updated by Rosie Mathers 15 days ago
Hi,
I think the issue might be a coding problem from uploading the indbdub_xw variable twice.
Let me know if you agree :)
Thanks,
Rosie
Updated by Understanding Society User Support Team 11 days ago
- Status changed from New to Feedback
- Assignee changed from Olena Kaminska to Understanding Society User Support Team
- % Done changed from 0 to 80
- Private changed from Yes to No
Hello Rosie,
Which version are you using? I have checked the latest released version and that just has the variable "indbdub_xw" in the datafile "xlabblood_ns.dta" (Stata version). I cannot see the variables you have mentioned. So, as you have said in your second post, this is most likely a problem from reading in the data into R incorrectly.
If you want to know about how to our data using R including reading in the data from a Stata file, please enroll in this Moodle course: https://www.understandingsociety.ac.uk/help/training/introduction-to-understanding-society-self-paced-moodle/
Best wishes,
(Alita) Understanding Society User Support Team