Bookmark and Share

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

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

Re: st: Same N when using matrix for ttests

From   Scott Merryman <>
Subject   Re: st: Same N when using matrix for ttests
Date   Tue, 14 Sep 2010 12:32:20 -0500

The -marksample-  will set the marker to 0 in observations if any of
the variables are missing.

You could drop the -markout- and -marksample- lines and instead carry
the `if' macro to the -ttest line:

      qui ttest `var' `if' ...,


On Mon, Sep 13, 2010 at 8:01 AM, Matthew Krauchunas
<> wrote:
> Hello,
> I am running a series of ttests to compare my sample to excluded
> observations.  I have adapted Ben Jann's code that I found on
> Statalist, but I am having a problem in that the same N is being
> produced for each variable even though I know the Ns are different.
> Here is the code I am using and the result:

*   For searches and help try:

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