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]

st: problem with marksample touse


From   Xuan Zhang <[email protected]>
To   [email protected]
Subject   st: problem with marksample touse
Date   Wed, 23 May 2012 16:31:48 -0400

In the shamhaz ado file, there are several lines like these:

if "`weight'"=="" {
		if trim("``opt2''")=="" qui logit `tmplhs' ``rhsvars'' if `touse' &
(`tmplhs'==0 | (`tmplhs'==1 & L.`tmplhs'==0 & L.`touse'==1))

Question1
I have problem understanding what's meaning of  if `touse'. Is it a
short version of if 'touse'==1?  I mean after the syntax command, what
exactly marksample do to my data? I searched some note on the internet
and one of them says "The marksample touse ensures that only
observations satisfying the if or in clauses are used." but since
there is no if option in the ado code, does that mean that every
observation in my data is marked as 1? really confused.

syntax varlist(ts) [if] [in] [aweight/] [, *]
marksample touse

Question 2
weight is a macro that STATA keeps it for itself, right? I guess in
the first line of the code, if "`weight'"==""  means if there is no
option after the logit command, then quietly logit left hand side
variable with the right hand side variable without the option. But I'm
not sure about that.

Thanks a lot.

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