I was hoping someone could help with the following query - the xtile command is not dividing my continous variable into four equal groups, which is what I assume it would do according to the help file.
I type;
xtile quartvar=var, nq(4)
And it results in my sample being split into groups of 39.84%, 13.95%, 26.10% and 20.11%
I tested it by looking tertiles
xtile tertvar=var, nq(3)
And it results in the sample being split into groups of 39.84%, 34.50% and 25.65%
The variable is heavily left skewed, with the majority of the sample having a value of 0/1, which I'm wondering has something to do with it? But I had assumed even if the case of non-normal distribution, it would still generate 4 (or 3) equal groups as this is the definition of a quantile/tertile.
If anyone could help me troubleshoot this issue (and explain where I am going wrong), I would be hugely grateful.
I type;
xtile quartvar=var, nq(4)
And it results in my sample being split into groups of 39.84%, 13.95%, 26.10% and 20.11%
I tested it by looking tertiles
xtile tertvar=var, nq(3)
And it results in the sample being split into groups of 39.84%, 34.50% and 25.65%
The variable is heavily left skewed, with the majority of the sample having a value of 0/1, which I'm wondering has something to do with it? But I had assumed even if the case of non-normal distribution, it would still generate 4 (or 3) equal groups as this is the definition of a quantile/tertile.
If anyone could help me troubleshoot this issue (and explain where I am going wrong), I would be hugely grateful.
Comment