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: Query about finding predicted change in probability after logit for changing two variables
From
Urmi Bhattacharya <[email protected]>
To
[email protected]
Subject
st: Query about finding predicted change in probability after logit for changing two variables
Date
Thu, 9 Jun 2011 10:47:20 -0400
Dear Statalisters,
I am running a logit with multiple factor variables as well as
continuous variables.
I am interested in finding the estimated predicted change in the
probability with changing two dummy variables along with the standard
errors and the p values. This was done by Thomas DeLeire (The wage
and Employment effects of The Americans with disabilities act),
Journal Of Human Resources, 2001.
I am explaining it using an example.
sysuse auto, clear
drop if rep78==.
tab rep78
/***generating dummies for category of rep78****/
generate cqual_low=1
replace cqual_low=0 if rep78 >2
generate cqual_medium=1
replace cqual_medium=0 if (rep78 == 1) | (rep78 == 2)| (rep78 == 5)
generate cqual_high=1
replace cqual_high=0 if (rep78 == 1) | (rep78 == 2)| (rep78 == 3)| (rep78 == 4)
/***generating dummies for high turn and low turn*/
generate turn_low=1
replace turn_low=0 if turn >35
generate turn_high=0
replace turn_high=1 if turn >35
/******i run the logit****/
logit foreign i.cqual_high i.cqual_medium i.turn_high headroom mpg trunk
/*******now i want to find what is the predicted change in the
probability of foreign for those cars with cqual_high=1 with
turn_high=1 from those with cqual_medium=1 and turn_low=1 */
generate xb1= _b[_cons ] +_b[1.cqual_high ] +_b[1.turn_high
]+_b[headroom ]*headroom +_b[mpg]*mpg +_b[trunk]*trunk
generate xb2= _b[_cons ] +_b[1.cqual_medium] +_b[headroom ]*headroom
+_b[mpg]*mpg +_b[trunk]*trunk
predictnl pred_change = (1+exp((-1)*xb1))^-1 - (1+exp((-1)*xb2))^-1
Doing this I get the predicted change for each observation. However,
the paper just presents one estimate and the standard error for the
predicted changes in probabilities.
1.Does this imply that I have to consider the predicted changes at
means of other variables? In that case, how do I get that with the
standard errors and p values?
2.Or does this mean, I have to ignore all other variables while
calculating the predicted probabilities? This however makes little
sense to me.
3. Do I take an average of the predicted changes and then find the
standard errors and p values of it.
Going through the paper, I could not figure out which of the above
three was used.
Any help would be greatly appreciated.
Best
Urmi Bhattacharya
*
* 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/