Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Generate quartile adjusted by subpopulation

From   Xavi Barber <[email protected]>
To   [email protected]
Subject   st: Generate quartile adjusted by subpopulation
Date   Mon, 05 Apr 2004 16:35:49 +0200

Dear statalister:

I have 4 subpopulation (group A (n=200), B(n=200), C(n=200), D(n=400))

I need to create a new categorical variable, this variables is the 4Q-tile of variable varXXX but the distribution of the quartile is according to subpopulation D.

I use the xtile & the xtile2 command, but I not sure than the new 4Q variable is ok.


xtile2 var4Q=varXXX , nq(4) by(grupD)

but grupD have 600 missing and the new variable var4Q have 400 observations and not 1000.

Can You help me?
* For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index