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]
st: Marginal effect of interaction (continuos) variable in multinomial logit model
From
Ana García <[email protected]>
To
[email protected]
Subject
st: Marginal effect of interaction (continuos) variable in multinomial logit model
Date
Mon, 13 Aug 2012 14:44:24 +0200
Dear all,
I’m estimating a multinomial logit regression with one interaction
term (X4*X5). In particular, I’m modeling the probability that a
search behavior is either null, exploitative, explorative or both . So
my dependent variable Y has four categories (1,2,3 and 4
respectively). Following the article of Wiersema and Bowen (2009) from
the Strategic Management Journal, a true interaction effect is
calculated as the cross-derivative of this probability, first with
respect to X4 and then with respect to X5. Until this moment I have
run the model and calculated the marginal effect of X4 , however I am
struggling to calculate the effect of X5 on the marginal effect of X4.
Prior posts address related issues
statalist/archive/2007-2009/msg00505, however in this case the
interacted variables are dummy*continuous and in my case X4 and X5 are
both continuous variables. Commands look like this:
gen X4X5=X4*X5
mlogit Y X4 X5 X4X5 X1 X2 X3, base(1)
sum X1 if e(sample)
scalar mX1 = r(mean)
sum X2 if e(sample)
scalar mX2 = r(mean)
sum X3 if e(sample)
scalar mX3 = r(mean)
sum X4 if e(sample)
scalar mX4 = r(mean)
sum X5 if e(sample)
scalar mX5 = r(mean)
local expvb2 exp([2]_cons + [2]X4*scalar(mX4)+ [2]X5*scalar(mX5)+
[2]X4X5*scalar(mX4)*scalar(mX5)+[2]X1*scalar(mX1) + [2]X2*scalar(mX2)
+ [2]X3*scalar(mX3))
local expvb3 exp([3]_cons + [3]X4*scalar(mX4)+ [3]X5*scalar(mX5)+
[3]X4X5*scalar(mX4)*scalar(mX5)+[3]X1*scalar(mX1) + [3]X2*scalar(mX2)
+ [3]X3*scalar(mX3))
local expvb4 exp([4]_cons + [4]X4*scalar(mX4)+ [4]X5*scalar(mX5)+
[4]X4X5*scalar(mX4)*scalar(mX5)+[4]X1*scalar(mX1) + [4]X2*scalar(mX2)
+ [4]X3*scalar(mX3))
local p1 1/(1 + `expvb2' +`expvb3' + `expvb4')
local p2 `expvb2'/(1 + `expvb2' + `expvb3' + `expvb4')
local p3 `expvb3'/(1 + `expvb2' + `expvb3' + `expvb4')
local p4 `expvb4'/(1 + `expvb2' + `expvb3' + `expvb4')
*Marginal effect of X4 on the probability of falling in categories 1,2,3 and 4
nlcom Dp1DX4: `p1'*([1]X4 + [1]X4X5*X5-(`p2'*[2]X4 + `p3'*[3]X4 + `p4'*[4]X4)
nlcom Dp2DX4: `p2'*([2]X4 + [2]X4X5*X5 -(`p2'*[2]X4 + `p3'*[3]X4 + `p4'*[4]X4))
nlcom Dp3DX4: `p3'*([3]X4 + [3]X4X5*X5 -(`p2'*[2]X4 + `p3'*[3]X4 + `p4'*[4]X4))
nlcom Dp4DX4: `p4'*([4]X4 + [4]X4X5*X5 -(`p2'*[2]X4 + `p3'*[3]X4 + `p4'*[4]X4))
* Effect of X5 on the marginal effect of X4???
And now, is when I get stuck..
Thank you very much for your time. Any comments can be very helpful!
Ana García Granero, PhD student
INGENIO (CSIC-UPV)
Universidad Politécnica de Valencia - Camino de Vera s/n
Ciudad Politécnica de la Innovación - Edificio 8E 4ª Planta
46022 - Valencia
Spain
*
* 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/