Tag Archives: sampling

Stratified random sampling in R from a data frame

After a little bit more work, there’s a new stratified random sampling function, this one letting you sample from a data frame, returning all the variables for each of your samples as a nice data frame that you can continue working on as usual. Get the function at http://news.mrdwab.com/stratified. Usage notes in the head of [...]

Posted in Geekiness, Useless Knowledge | Also tagged , , , , | 4 Comments

Stratified Random Sampling in R–A Function in Progress

IMPORTANT: This is here mostly to remind me of how I solved my problem. You should read Stratified random sampling in R from a data frame if you really want to use this function. I know that sampling is quite complex, and I will admit that I know very little about its complexities. Fortunately, software [...]

Posted in (all categories), Geekiness, Useless Knowledge | Also tagged , , , , , | Leave a comment

The new sample size calculator for R (already)

aka “Maybe I shouldn’t post so quickly” Just hours ago, I posted my first set of functions for R to determine the sample size for a known population. Then, I had to update that post to reflect my newfound knowledge, and now, I thought I would update again, so that the best functions I came [...]

Posted in (all categories), Geekiness, Useless Knowledge | Also tagged , , , , | 7 Comments

A sample size calculator function for R

IMPORTANT: This is here mostly to remind me of how I solved my problem. You should read The new sample size calculator for R (already) if you really want to use this function. In the research class at the Tata-Dhan Academy, students are currently getting into sampling, so I thought I would introduce them to [...]

Posted in (all categories), Geekiness, Useless Knowledge | Also tagged , , , | 2 Comments

Sampling with replacement in R

In my last post about sampling (Simple sampling with R) we were doing simple sampling without replacement–that is, each item could only be selected once. However, there are times when you want to simulate sampling with replacement. For example, if you wanted to simulate sampling the results of rolling a dice 50 times, your outcomes [...]

Posted in (all categories), Geekiness, Useless Knowledge | Also tagged , , | 1 Comment

Simple sampling with R

I mentioned in an earlier post (Am I inconsistent?) that I got interested in R because Amy had asked me to help her with some sampling at one point. Since that was my starting point, I thought I would share some of my experiments with you. In this post: Simple random sampling Simple random sampling [...]

Posted in Geekiness, Useless Knowledge | Also tagged , , | 1 Comment