Modelling a percentge as a dependent variable I have a dataset containing 4 variables:


*

*Y - the dependent variable. This is a percentage of students in a school that choose to take an external exam. The values vary from 20% to 70%.

*X - the independent variable. This is a binary variable with two groups: A and B.

*M - A mediator variable.

*W - A moderator variable.


As far as I know, it is not possible to use a linear regression model since the dependent variable is a percentage variable, which means that predictions of the model might exceed the values of 0 to 1. In addition, I understand that by using percentages, the relation is not linear.
I heard that the solution is to use a transformation, the arcsin of the square root of the dependent variable.
I have a few questions:


*

*Why is the arcsin of the square root the answer? Where is it coming from ?

*If I do it, how to I interpret the coefficient of the model? In other words, how do I make a reverse transformation ?

*Is there a better way to tackle this problem ? Someone mentioned a beta regression, is it an option?


Thank you in advance !
 A: 
As far as I know, it is not possible to use a linear regression model since the dependent variable is a percentage variable, which means that predictions of the model might exceed the values of 0 to 1. 

They might but given your closest observed proportion to either boundary is 0.2, I doubt that will happen unless you're predicting far outside the range of the data.
You also have potential issues with heteroskedasticity, skewness and discreteness.
The heteroskedasticity implied by a binomial proportion is relatively mild for your range of proportions; the ratio of largest to smallest standard deviation would be 1.25 (for proportions of 50% vs 20%). This won't cause big problems if you're not projecting outside the range of the data. If your counts are not small the skewness and discreteness at the p=0.2 case are not likely to trouble you either.
So although the linear regression model is incorrect (it always is), it's probably going to work quite well. [You can always use simulation to investigate behaviour in cases like yours]

In addition, I understand that by using percentages, the relation is not linear.

As proportions approach boundaries, it can't be (because any line that's not perfectly flat would cross a boundary. But your case appears to have only middling proportions. That doesn't mean the relationship will be linear, only that it is possible to be close enough to linear that you couldn't tell a practical difference anyway. Consider how close to linear a logistic function is in this middle region.
In particular, if you look at the population p's (not the noisy data, the actual population curve of expected values) from an exact binomial glm over that range, you can't really see deviation from linearity until you're  below 0.25 or perhaps a tad less.

So - if your predictions are always between 0.2 and 0.7, that really doesn't appear to be much of an issue.

I heard that the solution is to use a transformation, the arcsin of the square root of the dependent variable.

That has to do with fixing the heteroskedasticity (non-constant variance), not the nonlinearity.
Specifically, in the case of a binomial proportion, the arcsin-square root is what's called a variance-stabilizing transformation, because it makes the variance approximately constant (it works better when the sample sizes aren't too small). It doesn't work with exact 0's or 1's.
While it isn't a linearizing transformation (for a logistic model that would be the $\operatorname{logit}$), as a side-effect it does somewhat improve linearity, at least in the range you're looking at; in particular it seems to reduce the curvature at the bottom of the above plot, making the whole section look almost straight.
As a further side effect, it also somewhat improves the normal approximation (that is, while a binomial is approximately normal for large n if you're not too close to the boundary, after this transformation the approximation is better). This is a convenient side effect, though it's not the same as the symmetrizing transformation (so if all you want is being close to normal, you can do better).

In other words, how do I make a reverse transformation ?

Invert the two components of the transformation one by one:
If $z=\arcsin(\sqrt{p})$ then (taking $\sin$ of both sides) $\sin(z)=\sqrt{p}$ and hence $p=\sin^2(z)$ (squaring both sides to isolate $p$).
[This is already answered elsewhere on site (e.g. here and the final section of this answer).]
Beware, however -- when you reverse a nonlinear transformation, you don't transform back to expected values on the original scale. If that's your aim you may want to consider whether you need an approximate unbiasing term (it depends what you're trying to achieve).

Someone mentioned a beta regression, is it an option?

For count proportions it wouldn't be my first thought (though it would probably work quite well, since it can emulate the mean and variance of a quasi-binomial with large-n  as long as you don't stray really close to the boundary). The approaches being discussed in comments (such as a mixed binomial GLM or perhaps a quasi-binomial model, depending on your interest) would be the sorts of models I'd look to first (which exactly you choose depends on what you want to know and how you see your variables and so on).
But (for the reasons outlined in the earlier parts of my answer, if you fitted a plain old mixed linear model, it would probably work quite well, and could yield very similar predictions.
