Beta regression of proportion data including 1 and 0 I am trying to produce a model for which I have a response variable which is a proportion between 0 and 1, this includes quite a few 0s and 1s but also many values in between. I am thinking about attempting a beta regression. The package I have found for R (betareg) only allows values  in between 0 and 1 but not including 0 or 1 them selves. I have read elsewhere that theoretically the beta distribution should be able to handle values of 0 or 1 but I do not know how to handle this in R.I have seen some people add 0.001 to the zeros and take 0.001 from the ones, but I am not sure this is a good idea?
Alternatively I could logit transform the response variable and use linear regression. In this case I have the same problem with the 0 and 1's which cannot be log transformed.
 A: Came across a current online review piece on 'Zero-One Inflated Beta Models', by Karen Grace-Martin in "The Analysis Factor", outlining the proposed solution (noted above by Matze O in 2013) to address the 0/1 occurrence issue. To quote parts from the non-technical review:

So if a client takes their medication 30 out of 30 days, a beta regression won’t run.  You can’t have any 0s or 1s in the data set.
Zero-One Inflated Beta Models
There is, however, a version of beta regression model that can work in this situation.  It’s one of those models that has been around in theory for a while, but is only in the past few years become available in (some) mainstream statistical software.
It’s called a Zero-One-Inflated Beta and it works very much like a Zero-Inflated Poisson model.
It’s a type of mixture model that says there are really three processes going on.
One is a process that distinguishes between zeros and non-zeros. The idea is there is something qualitatively different about people who never take their medication than those who do, at least sometimes.
Likewise, there is a process that distinguishes between ones and non-ones.  Again, there is something qualitatively different about people who always take their medication than those who do sometimes or never.
And then there is a third process that determines how much someone takes their medication if they do some of the time.
The first and second processes are run through a logistic regression and the third through a beta regression.
These three models are run simultaneously.  They can each have their own set of predictors and their own set of coefficients...
Depending on the shape of the distribution, you may not need all three processes.  If there are no zeros in the data set, you may only need to accommodate inflation at 1.
It’s highly flexible and adds important options to your data analysis toolbox."

Here is also a more recent December 2015 technical paper source for 'zoib: An R Package for Bayesian Inference for Beta Regression and Zero/One Inflated Beta Regression'. The authors note that the y variable, in a Zero/one inflated beta (ZOIB) regression model(s), can be applied when y takes values from closed unit interval [0, 1]. Apparently, the zoib model assumes that Yij follows a piecewise distribution (see system depicted in (1) on p.36).
A: You could use zero- and/or one inflated beta regression models which combine the beta distribution with a degenerate distribution to assign some probability to 0 and 1 respectively. For details see the following references: 
Ospina, R., & Ferrari, S. L. P. (2010). Inflated beta distributions. Statistical Papers, 51(1), 111-126.
Ospina, R., & Ferrari, S. L. P. (2012). A general class of zero-or-one inflated beta regression models. Computational Statistics and Data Analysis, 56(6), 1609 - 1623.
These models are easy to implement with the gamlss package for R.
A: The documentation for the R betareg package mentions that

if y also assumes the extremes 0 and 1, a useful transformation in practice is (y * (n−1) + 0.5) / n where n is the sample size.

http://cran.r-project.org/web/packages/betareg/vignettes/betareg.pdf
They give the reference Smithson M, Verkuilen J (2006). "A Better Lemon Squeezer? Maximum-Likelihood Regression with Beta-Distributed Dependent Variables." Psychological Methods, 11 (1), 54–71.
A: Check out the following, where an ad hoc transformation is mentioned maartenbuis.nl/presentations/berlin10.pdf on slide 17. Also you could modeling 0 and 1 with two separate logistic regressions and then use Beta regression for those not at the boundary.
A: The beta model is for a binary variable that is modeled as Bernoulli-distributed with unknown probability $p$.  The beta model calculates a likelihood over $p$, which is beta-distributed.
Your variable is a proportion.  You could model the proportion as being beta-distributed with unknown parameters $a, b$.  The model you want is the conjugate prior of the beta distribution, which will then calculate a likelihood over $a, b$.
I would have to derive the model again, but if I remember correctly, for proportions $x_1, \dotsc, x_n$ you return three expectation parameters: $n$, the number of points, and if my memory is right $\sum_j[\psi(\sum_i x_i) - \psi(x_j)]$ and $\sum_j[\psi(\sum_i 1-x_i) - \psi(1-x_j)]$.  These are the parameters of a distribution over the parameters of your beta distribution, which model your proportions.
