I have a variable Y with beta distribution : Beta(alpha,1/3).
I have to find the value of alpha such as : P(Y <= 0.416) =0.2
for more details read my question in math stackexchange here : https://math.stackexchange.com/questions/3038125/beta-distribution-find-the-parameter-alpha-of-mathcalbe-alpha-frac1
I wrote this function (i supposed that x is alpha, the root of the function):
f=function(x){
pbeta(0.416,x,1/3)
}
and i tried to use uniroot:
uniroot(f,interval=c(0,5),tol=1e-5)
I din't understand this message: Error in uniroot(f, interval = c(0, 5), tol = 1e-05) : f() values at end points not of opposite sign
.
I read here Uniroot solution in R that this method method needs stronger assumption to ensure the existence of a root: f(lower) * f(upper) < 0; but i have a positive function and then i couldn't use this function! Does an alternative function exist in R? Can anyone suggest me the code, how to do find alpha with R? Thanks for the help in advance!!