Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: marksample, byable


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   st: Re: marksample, byable
Date   Fri, 15 Sep 2006 10:53:18 -0400

-help marksample- shows you the novarlist option.

M Blasnik

----- Original Message ----- From: "Herb Smith" <[email protected]>
To: <[email protected]>
Sent: Friday, September 15, 2006 10:45 AM
Subject: st: marksample, byable



I have a program that I want to be able to run on variable after variable,
within strata (or "by" subgroups).

The program takes a `varlist' as input.

Now, as far as I can tell, when I do a

. marksample `touse'

even before I get to the "byable" aspects of the problem, Stata is marking
my sample so that all cases with any missing data on any variable is being
marked out of the sample...?

I understand this if my `varlist' is being used to run, for example, some
sort of regression.

But I am doing a set of procedures (weighting estimators, for a sampling
issue), on each variable, one at a time.

I realize that I could just change the program to work on `varname'--i.e.,
one variable at a time--and just write a little front end loop outside the
program; but, in addition to being inelegant, it makes it more difficult
to cumulate and compare results between variables.

My questions:

Am I understanding what "marksample" is up to, and, if so, is there a
trick for getting the "marksample" to relax, i.e., not to do what is
effectively listwise deletion of cases?
*
*   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