I have a list of values in [0,1] that I want to fit to a Beta distribution in order to get the corresponding alpha parameter.
I can't use a beta fitting function because my values might be 0's and 1's.
On wikipedia I found this formula for the method-of-moments estimation of alpha given the sample mean and sample variance:

I don't need any exact fitting, just a good approximation. By using sample mean and variance, I should get rid of all the problems arising with 0s and 1s in my sample, right? Will this still be acceptable?
R, see what happens withzapsmall(rbeta(50, shape1=1/1000, shape2=1/1000))! (This both affirms your point and shows one way in which such data can arise with a "continuous" distribution.) – whuber♦ Jul 23 '12 at 12:32