use “https://stats.idre.ucla.edu/stat/stata/examples/greene/TBL5-1.DTA”, clear rename x1 age rename x2 income rename x3 exp rename x4 ownrent rename x5 selfemp generate incomesq = income^2 drop if exp==0 save chapter12 Table 12.1, page…
Read More
Search Results for: stata
Econometric Analysis, Fourth Edition by William Greene Selected Portions of Chapter 14: Models for Panel Data | Stata Textbook Examples
use https://stats.idre.ucla.edu/stat/stata/examples/greene/table14_1, clear generate logc = log(c) generate logq = log(q) generate logf = log(pf) save table14-1 Table 14.1, page 566, No effects. regress logc logq logf lf Source |…
Read More
Econometric Analysis by William Greene Selected Portions of Chapter 15 Systems of Regression Equations | Stata Textbook Examples
use TBL15-1, clear Table 15.1, page 598, Least squares, OLS Standard errors. regress i f c Source | SS df MS Number of obs = 100 ————-+—————————— F( 2, 97)…
Read More
Econometric Analysis, Fourth Edition by William Greene Selected Portions of Chapter 16: Simultaneous-Equations Models | Stata Textbook Examples
use “https://stats.idre.ucla.edu/stat/stata/examples/greene/TBL16-2.DTA”, clear generate w = wg+wp generate k = k1+i generate yr=year-1931 generate p1 = p[_n-1] generate x1 = x[_n-1] save table16-2 Table 16.4, OLS, page 687. regress c…
Read More
Econometric Analysis, Fourth Edition by William Greene Chapter 19: Models with Discrete Dependent Variables | Stata Textbook Examples
use “https://stats.idre.ucla.edu/stat/stata/examples/greene/TBL19-1.DTA”, clear Example 19.1 on page 816. The column for linear regression of Table 19.1 is obtained using a least square regression model. regress grade gpa tuce psi Source…
Read More
An Introduction to Categorical Analysis by Alan Agresti Chapter 2: Two-Way Contingency Tables | Stata Textbook Examples
Table 2.1, page 17. use https://stats.idre.ucla.edu/stat/stata/examples/icda/afterlife, clear list +————————–+ | gender aftlife freq | |————————–| 1. | females yes 435 | 2. | females no 147 | 3. | male…
Read More
An Introduction to Categorical Analysis by Alan Agresti Chapter 3: Three-Way Contingency Tables | Stata Textbook Examples
Table 3.1, page 54. The command tab3way can be downloaded from the internet by typing search tab3way in the command line (see How can I use the search command to…
Read More
An Introduction to Categorical Analysis by Alan Agresti Chapter 4: Generalized Linear Models | Stata Textbook Examples
Table 4.1, page 75. use https://stats.idre.ucla.edu/stat/stata/examples/icda/snoring, clear tab snoring heart [fw=count], row +—————-+ | Key | |—————-| | frequency | | row percentage | +—————-+ | heart snoring | 0…
Read More
An Introduction to Categorical Analysis by Alan Agresti Chapter 5: Logistic Regression | Stata Textbook Examples
This chapter makes extensive use of the fitstat program, which is not part of base Stata. Prior to using the fitstat command, they need to be downloaded by typing search…
Read More
An Introduction to Categorical Analysis by Alan Agresti Chapter 6: Loglinear Models for Contingency Tables | Stata Textbook Examples
This unit makes extensive use of the ipf (iterated proportional fitting) command written by Adrian Mander. Use search ipf in Stata to locate the command (see How can I use…
Read More
