vignettes/BMDs_and_ABDs_EstMGFxxxBin.Rmd
BMDs_and_ABDs_EstMGFxxxBin.Rmd
IT WOULD BE CLEARLY BENEFICIAL FOR YOU BY USING THE RMD FILES IN THE GITHUB DIRECTORY FOR FURTHER EXPLANATION OR UNDERSTANDING OF THE R CODE FOR THE RESULTS OBTAINED IN THE VIGNETTES.
In the eleven Binomial Mixture and Alternate Binomial Distributions only Beta-Binomial Distribution is related to this technique. Moment Generating function only exists to Beta-Binomial Distribution.
Let Y=[Y1,Y2,...,YN]T be a random sample of size N from Beta-Binomial distribution with the probability mass function. n is fixed for all clusters. Therefore, shape parameters α(a) and β(b) are estimated using the below equations as ˆα and ˆβ.
ˆα=(n∗m1−m2)m1n(m2−m1−m12)+m12
ˆβ=(n∗m1−m2)(n−m1)n(m2−m1−m12)+m12
where m1=∑Ni=1yiN and m2=∑Ni=1Yi2N are the first two sample moments.
These equations produce unique values for α (a) and β (b).
Below is the code for estimating shape parameters using this technique and function used for this is EstMGFBetaBin
.
This EstMGFBetaBin
function is of output of class mgf
, where outputs include estimated a
,b
parameters, minimized Negative Log Likelihood value min
, Akaike Information Criterion (AIC
) and function call
with input arguments.
## No.of.Asso fre
## 1 0 32
## 2 1 103
## 3 2 122
## 4 3 80
## Estimated alpha parameter for Chromosome data = 6.167982
## Estimated beta parameter for Chromosome data = 4.455237
## No_of_Males freq
## 1 0 3
## 2 1 24
## 3 2 104
## 4 3 286
## 5 4 670
## 6 5 1033
## 7 6 1343
## 8 7 1112
## 9 8 829
## 10 9 478
## 11 10 181
## 12 11 45
## 13 12 7
## Estimated alpha parameter Male_children data= 34.13502
## Estimated beta parameter Male_children data= 31.60849
Further, we can use the above estimated parameters in the fitBetaBin
function and check how good the Beta-Binomial Distribution is fitted for a given Binomial outcome data.