I have analysed some data using melogit:
melogit xla i.time c.c || op:, or
and I can estimate margins at particular values of c:
. margins time, at(c = 2) predict(mu fixedonly)
Adjusted predictions Number of obs = 584
Model VCE : OIM
Expression : Predicted mean, fixed portion only, predict(mu fixedonly)
at : c = 2
------------------------------------------------------------------------------
| Delta-method
| Margin Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
time |
1 | .0971724 .0316593 3.07 0.002 .0351213 .1592236
2 | .0482318 .0186977 2.58 0.010 .0115851 .0848786
------------------------------------------------------------------------------
and also:
. margins, dydx(time) at(c=(2(1)7)) predict(mu fixedonly)
Conditional marginal effects Number of obs = 584
Model VCE : OIM
Expression : Predicted mean, fixed portion only, predict(mu fixedonly)
dy/dx w.r.t. : 2.time
------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
1.time |(base outcome)
-------------+----------------------------------------------------------------
2.time |
_at |
1 | -.0489406 .0239843 -2.04 0.041 -.0959489 -.0019322
2 | -.1346223 .0586578 -2.30 0.022 -.2495894 -.0196551
3 | -.1837653 .0768254 -2.39 0.017 -.3343403 -.0331903
4 | -.1024042 .0481969 -2.12 0.034 -.1968683 -.0079401
5 | -.0326304 .0184332 -1.77 0.077 -.0687589 .003498
6 | -.0085051 .0056808 -1.50 0.134 -.0196393 .0026291
------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.
However when I use:
margins time, at(c = (2 3)) predict(mu fixedonly)
I get:
conformability error
r(503);
I would be grateful for any advice on resolving this error.
I am using Stata 13.1, Windows 8.1.
Thank you,
Martyn
melogit xla i.time c.c || op:, or
and I can estimate margins at particular values of c:
. margins time, at(c = 2) predict(mu fixedonly)
Adjusted predictions Number of obs = 584
Model VCE : OIM
Expression : Predicted mean, fixed portion only, predict(mu fixedonly)
at : c = 2
------------------------------------------------------------------------------
| Delta-method
| Margin Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
time |
1 | .0971724 .0316593 3.07 0.002 .0351213 .1592236
2 | .0482318 .0186977 2.58 0.010 .0115851 .0848786
------------------------------------------------------------------------------
and also:
. margins, dydx(time) at(c=(2(1)7)) predict(mu fixedonly)
Conditional marginal effects Number of obs = 584
Model VCE : OIM
Expression : Predicted mean, fixed portion only, predict(mu fixedonly)
dy/dx w.r.t. : 2.time
------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
1.time |(base outcome)
-------------+----------------------------------------------------------------
2.time |
_at |
1 | -.0489406 .0239843 -2.04 0.041 -.0959489 -.0019322
2 | -.1346223 .0586578 -2.30 0.022 -.2495894 -.0196551
3 | -.1837653 .0768254 -2.39 0.017 -.3343403 -.0331903
4 | -.1024042 .0481969 -2.12 0.034 -.1968683 -.0079401
5 | -.0326304 .0184332 -1.77 0.077 -.0687589 .003498
6 | -.0085051 .0056808 -1.50 0.134 -.0196393 .0026291
------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.
However when I use:
margins time, at(c = (2 3)) predict(mu fixedonly)
I get:
conformability error
r(503);
I would be grateful for any advice on resolving this error.
I am using Stata 13.1, Windows 8.1.
Thank you,
Martyn
Comment