Bookmark and Share

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

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

st: Marginal-effect calculations after 'xtlogit, fe' ?

From   <>
To   <>
Subject   st: Marginal-effect calculations after 'xtlogit, fe' ?
Date   Tue, 29 Jun 2010 23:09:50 +1100

Hello all,

I understand that marginal effect calculations are only possible with the default random effect of xtlogit, as follows :

xtlogit, conflit txaide lpibt croiss service g txide lpop alimentpop eau, re
mfx compute, predict (pu0)

Does anyone know how to calculte such effects after a 'xtlgit, fe' ?
Thank you very much for your help.


From: <>
Sent: Friday, June 25, 2010 5:53 PM
To: <>
Subject: Marginal-effect calculations and prediction tests with xtlogit command


I'm trying to calculate marginal effects after the estimation of a FE logit model, and to obtain predictions... without success. I'm working on the economic determinants of conflict onset and duration in 10 African countries, therefore estimating with panel data, and performing tests on Stata 10.1. Below is my do file :

**Panel logit test on conflict onset/duration in African countries
log using Conflit, replace
set memory 18m
use ConflitAfrique
tsset pays temps, yearly
gen conflit1 = L.conflit
gen txaide = aide/pib
gen txaide3 = log(0.2*(L.txaide+L2.txaide+L3.txaide))
gen lpibt = log(pib/pop)
gen txpib = (pib-L.pib)/L.pib
gen croiss = L.txpib
gen txdette = dette/pib
gen txide = ide/pib
gen lpop = log(L.pop)
gen txaliment = (aliment-L.aliment)/L.aliment
gen txpop = (pop-L.pop)/L.pop
gen alimentpop = L.txaliment/L.txpop
gen leau = log(eau)
gen pibus3 = log(0.2*(L.pibus+L2.pibus+L3.pibus))
gen pibfr3 = log(0.2*(L.pibfr+L2.pibfr+L3.pibfr))

***Model of conflict onset
*Calculation of marginal effects
xtlogit conflit txaide lpibt croiss service g txide lpop alimentpop eau if conflit1==0, fe
mfx compute

/// RESULTS : default predict () is unsuitable for marginal-effect calculation r(119);

*Prediction Test
xtlogit conflit conflit1 txaide lpibt croiss service txide lpop alimentpop ethnie eau, fe
predict confestime

/// RESULTS : (option pc1 assumed; conditional probability for single outcome within group)
(20 missing values generated)
It seems to be working but I don't know how to display the results, as it is the case with the command 'lstat' after a logit estimation.

Thank you very much in advance for your help.

Best Regards


Dr Severine BLAISE
Senior Lecturer in economics
University of New-Caledonia
Department of Law-Economics-Business
B.P. R4
98 851 Noumea CEDEX
New Caledonia

Web :
Téléphone : (687) 26 69 31    Fax : (687) 26 69 30
« Think green : print this message only if necessary »

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index