Contents
How can I analyze variables with several Zeros?
It’s having 0s before transformation that’s the problem, as log (0) is Inf. So changing 0 to 1 just makes the transformation possible. When it comes to plotting the data, you plot the x+1 values (i.e. before transformation) and then plot them on a log scale, so the axis effectively transforms the data for you.
Is it necessary to transform a dependent variable?
There are many ways to transform data. There is nothing inherently invalid about doing this, but very often such transformations are misguided. It is not necessary for the dependent variable to be normally distributed. The assumption about normality concerns the residuals, not the response variable itself.
Is it necessary for dependent variable to be normally distributed?
It is not necessary for the dependent variable to be normally distributed. The assumption about normality concerns the residuals, not the response variable itself. If the residuals are not plausibly normally distributed then of course some transformation may be warranted.
Do you have to take 1 and 0 as two values?
It is not compulsory that “1 and 0” must always be taken as the two values assumed by a dichotomous variable. The two values can be chosen arbitrarily.
What should the expected number of zeros be?
The expected number of 0 values is ~72, very close to the 76 observed in the data. This is no big surprise, since I fit the same model that I used to create the data. The example above demonstrates a model without excess zeros.
How to create a model without excess zeros?
The example above demonstrates a model without excess zeros. Let me finish by fitting a model to data that has more zeros than expected by the distribution. This can be done by fitting a Poisson GLM instead of a negative binomial GLM to my simulated data. Remember the data contain 76 zeros.
How to check for excess zeros in data?
The key to checking for excess zeros is to estimate the number of zeros you would expect to see if the fitted model were truly the model that created your data and compare that to the number of zeros in the actual data.