Skip to content
Snippets Groups Projects
Commit 9b5c6a2f authored by Clare's avatar Clare
Browse files

Initial commit of est_Beta_Params helper function

parent 67dcddd7
No related branches found
No related tags found
No related merge requests found
## Estimates starting parameters for the Beta distribution calculation
##
## @param mu The mean of the data.
## @param var The variance of the data.
##
## @return A list containing the estimated beta parameters alpha and beta.
##
est_Beta_Params <- function(mu, var){
alpha <- ((1-mu)/var - 1/mu) * mu^2
beta <- alpha * (1/mu - 1)
return(params = list(alpha = alpha, beta = beta))
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment