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

st: RE: how to run nbreg with "if" command?


From   "Scott Merryman" <smerryman@kc.rr.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: how to run nbreg with "if" command?
Date   Mon, 14 Mar 2005 18:19:10 -0600

Did you accidentally put a comma before the if statement?

. sysuse auto
(1978 Automobile Data)

. nbreg rep mpg ,if fore == 0
option if not allowed
r(198);

. nbreg rep mpg if fore == 0

Fitting Poisson model:
<snip>


Scott

> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> statalist@hsphsun2.harvard.edu] On Behalf Of sarah smith
> Sent: Monday, March 14, 2005 2:37 PM
> To: statalist@hsphsun2.harvard.edu
> Subject: st: how to run nbreg with "if" command?
> 
> Dear stata users;
> 
> I am trying to run nbreg as below;
> 
> nbreg y x1 x2 if x3==1
> 
> where x3 is a dummy variable and I want to do the regression only
> using the observations where x3 is equal to 1. However I receive an
> error message saying that "if is not allowed". Could you suggest a way
> to do this?
> 
> Thank you very much,
> Sarah



*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index