This software provides a package for sample size planning based on the ***v**ariation of the **p**osterior **v**ariance **c**riterion* (VPVC), introduced in [1]. It comes with a graphical user interface (GUI), see [2] for a guide.
This software provides a package for sample size planning based on the ***v**ariation of the **p**osterior **v**ariance **c**riterion* (VPVC), introduced in [1]. It comes with a graphical user interface (GUI), see [2] for guidance.
# Installation
# Installation
...
@@ -17,7 +17,7 @@ For the second step a (single) command has to be entered in a terminal. As such
...
@@ -17,7 +17,7 @@ For the second step a (single) command has to be entered in a terminal. As such
## Prerequisites: Install Python (Anaconda)
## Prerequisites: Install Python (Anaconda)
The easiest and most convenient way to install python including all packages needed for this program is to install Anaconda. Download the individual edition under:
The easiest and most convenient way to install Python including all packages needed for this program is to install Anaconda. Download the individual edition under:
https://www.anaconda.com/products/individual
https://www.anaconda.com/products/individual
...
@@ -74,7 +74,9 @@ When asked if you really want to remove, press `y`. If you created a `.bat` file
...
@@ -74,7 +74,9 @@ When asked if you really want to remove, press `y`. If you created a `.bat` file
# For advanced Python users
# For advanced Python users
### Avoiding Anaconda
### Avoiding Anaconda
The advantage of using Anaconda is that all scientific packages (those needed here are: `matplotlib`, `numpy`, `scipy`) come pre-installed and will, if all goes well, work out of the box. However, as a full environment it might be too bloated for some users. If you want to use your own python interpreter you only have to ensure that `matplotlib`, `numpy` and `scipy` are or can be installed by the `pip` command above, which on some OS (like Windows) can require you to install a C++ building tool. Once you are sure that the packages for scientific computing are or can be installed you can proceed as above. If you are thinking of using the default python interpreter of your system you probably want to create a virtual environment using the `venv` module, especially if you are on a Unix-like system.
The advantage of using Anaconda is that all scientific packages (those needed here are: `matplotlib`, `numpy`, `scipy`) come pre-installed and will, if all goes well, work out of the box. However, as a full environment it might be too bloated for some users. If you want to use your own Python interpreter you only have to ensure that `matplotlib`, `numpy` and `scipy` are or can be installed by the `pip` command above, which on some OS (like Windows) can require you to install a C++ building tool. Once you are sure that the packages for scientific computing are or can be installed you can proceed as above. If you are thinking of using the default Python interpreter of your system you probably want to create a virtual environment using the `venv` module, especially if you are on a Unix-like system.
Note that this `README` assumes that you are using Python 3 and not the deprecated version 2. If you are working in an environment where both, Python 2 and Python 3, are installed replace in the commands above `python` by `python3` and `pip` by `pip3`. To check which Python version you are using, run `python --version`.
### Using just the algorithm without the GUI
### Using just the algorithm without the GUI
The package `vpvc_algorithm` can be used as a standalone package for sample size planning based on the VPVC without a GUI. The algorithm itself is implemented in the module `vpvc_algorithm.ssd_framework` and its dependencies. The classes `poi_ssd_framework` and `normal_ssd_framework` are behind the computations done in the GUI. If you want to implement a custom sample size planning environment (for instance for another data distribution and/or a different prior) inherit a class from `generic_ssd_framework` following the instructions of its docstring.
The package `vpvc_algorithm` can be used as a standalone package for sample size planning based on the VPVC without a GUI. The algorithm itself is implemented in the module `vpvc_algorithm.ssd_framework` and its dependencies. The classes `poi_ssd_framework` and `normal_ssd_framework` are behind the computations done in the GUI. If you want to implement a custom sample size planning environment (for instance for another data distribution and/or a different prior) inherit a class from `generic_ssd_framework` following the instructions of its docstring.
...
@@ -95,4 +97,4 @@ Redistribution and use in source and binary forms, with or without modification,
...
@@ -95,4 +97,4 @@ Redistribution and use in source and binary forms, with or without modification,
[1] Martin, Jörg, and Clemens Elster. "The variation of the posterior variance and Bayesian sample size determination." *Statistical Methods & Applications* (2020): 1-21.
[1] Martin, Jörg, and Clemens Elster. "The variation of the posterior variance and Bayesian sample size determination." *Statistical Methods & Applications* (2020): 1-21.
[2] Martin, Jörg and Clemens Elster. "A guide for sample size planning using the VPVC", *in preparation*
[2] Martin, Jörg and Clemens Elster. "GUI for Bayesian sample size planning in type A uncertainty evaluation", *in preparation*