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]
Re: st: AW: Marginal-effect calculations after 'xtlogit, fe' ?
From
<[email protected]>
To
<[email protected]>
Subject
Re: st: AW: Marginal-effect calculations after 'xtlogit, fe' ?
Date
Wed, 30 Jun 2010 13:55:00 +1100
Dear Martin,
Thank you very much for your help.
I tried what is explained in the FAQ, but it yields only "zeros" :
do "C:\Users\toshiba\AppData\Local\Temp\STD00000000.tmp"
. xtlogit conflit txaide3 lpibt croiss service g txide lpop alimentpop eau,
fe
note: multiple positive outcomes within groups encountered.
Iteration 0: log likelihood = -165.51068
Iteration 1: log likelihood = -127.98929
Iteration 2: log likelihood = -126.88193
Iteration 3: log likelihood = -126.87524
Iteration 4: log likelihood = -126.87524
Conditional fixed-effects logistic regression Number of obs =
360
Group variable: pays Number of groups =
10
Obs per group: min =
36
avg =
36.0
max =
36
LR chi2(9) =
122.33
Log likelihood = -126.87524 Prob > chi2 =
0.0000
------------------------------------------------------------------------------
conflit | Coef. Std. Err. z P>|z| [95% Conf.
Interval]
-------------+----------------------------------------------------------------
txaide3 | -1.212498 .2253871 -5.38
0.000 -1.654249 -.7707475
lpibt | -1.229698 .5646258 -2.18
0.029 -2.336344 -.1230516
croiss | -2.28158 2.029903 -1.12 0.261 -6.260117
1.696956
service | .0166021 .0122666 1.35 0.176 -.0074399
.0406442
g | .0015161 .0426346 0.04 0.972 -.0820461
.0850784
txide | -2.193685 1.484768 -1.48 0.140 -5.103776
.7164069
lpop | 4.573573 .7922887 5.77 0.000 3.020716
6.126431
alimentpop | .0025782 .0051149 0.50 0.614 -.0074468 .0126032
eau | -.0000184 .0000274 -0.67 0.503 -.0000722
.0000354
------------------------------------------------------------------------------
. mfx, predict(pu0)
Marginal effects after xtlogit
y = Pr(conflit|fixed effect is 0) (predict, pu0)
= 1
------------------------------------------------------------------------------
variable | dy/dx Std. Err. z P>|z| [ 95% C.I. ] X
---------+--------------------------------------------------------------------
txaide3 | 0 0 . . 0
0 -2.52182
lpibt | 0 0 . . 0 0
5.8511
croiss | 0 0 . . 0 0
.025926
service | 0 0 . . 0 0
13.6778
g | 0 0 . . 0 0
14.6361
txide | 0 0 . . 0 0
.039854
lpop | 0 0 . . 0 0
16.2463
alimenp | 0 0 . . 0 0
3.78527
eau | 0 0 . . 0 0
21741.9
------------------------------------------------------------------------------
.
end of do-file
Do you have any idea of what is wrong ?
Thank you again.
Best regards,
Severine
--------------------------------------------------
From: "Martin Weiss" <[email protected]>
Sent: Wednesday, June 30, 2010 1:18 AM
To: <[email protected]>
Subject: st: AW: Marginal-effect calculations after 'xtlogit, fe' ?
<>
" xtlogit, conflit txaide lpibt croiss service g txide lpop alimentpop
eau,
re"
That first comma after -xtlogit- would make Stata think that "conflit" et
al. are options, and it would finally choke on "re"...
-h xtlogit postestimation- shows you what is available. Stata`s refusals
are
always grounded in proper theory in my experience, so sneaking your way
around them might be hazardous...
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von
[email protected]
Gesendet: Dienstag, 29. Juni 2010 14:10
An: [email protected]
Betreff: st: Marginal-effect calculations after 'xtlogit, fe' ?
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.
Séverine
--------------------------------------------------
From: <[email protected]>
Sent: Friday, June 25, 2010 5:53 PM
To: <[email protected]>
Subject: Marginal-effect calculations and prediction tests with xtlogit
command
Hello,
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
Severine
****
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 : http://www.severine-blaise.com/
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:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/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/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/statalist/faq
* http://www.ats.ucla.edu/stat/stata/