Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: predicting fitted values after ivtobit


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: predicting fitted values after ivtobit
Date   Mon, 4 Feb 2008 16:53:30 +0000 (GMT)

--- Alejandro Delafuente <[email protected]> wrote:
> Am trying to show graphically the relationship between a score index 
> (X - independent variable) and remittance levels (Y - dependent
> variable) estimated with an ivtobit model.
> 
> Thus far, after running the ivtobit model I predict marginal effects
> as follows:
> mfx compute, at(mean X = numerical value)
> 
> As part of the above computation Stata displays the (predicted)
> fitted values for Y. I repeat the above command across a full range
> of different levels of the score index, leaving the rest of 
> independent variables fixed at their mean, to obtain predicted values
> of remittances and then manually plot the estimated values against
> the different levels of the score index.
>  
> That said, I have two questions:
> Is this the right way to predict expected levels of remittances,
> considering that am doing some left censoring at zero? In other
> words, am I using the corrected 'fitted values' command?

With Tobit like commands there are multiple types of predicted values
possible, all of them are correct. What can be incorrect is your
interpretation. Given that you are dealing with remittance I assume
that your variable is censored at zero, and you are interested in the
actual value of the remittance (which is either 0 or positive) and not
in the latent remittance (which can be negative, 0, or positive) nor in
the probability of remittance. Your command gives you the latent
remittance.

> Is there any graphic option that would allow Stata do this for me
> more directly (i.e, to use an overlayed picture of the scatter of
> actual observations and then the fitted values above it), although my
> score index has many values 

I would use -predict- after replacing the variables you want to keep
constant by their mean. See the example below:

*---------------- begin example ------------------------
sysuse auto, clear

// weight and length are measured in too small units,
// making the regression coefficients too small to be
// easily interpretable, moreover as I am a real 
// European I am used to the metric system ;-)

// transform weight in metric tonnes
replace weight = weight/2204.62262 
label variable weight "Weight (tonnes)"

// transform lenth in meters
replace length = length/39.3700787 
label variable length "Length (meters)"

// transform miles per gallon in kilometers per litre
replace mpg = mpg/2.35214584 
label variable mpg "kilometers per litre"

// For illustration purposes the mpg is asumed to 
// censored at 7.5 km/litre
replace mpg = 7.5 if mpg <= 7.5

tobit mpg weight length foreign, ll(7.5)

sum length if e(sample)
gen length_temp = length
replace length = r(mean)

gen foreign_temp = foreign
replace foreign = 0

predict ystar_dom, ystar(7.5,.)

replace foreign = 1

predict ystar_for, ystar(7.5,.)

replace foreign = foreign_temp
replace length = length_temp
drop foreign_tem length_temp

twoway scatter mpg weight if foreign == 0 || ///
       scatter mpg weight if foreign == 1,   ///
   msymbol(x) ||                             ///
       line ystar* weight, sort              ///
   lpattern(shortdash longdash)              ///
   ytitle("km per litre")                    ///
   note("predicted values are computed"      /// 
        "using mean values for length")      ///
   legend(order(1 "domestic"                 ///
                2 "foreign"                  ///
                - " " "predicted values"     ///
                3 "domestic"                 ///
                4 "foreign" ))
*--------------- end example --------------------------
(For more on how to use examples I sent to the Statalist, see
http://home.fsw.vu.nl/m.buis/stata/exampleFAQ.html )

Hope this helps,
Maarten

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      __________________________________________________________
Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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