Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Regression Constrained to other variable


From   Oliver Jones <[email protected]>
To   [email protected]
Subject   Re: st: Regression Constrained to other variable
Date   Thu, 05 May 2011 15:41:33 +0200

Hi,

you can first -preserve- your data and then keep just the observations that
meet your restrictions, i.e. -drop if x6 == 1 & (x1 == 0 | x1 == .)-

Best
Oliver



Am 05.05.2011 15:24, schrieb vikramfinavker:
Hi,

can some one please advise me how can i run a regression which is
constrained to other variable.

e.g. i am trying to run following regression.
y = ∝ + βx1+ βx2+βx3+bx5 +ui which is constrained to variable x6

my data for x1 and x6 are like this;

x1              x6
123423        1
134343        1
234234        0
555454        1
664543        0
767677        0
0                0
.                 0
0                1
.                 1
12323        0

now i want to tell stata that is should use all observations of x1 where its
grater than zero (x1>0) and select observations from 0&  missing (.) if x6
is 0.
  so i want stata to select following observations

x1              x6
123423        1
134343        1
234234        0
555454        1
664543        0
767677        0
0                0
.                 0
12323        0

If its my question is not clear, please let me know.

thanks a lot.

--
View this message in context: http://statalist.1588530.n2.nabble.com/Regression-Constrained-to-other-variable-tp6334239p6334239.html
Sent from the Statalist mailing list archive at Nabble.com.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

--
Universität Bielefeld
Fakultät für Wirtschaftswissenschaften
Lehrstuhl für Ökonometrie und Statistik
- -
Bielefeld University
Faculty of Business Administration and Economics
Chair of Econometrics and Statistics
- -
Raum / room:  V9-110
Tel / phone:  +49 (0)521 106 4871
---
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index