Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Same N when using matrix for ttests


From   Matthew Krauchunas <krauchunasms@mymail.vcu.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Same N when using matrix for ttests
Date   Wed, 15 Sep 2010 10:00:26 -0400

Worked perfectly Scott, thank you for your assistance!

On Tue, Sep 14, 2010 at 1:32 PM, Scott Merryman
<scott.merryman@gmail.com> wrote:
> 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' ...,
>
> Scott
>
>
> On Mon, Sep 13, 2010 at 8:01 AM, Matthew Krauchunas
> <krauchunasms@mymail.vcu.edu> 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:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>

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