代码与数据在作者主页可以免费下载(
https://homepage.ntu.edu.tw/~wangh/book-software.html),具体方法如下。
Stata programs for the Book
I wrote many of the Stata commands used in the book. You may install these command files (*.ado), demo files (*.do), and demo dataset (*.dta) by following instructions on this page which is on a Google site. If you cannot access the Google site (for whatever reason), here is a short instruction.
1. Copy and paste one of the following lines (in one line) to Stata's Command window and execute it.
To download the package from the Google server:
net install sfbook_install, from(
https://sites.google.com/site/sfbook2014/home/install/) replace
To download the package from the server at National Taiwan University:
net install sfbook_install, from(
http://homepage.ntu.edu.tw/~wangh/sfbook/) replace
2. Execute the following command in Stata.
sfbook_install
It will install the programs (*.ado files) to Stata's PLUS directory, and copy the demo files (*.do, *.dta) to c:\sfbook_demo for Windows and /users/`c(username)'/sfbook_demo for Mac.
3. After the programs are installed, you may use help sfbook to see a short description on the installed Stata commands.