Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tobit Regression How to run a Tobit in STATA and its post-estimation commands.

Similar presentations


Presentation on theme: "Tobit Regression How to run a Tobit in STATA and its post-estimation commands."— Presentation transcript:

1 Tobit Regression How to run a Tobit in STATA and its post-estimation commands

2 Get your Tobit Running In STATA, type “version 8.0,” then hit enter Run your Tobit with dependent and independent variables Then proceed to type “dtobit” for margins without typing any dependent or independent variables

3 Tobit Regression in STATA Syntax of the command tobit depvar indepvars, ll (#) ul (#) opt Where ll (#) is the left-censoring limit Where ul (3) is the right-censoring limit You must specify at least one of ll (#) or ul (#) for the tobit to run

4

5 Factor or Categorical Variables Independent variables may contain factor variables Factor variables create indicator variables from categorical variables Possible syntaxes: i.varname i.varname#i.varname i.varname#i.varname#i.varname i.varname##i.varname i.varname##i.varname##i.varname Where # and ##, pronounced cross and factorial cross, are operators for use with pairs of variables, mainly used for interaction effects

6 Examples i.group indicators for levels of group i.group#i.sex indicators for each combination of levels of group and sex, a two-way interaction group#sex same as i.group#i.sex group#sex#arm indicators for each combination of levels of group, sex, and arm, a three-way interaction group##sex same as i.group i.sex group#sex group##sex##arm same as i.group i.sex i.arm group#sex group#arm sex#arm group#sex#arm sex#c.age two variables—age for males and 0 elsewhere, and age for females and 0 elsewhere; if age is also in the model, one of the two virtual variables will be treated as a base sex##c.age same as i.sex age sex#c.age c.age same as age c.age#c.age age squared c.age#c.age#c.age age cubed

7 Factor Variable Operators Operator Description i. unary operator to specify indicators c. unary operator to treat as continuous variable o. unary operator to omit a variable or indicator # binary operator to specify interactions ## binary operator to specify full-factorial interactions Example: regress y i.sex i.group sex#group age sex#c.age

8 Useful YouTube Tutorials Introduction to Factor Variables, Part 1 https://www.youtube.com/watch?v=Wa1Nd9epHmY\ Introduction to Factor Variables, Part 2 https://www.youtube.com/watch?v=f-tLLX8v11c Interaction Effects https://www.youtube.com/watch?v=9vR9n35aX5k

9 Margins: Post-estimation commands Run the margins command after running the Tobit regression. The margin commands available in STATA are: margins marginal means, predictive margins, marginal effects, and average marginal effects marginsplot graph the results from margins (profile plots, interaction plots, etc.)

10 Margins for Dummies Variables Syntax margins i.sex i.group i.sex#i.group margins sex group sex#i.group margins sex##group

11 Margins for Continuous Variables Syntax margins, at (name of continuous variable=level) Ex. To estimate the means of the marginal effects on the expected value of the censored outcome, conditional on weight being each of three values (2,000; 3,000; and 4,000 pounds), type margins, dydx(wgt) predict(ystar(17,24)) at(wgt=(2 3 4))

12


Download ppt "Tobit Regression How to run a Tobit in STATA and its post-estimation commands."

Similar presentations


Ads by Google