Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: graphing predicted probabilities of tobit model

From   "Pagan, jose" <>
To   <>
Subject   st: graphing predicted probabilities of tobit model
Date   Tue, 23 Sep 2003 11:08:37 -0400

Hi all, I wanted to graph the predicted probabilities and confidence
intervals of a dependent variable named "scale" for different values of
two independent variables: "hmo" and "ppo". The model includes hmo
squared, ppo squared and an interaction term of the two. The following
commands work when it comes to graphing the predicted probabilities over
the 0.1 to 0.6 range of the hmo and ppo variables. However, I want to
know how to plot the CI's. praccum reports everything but I don't know
how to save the CI's and plot them. Any suggestions? Any suggestions on
how to plot marginal effects? Thanks, Jose Pagan. 

tobit scale [[set of X's]] hmo hmo2 ppo ppo2 hmoppo, ul(1)

capture matrix drop mage
forvalues count = 0.1(0.1)0.6 {
    local countsq = `count'*`count'
    local countppo = `count'*ppo
    prvalue, x(hmo `count' hmo2 `countsq' hmoppo `countppo') rest(mean)
    praccum, using(mage) xis(`count')
praccum, using(mage) gen(hmsq)

scatter hmsqxb hmsqx || qfit hmsqxb hmsqx

capture matrix drop ppoe
forvalues pcount = 0.1(0.1)0.6 {
    local pcountsq = `pcount'*`pcount'
    local pcounthmo = `pcount'*hmo
    prvalue, x(ppo `pcount' ppo2 `pcountsq' hmoppo `pcounthmo')
rest(mean) brief
    praccum, using(ppoe) xis(`pcount')
praccum, using(ppoe) gen(pposq)

scatter pposqxb pposqx || qfit pposqxb pposqx

*   For searches and help try:

© Copyright 1996–2022 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index