伍德里奇计量经济学第四章

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

name:

log: /Users/wangjianying/Desktop/Chapter 4 Computer exercise.smcl log type: smcl

opened on: 25 Oct 2016, 22:20:41

1. do "/var/folders/qt/0wzmrhfd3rb93j2h5hhtcwqr0000gn/T//SD19456.000000"

2. ****************************Chapter 4***********************************

3. **C1

4. use "/Users/wangjianying/Documents/data of wooldridge/stata/VOTE1.DTA"

5. des

Contains data from /Users/wangjianying/Documents/data of wooldridge/stata/VOTE1.DTA obs: 173

vars: 10 25 Jun 1999 14:07

size: 4,498

storage display value

variable name type format label variable label

state str2 %9s state postal code

district byte %3.0f congressional district

democA byte %3.2f =1 if A is democrat

voteA byte %5.2f percent vote for A

expendA float %8.2f camp. expends. by A, $1000s

expendB float %8.2f camp. expends. by B, $1000s

prtystrA byte %5.2f % vote for president

lexpendA float %9.0g log(expendA)

lexpendB float %9.0g log(expendB)

shareA float %5.2f 100*(expendA/(expendA+expendB)) Sorted by:

6. reg voteA lexpendA lexpendB prtystrA

Source SS df MS Number of obs = 173

F( 3, 169) = 215.23 Model 38405.1096 3 12801.7032 Prob > F = 0.0000

Residual 10052.1389 169 59.480112 R-squared = 0.7926

Adj R-squared = 0.7889 Total 48457.2486 172 281.728189 Root MSE = 7.7123

voteA Coef. Std. Err. t P>|t| [95% Conf. Interval] lexpendA 6.083316 .38215 15.92 0.000 5.328914 6.837719 lexpendB -6.615417 .3788203 -17.46 0.000 -7.363246 -5.867588 prtystrA .1519574 .0620181 2.45 0.015 .0295274 .2743873 _cons 45.07893 3.926305 11.48 0.000 37.32801 52.82985

7. gen cha=lexpendB-lexpendA // variable cha is a new variable//

8. reg voteA lexpendA cha prtystrA

Source SS df MS Number of obs = 173

F( 3, 169) = 215.23 Model 38405.1097 3 12801.7032 Prob > F = 0.0000

Residual 10052.1388 169 59.4801115 R-squared = 0.7926

Adj R-squared = 0.7889 Total 48457.2486 172 281.728189 Root MSE = 7.7123 voteA Coef. Std. Err. t P>|t| [95% Conf. Interval]

lexpendA -.532101 .5330858 -1.00 0.320 -1.584466 .5202638

cha -6.615417 .3788203 -17.46 0.000 -7.363246 -5.867588

prtystrA .1519574 .0620181 2.45 0.015 .0295274 .2743873

_cons 45.07893 3.926305 11.48 0.000 37.32801 52.82985

9. clear

10.

11. **C3

12. use "/Users/wangjianying/Documents/data of wooldridge/stata/hprice1.dta"

13. des

Contains data from /Users/wangjianying/Documents/data of wooldridge/stata/hprice1.dta obs: 88

vars: 10 17 Mar 2002 12:21

size: 2,816

storage display value

variable name type format label variable label

price float %9.0g house price, $1000s

assess float %9.0g assessed value, $1000s

bdrms byte %9.0g number of bdrms

lotsize float %9.0g size of lot in square feet

sqrft int %9.0g size of house in square feet

colonial byte %9.0g =1 if home is colonial style

lprice float %9.0g log(price)

lassess float %9.0g log(assess

llotsize float %9.0g log(lotsize)

lsqrft float %9.0g log(sqrft)

Sorted by:

14. reg lprice sqrft bdrms

Source SS df MS Number of obs = 88

F( 2, 85) = 60.73 Model 4.71671468 2 2.35835734 Prob > F = 0.0000

Residual 3.30088884 85 .038833986 R-squared = 0.5883

Adj R-squared = 0.5786 Total 8.01760352 87 .092156362 Root MSE = .19706 lprice Coef. Std. Err. t P>|t| [95% Conf. Interval]

sqrft .0003794 .0000432 8.78 0.000 .0002935 .0004654

bdrms .0288844 .0296433 0.97 0.333 -.0300543 .0878232

相关文档
最新文档