mercredi 6 décembre 2017

Random Stratified Sampling of One Population Based Off Another

I need to remove the bias between two data sets. The goal is to use stratified sampling.

I am making two models between two different populations. We'll call one group Untreated and the other group Treated, the decision we're trying to find is if we should Treat people.

Since the second population has already been Treated on, there is a bias between the Untreated and Treated populations.

I want to remove this bias with stratified sampling. A decision tree as already determined 3 variables that can split the two populations. I have been told SAS has Proc Surveyselect to do this, but the stratified.R code I've found so far only does equal-count sampling.

What I need is a sample of the Untreated population to have the same proportions of variable combinations of A, B, and C as that of the Treated population.

Does a function already exist out there that does this?

Additional information: Variables A, B, and C are not actually terms in the final models being developed, they're just the three that split the two populations up. The assumption is that the actually model variables do well enough on their own to not result in two identical models.

Am I stuck writing this out manually? For simplicity's sake variables A, B, and C are binned but I would like to be able to find a solution where they can remain continuous.




Aucun commentaire:

Enregistrer un commentaire