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

Re: st: How to use r(p)


From   Jean-Benoit Hardouin <[email protected]>
To   [email protected]
Subject   Re: st: How to use r(p)
Date   Mon, 12 Sep 2005 11:10:26 +0200

. centile d, centile(33 66)
. reg y a b c if d<=r(c_1)
. reg y a b c if d>r(c_1)&d<r(c_2)
. reg y a b c if d>=r(c_2)

Jean-Benoit Hardouin

FUKUGAWA, N. a écrit :

Dear all,
What if we want to run 3 regression models according to the classification of variable "d"?

centile d, centile(33)
centile d, centile(66)
reg y a b c if d<=r(c_1)
reg y a b c if d>r(c_1)&d<r(c_2)
reg y a b c if d>=r(c_2)

Thank you in advance.
--
FUKUGAWA Nobuya, Ph.D.
[email protected]

Jean-Benoit Hardouin wrote:


You can try
. centile d, centile(33)
. reg y a b c if d>r(c_1)
Best,
Jean-Benoit Hardouin

FUKUGAWA, N. a écrit :

Dear all,
Suppose we want to limit observations where one variable records a larger value
than its top quartile, we can write as follows.

sum d,detail
reg y a b c if d>r(p75)

However, this program allows only fixed thresholds such as 1, 10, and 75 percent.
How can I use other thresholds such as r(p33) in the program?
Or, is there any program to do the same?
Thanks in advance.

*
*   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/



--
*********************************************
Jean-Benoit Hardouin
Biostatisticien
Observatoire Régional de la Santé du Centre
BP 2439
1, rue Porte Madeleine
45032 Orléans Cedex 1
tél : 02 38 74 48 80
fax : 02 38 74 48 81
Email : [email protected]
*********************************************

*
*   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