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]

Re: st: T-testing with Confounding Variables?


From   Richard Goldstein <[email protected]>
To   [email protected]
Subject   Re: st: T-testing with Confounding Variables?
Date   Mon, 24 Feb 2014 13:54:33 -0500

this is called regression; for a quick example of the relationship
between t-test and regression, try the following:

sysuse auto
ttest gear, by(foreign)
regress gear foreign

you will see that the constant in the regression matches the mean for
foreign=0 while the coefficient for foreign matches the difference from
the t-test; since I did not include anything about the possibly unequal
variances, you will see that the p-values also match (the two-sided
p-value from the t-test matches that in the regression)

Rich

On 2/24/14, 1:46 PM, Charles Christian wrote:
> Is there a way to t-test data (e.g., salary by gender), where there
> are confounding variables one wants to control for (e.g., department,
> location)?
> 
> Thank you!
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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