weighting data [message #30345] |
Sun, 10 November 2024 04:01 |
Hejie Wang
Messages: 14 Registered: July 2024
|
Member |
|
|
I have a question about new weights for merged surveys, my idea is to multiply the proportion of each survey to the merged file by the weight of that observation (wt), is this the right thing to do?
This R code is here:
data$wt<-data$v005/100000
survey_counts <- table(data$v000)
total_samples <- nrow(data)
survey_proportions <- survey_counts / total_samples
data$survey_proportion <- survey_proportions[data$v000]
Can you give me some advice about this weighting?
|
|
|
|