Lawrence Joseph
Bayesian statistics


Please Note: Prof. Joseph has retired.
These pages are left up in case they prove
useful, but the pages and software will
no longer be updated. All material and
software is "as is" with no guarantees
of functionality or correctness.
SampleSizeBinomial
Bayesian sample size determination for a single binomial proportion
Install Instructions
The zipped file provided should install on Unix, Linux and Windows environments. SampleSizeBinomial R package includes a C program which will need be compiled: compilation will be done automatically when installing the package provided a C compiler is found along your PATH environment variable. That should be the case for Unix and Linux users as these systems come with C compilers by default; Windows users will need to install RTools (if it was not already done in the past) — which includes a C compiler — to install SampleSizeBinomial.
  1. Windows users: make sure RTools is installed. By default, RTools installs in c:\RTools. If you cannot find RTools on your system, visit CRAN webpage, click R Binaries, then choose the link corresponding to your system (e.g. windows) and Rtools. After running RTools<version>.exe, make sure to follow the instructions to complete your RTools installation (see Downloads section on RTools webpage).

  2. Windows users: make sure RTools is found at the beginning of your PATH environment variable.
    1. To do so, open DOS command prompt.
    2. At the DOS-prompt, type echo %path%.



      See if the value returned includes the path to RTools.



      If not, you will need to modify/update your PATH environment variable. Doing so is system dependent: if you need help at this stage, please read How to set the path and environment variables in Windows.


  3. Once you have saved SampleSizeBinomial zipped file on your computer, change directory to where you have (temporarily) saved the .tar.gz file and install the package through the R CMD INSTALL SampleSizeBinomial_1.0.tar.gz command.



  4. You can now delete the .tar.gz file.

  5. In R, load the SampleSizeBinomial library and read the instructions help page.

    > library(SampleSizeBinomial)
    > help(SampleSizeBinomial)