Nice, Quick, Effective Sampler in R
It’s always good to test models. Â In the best case, we’d test models against a different dataset than what we used to develop data. Â In not-the-best-but-still-not-that-bad of cases, we’d use 80% of a dataset to estimate a model, and 20% of it to test against.
In a lot of cases, someone uses a Gibbs Sampler to get that 80%. Â I didn’t feel like over-complicating things, so I decided to do a simple random sampler and added in some checks to check that the sample is good. Â The following worked well for me.
So to show that it worked. Â Click on the pictures to see them large enough to be legible. Â The pctHH is the input percentage, the PctHHS is the sample for model estimation, and PctHHT is the sample for model testing.
These will ultimately be part of something larger, but so far, so good.
-A-
Tags: R, sampling, survey data
You must be logged in to post a comment.