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

st: Re: Using by with xtile?


From   "Zhiqiang Wang" <[email protected]>
To   <[email protected]>
Subject   st: Re: Using by with xtile?
Date   Tue, 2 Jul 2002 10:33:03 +0930

I wrote a short program -xtile2- three years ago in Stata 6. Hopefully, it
still works. Please let me know if not.

syntax
. xtile2 newar=oldvar [fweight=weightvar], by(state time)

To find the program
. net search xtile2

Zhiqiang
Menzies School of Health Research
Darwin Australia




----- Original Message -----
From: "Ankur Sarin" <[email protected]>
To: <[email protected]>
Sent: Tuesday, July 02, 2002 9:05 AM
Subject: st: Using by with xtile?


> Hi, I have survey data (weighted) on individuals
> within 30 states for 2 years (not the same
> individuals). Is there a straight forward way by which
> I can create  deciles by each state and
> year for a variable. Ultimately I would like a
> categorical variable that would, say have a 1 for each
> individual in the lowest decile of the state that the
> individual belongs to for that particular year and so
> on. I don't think pctile and xtile would allow me to
> do this by state and year. Thanks for the help.
> Regards
>                         -Ankur
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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