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

From |
Alejandro Delafuente <alejandro.delafuente@sant.ox.ac.uk> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: predicting fitted values after ivtobit |

Date |
Mon, 04 Feb 2008 23:10:00 +0000 |

Many thanks Maarten, you are quite right my interpretation is incorrect b/c while am getting latent remittances (for which indeed am obtaining negative values), my intention is to go after the predicted values of remittance. That's why I would still want to check the correct way to get the later. I wonder if the program that you send me can be adapted it in the following way: ivtobit remittance hhsize head_age etc (score_index = instruments), ll(0) first gen z = score_index replace score_index = .2 predict newvarA, e(0,.) // this would leave the rest of variables // automatically set to their mean sum newvarA replace score_index = z drop z gen z = score_index replace score_index = .4 predict newvarB, e(0,.) sum newvarB and so on...and then plot the mean values of predicted remittances obtained for the different scores (newvarA, newvarB, etc) against the range of such values. Would this make sense? Alejandro In message <174964.11976.qm@web25012.mail.ukl.yahoo.com> statalist@hsphsun2.harvard.edu writes: > --- Alejandro Delafuente <alejandro.delafuente@sant.ox.ac.uk> 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/ -- Alejandro de la Fuente Department of International Development/QEH University of Oxford, Mansfield Road, Oxford OX1 3TB Tel: 01865 281836 * * 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/

**Follow-Ups**:**Re: st: predicting fitted values after ivtobit***From:*Maarten buis <maartenbuis@yahoo.co.uk>

**References**:**st: predicting fitted values after ivtobit***From:*Alejandro Delafuente <alejandro.delafuente@sant.ox.ac.uk>

**Re: st: predicting fitted values after ivtobit***From:*Maarten buis <maartenbuis@yahoo.co.uk>

- Prev by Date:
**Re: st: Wald test limit?** - Next by Date:
**Re: st: predicting fitted values after ivtobit** - Previous by thread:
**Re: st: predicting fitted values after ivtobit** - Next by thread:
**Re: st: predicting fitted values after ivtobit** - Index(es):

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