Code:
. margins i.hour6
Adjusted predictions Number of obs = 7,801
Model VCE : Semirobust
Expression : Exponentiated linear prediction, predict()
------------------------------------------------------------------------------
| Delta-method
| Margin Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
hour6 |
0 | 154.271 4.230974 36.46 0.000 145.9785 162.5636
1 | 147.976 3.380656 43.77 0.000 141.35 154.6019
2 | 151.9056 3.582315 42.40 0.000 144.8844 158.9268
3 | 157.2417 3.570002 44.05 0.000 150.2447 164.2388
4 | 158.6969 3.750886 42.31 0.000 151.3453 166.0485
5 | 162.7874 4.190865 38.84 0.000 154.5735 171.0014
6 | 165.2312 5.213272 31.69 0.000 155.0134 175.449
7 | 168.424 5.232227 32.19 0.000 158.1691 178.679
------------------------------------------------------------------------------
. margins rb5.hour6
Contrasts of adjusted predictions
Model VCE : Semirobust
Expression : Exponentiated linear prediction, predict()
------------------------------------------------
| df chi2 P>chi2
-------------+----------------------------------
hour6 |
(0 vs 5) | 1 3.17 0.0748
(1 vs 5) | 1 14.53 0.0001
(2 vs 5) | 1 8.28 0.0040
(3 vs 5) | 1 2.59 0.1075
(4 vs 5) | 1 2.63 0.1050
(6 vs 5) | 1 0.54 0.4643
(7 vs 5) | 1 2.57 0.1089
Joint | 7 22.90 0.0018
------------------------------------------------
--------------------------------------------------------------
| Delta-method
| Contrast Std. Err. [95% Conf. Interval]
-------------+------------------------------------------------
hour6 |
(0 vs 5) | -8.516408 4.780009 -17.88505 .8522373
(1 vs 5) | -14.81144 3.886262 -22.42838 -7.194507
(2 vs 5) | -10.88182 3.782032 -18.29446 -3.469169
(3 vs 5) | -5.545677 3.445541 -12.29881 1.20746
(4 vs 5) | -4.090535 2.52343 -9.036367 .8552972
(6 vs 5) | 2.443756 3.33936 -4.101269 8.988782
(7 vs 5) | 5.636613 3.516349 -1.255304 12.52853
--------------------------------------------------------------Code:
. margins,eydx(i.hour6)
Conditional marginal effects Number of obs = 7,801
Model VCE : Semirobust
Expression : Exponentiated linear prediction, predict()
ey/dx w.r.t. : 1.hour6 2.hour6 3.hour6 4.hour6 5.hour6 6.hour6 7.hour6
------------------------------------------------------------------------------
| Delta-method
| ey/dx Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
hour6 |
1 | -.0416609 .018553 -2.25 0.025 -.0780241 -.0052978
2 | -.0154516 .0235164 -0.66 0.511 -.0615429 .0306398
3 | .0190735 .025897 0.74 0.461 -.0316836 .0698306
4 | .0282851 .0274845 1.03 0.303 -.0255835 .0821538
5 | .0537343 .0302089 1.78 0.075 -.005474 .1129426
6 | .0686347 .0351523 1.95 0.051 -.0002626 .1375319
7 | .0877739 .0371598 2.36 0.018 .014942 .1606058
------------------------------------------------------------------------------
Note: ey/dx for factor levels is the discrete change from the base level.
. margins,eydx(ib5.hour6)
Conditional marginal effects Number of obs = 7,801
Model VCE : Semirobust
Expression : Exponentiated linear prediction, predict()
ey/dx w.r.t. : 1.hour6 2.hour6 3.hour6 4.hour6 5.hour6 6.hour6 7.hour6
------------------------------------------------------------------------------
| Delta-method
| ey/dx Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
hour6 |
1 | -.0416609 .018553 -2.25 0.025 -.0780241 -.0052978
2 | -.0154516 .0235164 -0.66 0.511 -.0615429 .0306398
3 | .0190735 .025897 0.74 0.461 -.0316836 .0698306
4 | .0282851 .0274845 1.03 0.303 -.0255835 .0821538
5 | .0537343 .0302089 1.78 0.075 -.005474 .1129426
6 | .0686347 .0351523 1.95 0.051 -.0002626 .1375319
7 | .0877739 .0371598 2.36 0.018 .014942 .1606058
------------------------------------------------------------------------------
Note: ey/dx for factor levels is the discrete change from the base level.I could not find the coding syntax in pdf help for margins or contrast - but I'm sure I'm missing somethig obvious.
thank you
0 Response to setting base level for margins with eydx
Post a Comment