Estimation-Parameter-Beta

Posterior Estimation of the Shape Parameters of the Beta Distribution

This main repository contains three branches aimed at providing a methodology to estimate the shape parameters of the Beta distribution.

Table of Contents

Overview

This repository presents a set of functions designed to estimate, from a Bayesian approach, the shape parameters of the Beta distribution, whose density function is:

\[f_X(x|\alpha,\beta)=\dfrac{1}{beta(\alpha,\beta)}x^{\alpha-1}(1-x)^{\beta-1};\hspace{1cm}x\in[0,1],\]

where $beta(\alpha,\beta)$ is the Beta function, and $\alpha>0$ and $\beta>0$. For the shape parameters $(\alpha,\beta)$, a new bivariate distribution is used, for which the joint moments have been analytically derived. A sampling algorithm has been designed, the convergence of various chains generated by this algorithm has been monitored, and a simulation study has been carried out considering different scenarios for the shape parameters.

Installation

To run the code, you need to have R installed with the following packages:

You can install the required packages using the following command:

install.packages(c("ggplot2", "gridExtra", "tidyr","plotly","coda","foreach","doParallel","betafunctions","openxlsx","xtable"))

Usage

To run the designed algorithms, follow these steps:

  1. Clone this repository:

     git clone https://github.com/LLerzy/Estimation-Parameter-Beta/tree/main.git
    
  2. Open the R script in any compatible Integrated Development Environment (IDE):

    • For the script that contains the main functions in the shape parameter estimation process, refer to requiredfunctions.R.
  3. You can run the script and load all the functions with the following command:

     Rscript requiredfunctions.R
    

Included Functions

The functions defined in the requiredfunctions.R script include:

Notes:

Branches

The following branches are available in this repository:

Contributions

Contributions are welcome! Please submit a pull request or open an issue if you have any suggestions or improvements.