[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: AW: help with margins syntax

From   "Martin Weiss" <>
To   <>
Subject   st: AW: help with margins syntax
Date   Wed, 4 Nov 2009 22:00:58 +0100


Are you planning to reuse "scale" anywhere else? If not, your code could
just be

summ phi if x==1, mean
gen effect = _b[x]*r(mean)

BTW, where does the "_result" syntax come from? Even -hsearch _result-
struggles to come up with any good matches. This code does still work under
Stata 11, even without changing the -version-:

sysuse auto, clear
su mp
di _result(3)


-----Ursprüngliche Nachricht-----
[] Im Auftrag von Sergio I Prada
Gesendet: Mittwoch, 4. November 2009 21:32
Betreff: st: help with margins syntax

Sorry, here a correction on the code

x is binary and it is the variable of interest in a causal model

tobit y x a b, ll(0)
predict phi, pr(0,.)
summ phi if x==1
scalar define scale = _result(3)
gen effect = _b[x]*scale


*   For searches and help try:

*   For searches and help try:

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