Regress function options


New Member
So I was running a regression on Stata, and I get slightly different outputs depending on if I put "r" at the end of my code.

For example:
regress salary age gender location education
differs slightly from
regress salary age gender location education, r

What does this "r" do at the end?

I noticed that when I used "r", the output has the title of Linear Regression, and without "r" it doesn't say anything.

Any thoughts?


Anything coming after the comma is an option - so in this case you're running the command -regress- with the option -r-

The r is just an abbreviation. If you look at -help regress- you'll see that there's an option called -robust-, and that the "r" of "robust" is underlined. This means that you can specify the -robust- option by using "r" as a short-cut.

So to answer your question it's a linear regression with robust standard errors. See -help regress- for more info.
There are some assumptions for an OLS regression:

1. E(u_i ): The errors have zero mean
2. The variance of the errors is constant (non-random) and finite over all values of X1
3. The errors are linearly independent of one another
4. Disturbances are homoscedastic (White test checks this)
5. Disturbances are not autocorrelated

Did you check for this?
In another statistical program (Eviews) you can control for autocorrelation and homo/heteroscedasticy. If you control for it, and the "problem" is gone, you can use an OLS regression. (If not, you can use it too, but you should mention it :p ). This should also be possible in Stata, but I never tried it :)

Check this link to find out how you can test your data in Stata: