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

st: RE: 2 queries re code in -sureg-


From   Joly.Patrick@ic.gc.ca
To   statalist@hsphsun2.harvard.edu
Subject   st: RE: 2 queries re code in -sureg-
Date   Tue, 8 Oct 2002 11:10:00 -0400

Stephen P. Jenkins wrote
> I am going through the code for -sureg-
> in detail (hoping to adapt some of it
> for my own uses!). (Similar code appears
> in related commands.)  I have two queries:
> (1) Why is there no -markout- line to
>     accompany the -markout- one?
>     [Is it because this is handled via
>     -reg3-, which -sureg- calls?]


I am not sure what you mean by "accompany the -markout- one" since -markout-
does not appear in -sureg-.  Did you mean to write "accompany the
-marksample touse- line"?  If so, then note that -marksample touse- is
equivalent to typing

   tempvar touse
   mark `touse' `if' `in'
   markout `touse' `varlist'

Therefore, -markout ...- is not required if the aim is to define the binary
variable `touse' as being ==1 when the [if exp] and [in range] conditions
are satisfied and the variables in `varlist' are not-missing, ==0 otherwise.

That said, nothing prevents the programmer to use -markout `touse'- after
-marksample- when one also wants to restrict the sample to observations
where values of other variables (ie. variables not in the varlist parsed by
-syntax ...-) are not missing.  See [P] mark or -help mark-.

Patrick Joly
joly.patrick@ic.gc.ca
pat.joly@utoronto.ca
*
*   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