Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

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

From |
Nahla Betelmal <[email protected]> |

To |
"[email protected]" <[email protected]> |

Subject |
Re: st: problem with Margin command and interaction graph in fixed effect logistic regression |

Date |
Thu, 7 Nov 2013 20:36:02 +0000 |

Thank you Klaus for your kind explanation, and for the time you gave me. The reason I am interested in the margin and prediction of the model is only to be able to produce the graph. the difficulty is in interpreting the graph itself rather than the estimates of the model. because the estimates of the model were driven with fixed effect into account, however, the graph is drawn by assuming that fixed effect is zero. This is the problem, the graph might not actually represents the estimates of the model as precise as it should be. Thanks again, and sorry for the delay in reply Nahla On 1 November 2013 19:48, Klaus Pforr <[email protected]> wrote: > <> > > Dear Nahla, > > margins basically evaluates the function outcome|indep. vars for specific > values for the indep. var's. With the dydx-option, you get discrete or > marginal changes of this function, which means that this evaluates > differences of the abovementioned function, where for continouos variables > the differences are infinitesimal small and for discrete variables they are > unit-steps (unless you specify other options). > > Note however that with the clogit command you generally have the problem, > that the function for the outcome-prob dependent on the indep. var's is not > completely specified, as the unobserved term alpha is not estimated. If you > use clogit to estimate fixed-effects-logit-models, there is no easy way out. > You can only estimate effects on the logit or the odds-ratio, i.e. the > index-function or propensity for an alternative. If you use clogit to > estimate a mcfadden-choice-model, the unobserved component is determined by > the number of alternatives (unless you have the situation of more than one > choice out of many alternatives). In the mc-fadden-choice-model case, you > can specify a value for alpha, and estimate predicted probabilities. This > follows from the equivalence of this model to mlogit. This type of model is > implemented for straightforward use with asclogit. > > So to repeat, it depends on your model, how to use margins and interpret the > estimates from clogit, and it is easier to use one of the two models to come > to the right form of interpretation. > > best regards > > Klaus > > Am 01.11.2013 16:31, schrieb Nahla Betelmal: > >> Thank you both Alfonso and Klaus for the great help. >> >> I run the following command for each interaction, all worked fine. >> >> margins DV, predict(pu0) at( IVA=(-1.5(0.5)1.5)) >> >> margins DV, predict(pu0) at( IVB=(-1.5(0.5)1.5)) >> >> margins DV, predict(pu0) at( IVC=(-1.5(0.5)1.5)) >> >> I did not use dydx as I did not fully understand it >> >> Thank you so much >> >> Nahla >> >> On 31 October 2013 18:57, Alfonso Sánchez-Peñalver >> <[email protected]> wrote: >>> >>> Hi Nahla, >>> >>> I’ve digged a little more into this. First, I found this in the archive >>> using clogit and margins: >>> >>> http://www.stata.com/statalist/archive/2010-08/msg01454.html >>> >>> It seem that you have to specify the dydx() and predict options to have >>> it work. To illustrate, the following two examples work >>> >>> ——————————— Begin Code —————————————— >>> webuse lowbirth2, clear >>> clogit low lwt smoke ptd ht ui i.race, group(pairid) >>> margins race, dydx(lwt) predict(pu0) at(lwt=(100(10)200)) >>> ——————————— End Code ——————————————— >>> >>> However, the following does not >>> >>> ——————————— Begin Code —————————————— >>> webuse lowbirth2, clear >>> clogit low c.lwt##i.smoke ptd ht ui i.race, group(pairid) >>> margins race, dydx(lwt) predict(pu0) at(lwt=(100(10)200)) >>> ——————————— End Code ——————————————— >>> >>> The problem is that it predicts the marginal effects when the fixed >>> effects are zero. I hope this sheds some light. >>> >>> Alfonso >>> >>> On Oct 31, 2013, at 12:51 PM, Nahla Betelmal <[email protected]> wrote: >>> >>>>> margins drug, at(studytime=(10(5)30)) >>> >>> >>> * >>> * For searches and help try: >>> * http://www.stata.com/help.cgi?search >>> * http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/ >> * http://www.ats.ucla.edu/stat/stata/ > > > > -- > __________________________________ > Dr. Klaus Pforr > GESIS -- Leibniz Institut für Sozialwissenschaft > B2,1 > Postfach 122155 > D - 68072 Mannheim > Tel: +49 621 1246 298 > Fax: +49 621 1246 100 > E-Mail: [email protected] > __________________________________ > > > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/

**References**:

- Prev by Date:
**Re: st: combining results from -tabulate- and -bitest- in the same table** - Next by Date:
**st: how do we find out what is available after -ml-?** - Previous by thread:
**Re: st: problem with Margin command and interaction graph in fixed effect logistic regression** - Next by thread:
**st: Stacked bar chart with twoway** - Index(es):