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 on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: Controlling for variables


From   Don Ruby <goofnmick@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Controlling for variables
Date   Mon, 25 Oct 2010 19:36:18 -0400

Say you are regressing log(wages) on age and education. Assume that
your wage variable is entitled "wage". You would type the following:

gen logwage=log(wage)

xi: reg logwage age educ

If you want Stata to compute standard errors that are robust to
heteroskedasticity:

xi: reg logwage age educ, robust

I'm assuming that your variable of interest is education, so any other
"control" variables can be listed alongside your variable of interest.

Cheers,

DON

On Mon, Oct 25, 2010 at 5:14 PM, dpbowes <dpbowes@email.unc.edu> wrote:
> Hi! I am somewhat new to Stata and trying to figure out how to control for
> variables in a regression (age, education)  I know all I am doing is
> holding them constant but for a large data set what entries do I need to
> control for those variables.  Thanks for your help!
> *
> *   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