Statalist


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

Re: st: a question on t-test


From   "Lili Yan" <[email protected]>
To   [email protected]
Subject   Re: st: a question on t-test
Date   Sat, 21 Jun 2008 14:29:02 -0500

Thank you very much! I truly appreciate.

Best,
Lili

On Fri, Jun 20, 2008 at 7:41 PM, jverkuilen <[email protected]> wrote:
> If you are expecting unequal variances and have pweights, I think -reg- with the robust for heteroscedasticity makes sense.
>
>
>
> -----Original Message-----
> From: "Lili Yan" <[email protected]>
> To: [email protected]
> Sent: 6/20/2008 6:26 PM
> Subject: Re: st: a question on t-test
>
> Hi Richard,
>
> Thank you very much! Yes, -lincom- does seem to do the unequal
> variance case and actually, I am expecting different variances in my
> data. Now I see.
>
> And thanks to Maarten and Martin, too!
>
> Best,
> Lili
>
> On Fri, Jun 20, 2008 at 5:09 PM, Richard Williams
> <[email protected]> wrote:
>> At 04:38 PM 6/20/2008, Lili Yan wrote:
>>>
>>> Hi Richard,
>>>
>>> Thank you very much for your prompt response! I did not use -ttest-
>>> for several reasons:
>>>
>>> First, I actually have a weight variale in my data and -ttest- does
>>> not allow weights.
>>> Second, I need compare means of many variables, so I want to quietly
>>> run means calculation and comparison, then generate a table with -mat-
>>> commands. In that table, I want to see p-value. So I have to calculate
>>> it as Stata does not save it.
>>
>> OK, first off, using lincom seems to be the equivalent of running a t-test
>> with the unequal variances option.  Run this code:
>>
>> sysuse auto
>> mean mpg, over(foreign)
>> lincom [mpg]Domestic-[mpg]Foreign
>> ttest mpg, by(foreign)
>> ttest mpg, by(foreign) unequal
>>
>> Second, what about just running
>>
>> reg mpg foreign
>>
>> A couple of people have suggested oneway or anova.  Those might do the
>> trick, but it depends on your weights, i.e. reg allows pweights but anova
>> and oneway do not.  Also, when you say "I need compare means of many
>> variables" to me that sounds like you have multiple dependent variables
>> rather than multiple groups.  Maybe you want manova or mvreg or something
>> like that.
>>
>>
>> -------------------------------------------
>> Richard Williams, Notre Dame Dept of Sociology
>> OFFICE: (574)631-6668, (574)631-6463
>> HOME:   (574)289-5227
>> EMAIL:  [email protected]
>> WWW:    http://www.nd.edu/~rwilliam
>>
>> *
>> *   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/
>>
> *
> *   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/
>
>
> *
> *   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/
>
*
*   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