# Estimating from regression

#### DniC

##### New Member
Hi again. Sorry for spamming the forum, but I can't seem to get the old thread to reflect the title of the new problem.

I ran this regression:
regress lw college collegexexp testscore dummy* exp expsq

Which is good and all, but then I want to estimate coefficients at specific exp values (i.e. exp=1). But I can't quite figure out which command to use.

Any help is appreciated. Thanks!

#### bukharin

##### RoboStataRaptor
I think you're after -margins- (or -adjust- if you're running an older version of Stata)

#### DniC

##### New Member
I'm using Stata 11.0 and from what I've read it looks like it should work. But the execution of it is a little...odd for me:

. margins, dydx(college collegexexp) at(exp=(0 1 10 15))

Average marginal effects Number of obs = 7767
Model VCE : OLS

Expression : Linear prediction, predict()
dy/dx w.r.t. : college collegexexp

1._at : exp = 0

2._at : exp = 1

3._at : exp = 10

4._at : exp = 15

------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
college |
_at |
1 | -.059791 .0099057 -6.04 0.000 -.0792057 -.0403762
2 | -.059791 .0099057 -6.04 0.000 -.0792057 -.0403762
3 | -.059791 .0099057 -6.04 0.000 -.0792057 -.0403762
4 | -.059791 .0099057 -6.04 0.000 -.0792057 -.0403762
-------------+----------------------------------------------------------------
collegexexp |
_at |
1 | .0026408 .0008571 3.08 0.002 .0009609 .0043208
2 | .0026408 .0008571 3.08 0.002 .0009609 .0043208
3 | .0026408 .0008571 3.08 0.002 .0009609 .0043208
4 | .0026408 .0008571 3.08 0.002 .0009609 .0043208
------------------------------------------------------------------------------

Theoretically, it should be estimating based on "college" and "collegexexp" as opposed to "college" and "collegexexp" independently, but I'm not sure how to get that to work with the -margins- command. I did it by hand once:
_college+_collegexexp*a
where a is the years of experience. But this doesn't really suffice since standard error is what I'm most interested in at the moment.