Simple Simulations and Sampling
simNsamp
is a simple R funciton that simulates and population and then samples that population at given sample sizes to determine the sample sizes that are needed to achieve a given coefficient of variaiton (CV) for group estimates.
To install simNsamp
you can use Hadley Wickham's devtools
package. To install and load the devtools
package use:
install.packages("devtools")
library(devtools)
NOTE: To use devtools
, you may also have to download and install Rtools (although you shouldn't). The latest version on Rtools can be found at
https://cran.r-project.org/bin/windows/Rtools/
Once devtools
is successfully installed, use the following to install stockCIs:
devtools::install_github("mackerman44/simNsamp")
If you are interested in making contributions to simNsamp, consider getting a GitHub account, fork this repository, clone to a local directory, modify, and send me a pull request. I can then review any changes and merge.
For questions or comments please contact mackerman@qcinc.org
Enjoy!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.