I am using a national household survey. I have to sample this database, per group, in such a way that each group, weighted by the sample weight, has the number of people I want.
To make it clearer, suppose that I have two groups, by gender (male and female). There are 400,000 people in the survey, who represent 200,000,000 people in the population.
I need to sample (and keep) X men in the database and Y women in such a way that that the number X is equal (with the sample weight) to 20,000,000 and Y is equal (with the sample weight) to 15,000,000. That is, before sampling, I don’t know the values of X and Y that I have to choose; I only know that X (expanding the sample, using the weights) must be equal to 20,000,00; and Y (expanding the sample, using the weights) must be equal to 15,000,00.
I tried to use the command gsample. But it didn’t work, because, I only could sample N individuals, without using the weights.
I also searched for the same doubt in older posts, but I couldn’t find anything similar.
Does anybody can help me?
To make it clearer, suppose that I have two groups, by gender (male and female). There are 400,000 people in the survey, who represent 200,000,000 people in the population.
I need to sample (and keep) X men in the database and Y women in such a way that that the number X is equal (with the sample weight) to 20,000,000 and Y is equal (with the sample weight) to 15,000,000. That is, before sampling, I don’t know the values of X and Y that I have to choose; I only know that X (expanding the sample, using the weights) must be equal to 20,000,00; and Y (expanding the sample, using the weights) must be equal to 15,000,00.
I tried to use the command gsample. But it didn’t work, because, I only could sample N individuals, without using the weights.
I also searched for the same doubt in older posts, but I couldn’t find anything similar.
Does anybody can help me?
Comment