Il 0% ha trovato utile questo documento (0 voti)
180 visualizzazioni111 pagine

Kolenikov S.O. Prikladnoj E#konometricheskij Analiz V Pakete Stata (RE#Sh, 2000) (Ru) (111s) - GL

Il documento descrive l'analisi economica applicata utilizzando il pacchetto statistico Stata. Introduce i modelli di regressione lineare e discute le ipotesi e i test statistici associati. Descrive inoltre le specifiche del pacchetto Stata e fornisce esempi di comandi.

Caricato da

remix001
Copyright
© © All Rights Reserved
Per noi i diritti sui contenuti sono una cosa seria. Se sospetti che questo contenuto sia tuo, rivendicalo qui.
Formati disponibili
Scarica in formato PDF, TXT o leggi online su Scribd
Il 0% ha trovato utile questo documento (0 voti)
180 visualizzazioni111 pagine

Kolenikov S.O. Prikladnoj E#konometricheskij Analiz V Pakete Stata (RE#Sh, 2000) (Ru) (111s) - GL

Il documento descrive l'analisi economica applicata utilizzando il pacchetto statistico Stata. Introduce i modelli di regressione lineare e discute le ipotesi e i test statistici associati. Descrive inoltre le specifiche del pacchetto Stata e fornisce esempi di comandi.

Caricato da

remix001
Copyright
© © All Rights Reserved
Per noi i diritti sui contenuti sono una cosa seria. Se sospetti che questo contenuto sia tuo, rivendicalo qui.
Formati disponibili
Scarica in formato PDF, TXT o leggi online su Scribd
Sei sulla pagina 1/ 111

Stata

E-mail: [email protected]

, 2000
c

. .

In theory, theory and practice are the same. In practice, they are not.
,  ,
.

(
/ ...)

2.1

7
11


. . . . . . . . . . . . . . . . . . . . . . . .

2.2

2.3

2.4

11


. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15

2.2.1

. . . . . . . . . . . . . . . . . . . . .

15

2.2.2

. . . . . . . . . . . . . . . . . . . . .

17

2.2.3

. . . . . . . . . . . . . . . . . . .

18


. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

2.3.1

. . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

2.3.2

. . . . . . . . . . . . . . . . . . . . . .

20

2.3.3

. . . . . . . . . . . . . . . . . . . . .

22

2.3.4

. . . . . . . . . . . . . . . . . . . .

25

2.3.5

. . . . . . . . . . . . . . . . . . . . . . . . .

26

2.3.6

* . . . . . . . . . . . . . . . . . . . . . . . .

30

2.3.7

. . . . . . . . . . .

33

. . . . . . . . . . . . . . . . . . . . . . . . .

34

2.4.1

: . . . . . . . . .

34

2.4.2

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

37

2.4.3

. . . . . . . . .

38

2.4.4

. . . . . . . . . . . . . . . . . . . . . . . . . . .

42

2.5

2.6

2.4.5

. . . . . . . . . . . . . . . . . . .

45

2.4.6

. . . . . . . . . . . . . . . . . . . . . . . . . .

46

. . . . . . . . . . . . . . . . . . . . . . . . . . . . .

50

2.5.1

. . . . . . . . . . . . . . . . . . . . . .

51

2.5.2

. . . . . . . . . . . . . . . . . . . . . . .

54


. . . . . . . . . . . . . . . . . . . . . . . . . .

59

2.6.1

. . . . . . . . . . .

60

2.6.2

. . . . . . . . . . . . . . . . . .

62

2.6.3


. . . . . . . . . . . . . .

62

2.6.4

. . . . . . . . . . . . . . . . . . . . . . . . .

65

2.6.5

. . . . . . . . . . . . . . . . . . . . .

66

Stata

70

3.1

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

71

3.2

Stata . . . . . . . . . . . . . . . . . . . . . . . .

72

3.3

Stata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

73

3.4

Stata . . . . . . . . . . . . . . . . . . . . . . . . . . . .

75

3.5

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

76

3.6

. . . . . . . . . . . . . . . . . . . . . . . . . . . .

77

3.7

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

77

3.8

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

79

3.9

. . . . . . . . . . . . . . . . . . . . . .

82

3.10

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

85

3.11 . . . . . . . . . . . . . . . . . . . . . . . . . . . .

85

3.12

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

86

3.13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

87

3.14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

90

3.15 . . . . . . . . . . . . . . . . . . . . . . . . . . .

92

3.16 Internet- Stata . . . . . . . . . . . . . . . . . . . . . . . . . . .

93

3.17 Stata . . . . . . . . . . . . . . . . . . . . . . . .

95

3.18 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

96

3.19 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

98

3.20 ? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

99

101

106

107

110

 , 2000 .
()


( http://www.nes.ru/english/outreach/outreach.htm ).

. , , ,
, , . ,
.
:
,
1 .
Stata (StataCorp. 1999, 2001, Kolenikov forthcoming).
.
1 , ,
(1997); , (1998).

, , . , (RLMS).
, , . ,
( http://www.cpc.unc.edu/rlms/ ).
Stata

, Stata,
, . , . Stata . Help/Search
Help/Command whelp , , whelp

regress . , ,  .

 ( ), , , , , . ,
, , , , , (,
), .
. 2
, ,
. 3 Stata , . 4
RLMS  . 5
. , , 6 ,
. .
. , , . 3, ,
, 8

2.32.4, . 52, ,
, . 2.6, , . ,
, , , .
,
Stata.
, , ,  , 3.
, , ,
,
.
3.1.
 Stata ( 3.33.6).
Stata ( , , , , ). ( ),
, 3.9 (. 83). 3.20
Stata.
-, ,
, , RLMS 
.
,
, , . :
,
, ,
, , , ,
,
.
, , 9

: ,
, , ;
,
- , ;
, - , ; ,
; TEX;
; Stata Corporation ; , Paragon
.
  
 , N HBC 807, 808.
21 2000 .   Stata.
, . ,
, 
( 32 ), ;
("" ) SMCL (Stata Markup and Control Language),
(HTML, SGML); (-)
, .. ( ..); ; ; ,
.

http://www.stata.com/stata7

, , , , , ( ), 1999-2001.
E-mail:

[email protected], [email protected], [email protected]

10

2

2.1

,
,
.

 , , . .
, ,
1 :
1. , .
(datadriven research). ( .
) ,
()
, 1
, (1998, . 10.)

11

, . . 
.
2. ,
1990- . data mining (
 ,
).
, , , - .
(patterns).
. Data mining
,
.
3. . , .
,  , , ,
,
. .
( , () , ), . . .
(. . ) , , ; ,
, ,
, (proxy)
4. proxy (,
,
12

 , , , .. 
). , , ,
, .
,  , , , 

, , ..
5. . ,
- .
, ,
. ,  , ,
: , ,
, , , ,
..
(ARMA ).
()
.
. ,
,
, .
 publication bias (
), , ,
, ,
. - 
, 13

,
.
6. . () ,
.
; ,
. (, ,
) ,
(goodness of fit), (), ,
(.. ,
).
 ,
goodness of fit
(cross-validation).

. : . Data mining . ,
. (out of sample
prediction).
, , .. ,  .
 -

, .
14

10%, 5% 1%. (,
1973): " [ ]
".
 () ( ,
) , . ,
H0
.
, , ()
.

2.2

2.2.1

, 
,
. (1984):

E[y|x] = f (x).

(2.1)

, -

(, )
() . ,

. -

15

yi = xTi + i ,

(2.2)

i = 1, . . . , n

yi  , xi  , xi IRp , 
, i  , i  n  .
, (2.2) :
(2.3)

y = XT + ,

y = (y1 , . . . , yN )T , = (1 , . . . , N )T , X , xi , i = 1, . . . , n, 
Xj , j

x11

x21
X =
..
.

= 1, . . . , p:
x12 . . .

x1p

x22 . . .
..
..
.
.

x2p
..
.

xn1 xn2 . . .

xnp

2
=

..

n
(2.4)

= (X1 , X2 , . . . , Xp )

, xi1 = 1, 1  , .
, (2.2) ( (2.3)), ( ) :

Ei = 0

(2.5)

E2i = 2

(2.6)

Ei j = 0 i 6= j

(2.7)

rk X = p < n

(2.8)

Xj

(2.9)

i N (0, 2 )
16

(2.10)

2.2.2

(, , , )
:

= arg min

N
X

yi xTi

i=1

2

(2.11)


(. OLS, ordinary least squares),

= (XT X)1 XT y

(2.12)

(fitted values) yi = xT (residuals) ei = yi yi , i = 1, . . . , n.


i

Stata

Stata, ,
regress . regress
(. ), , , . ., predict

 , ,  , : predict . . . , residuals , predict, . . . xb  y . . regress -

tutorial regress .

-:
2.1 (, )

(2.2)(2.9), (2.10).
, - 2 ,

Var = 2 (XT X)1

(2.13)

2 :

A > B,

(A B)

17

2:
n

1 X 2
s =
e,
n p i=1 i

(2.14)

d = s2 (XT X)1
Var

(2.15)

(, , ,
, )  , . ,
- , (2.10).
, .

2.2.3

.
,

.
, ..

H0 : C = r

vs. Ha : C 6= r,

(2.16)

C  qp ( rk C = q < p), r  q1.


, H0 q .
H0 : 2 = . . . = p = 0, ,
(.. ,  , y = y).
C = Ip1 , r = 0, q = p 1.
F -:

F =

(SSER SSEU )/q


(C r)T (C(XT X)1 C T )1 (C r)/q
=
,
SSEU /(n p)
SSEU /(n p)
18

(2.17)

SSER =sum of squared errors of the restricted model 


(.. , H0 ), SSEU =sum of squared errors
of the unrestricted model  .
F - () F (q, n p).
H0 :

k = k vs. Ha : k 6= k t- 3
(0)

(0)

tk =

(0)
k k
t(n p)|H0 ,
d k )1/2
Var(

(2.18)

H0 n p , d k )  (2.15).
Var(

, H0 ,

F - t- .
H0 . ,
( , ):

H0 : k = 0 vs. Ha : k 6= 0,

(2.19)

() (  observed significance, p-value)


i
h

P |k | > |k | H0 .

(2.20)

(, 10%) ,
,
, , H0
. , 1% , , ,
.
3 t-

F -

19

t2 (n p) = F (1, n p)

Stata

Stata test ,
( regress ; . 3.9).

2.3

( ) . ,
, , -,
-.
, 2.1.

2.3.1

(2.5), , ,
( ) ( ).

.

2.3.2

(2.9) ,
, , ( ).
, , .. , (2.5)(2.7) x.
,
(2.7) 4 . 4 , .
, (, , -

20

(2.8)
XT X:

1
plim XT X = M > 0pp
n n

(2.21)

 ,

E[|x] 6= 0

(2.22)

,  (measurement error models), , (simultaneous equations,


. 2.6.2).
, (2.22) - (. . ).
, (. IV, instrumental variables): (), , ,
X ( ). (. 2SLS,
two-stage least squares). IV- ,
. (generalized method of
moments  GMM, (Greene 1997, Matyas 1999), 2
(Neyman, Pearson 1928)) , IV-,
.

, , , ,  -

. (Hausman 1978).
-, IV-
), , .
. , (1998, . 16). ,
, (. 2.6.1)

21

, ,  , . ( ) -, IV-, ,
.
() 2 , /
.
. ,

.
Stata

Stata, ,
ivreg . hausman , , ,
(hausman, save ), , ,
(hausman ).

.
, ,
:

yi = xi T + i

(2.23)

xi = xi + i

(2.24)

xi , ( yi ) xi . ,
. ,
, i .

2.3.3

(2.6) ( , -

 ) (2.7) ( ) ,
22

- . , ,
 -
, - . , , .. .
, , .

= Var

(2.25)

(. GLS, generalized least squares)


:

= (XT 1 X)1 XT 1 y

(2.26)

-
.
2.2 ( (Aitken))

(2.6)(2.7),
.

Var = (XT 1 X)1 ,

(2.27)

 

Var( ) = (XT X)1 (XT 1 X)(XT 1 X) > (XT 1 X)1

(2.28)

. , , , . , , , 2.3.4
2.6.1.
, (2.7) ( (2.6)), ,
23

. , - (Goldfeld-Quandt) , - (BreuschPagan) 
, , (1997).
Stata

Stata (, Cook-Weisberg) hettest ,

regress :
(

ln e2i = z T + i
H0 : = 0

z
.

,
:

N (N 1)
2

, N .
:

= (), ()
. , (feasible
generalized least squares) ( ) : (, ,
), ,
d ), .
(, , ()


 ; ()
.

, . -

(White):
!1
!
!1
n
n
n
X
X
X
1
1
1
=
xi xTi
e2 xi xTi
xi xTi
(2.29)
V ()
n i=1
n i=1 i
n i=1
24


  (sandwich estimator), .   (Huber),
. ;
.
Stata

Stata , ,
robust regress . , Stata ( , )  regress

[weight=exp] , . Stata (. help weights );

aweight  . ,
,  vwls .

2.3.4

,
( ).
.
Stata

Stata 6 ( ts), ..
( ) L., D.,
S.. time .

( ) - (Durbin-Watson),

D=

PN

i=2 (ei ei1 )


PN 2
i=1 ei

(2.30)

, - , 2. , 0 4, 25

. , ,

. - , (1998).
.
Stata

Stata - dwstat ,
regress .

, , .
(Newey, West 1987):

k 
X

l=k

|l|
1
k+1

1X
xil xTi
n i=1

!1

1X
ei eil xil xTi
n i=1

=
)
Var(
!1

1X
xi xTil
n i=1

, (2.31)

, xi , i- .
,
k . ,
. k = 0
- (2.29).
Stata

Stata newey . , , tsset ,


newey, t() , .

2.3.5

(2.8) , ..
. , .
26

, , .
,

0/1-, , ,

, ).
Stata

( ), Stata , , , .
 ,  , ,
( - ).
Stata  xi. ,  

areg , a absorb, .. .


F-. , 

anova (. help anova , tutorial anova ), anova . . . , continuous .

. XT X
. 
, (, ) .
 , , , , .
Stata

, , , Stata factor . . . ,

pc, pc , (principal components).


5 .

27

 .
max /min 
XT X,  (condition number).
: 10 100 , 1000 ( ) 
.
, , (. variance inflation factor,
VIF; . Fox (1997), Smith and Young (2001)),

VIF(j ) =

1
,
1 Rj2

(2.32)

Rj2  Xj X (

Xj j - , .. j - X).
:

Var j =

1
2
1 Rj2 (n 1) Var Xj2

(2.33)

, , 6 . VIF
4 , Rj2 ' 0.75.
Stata

vif , regress .

, 0/1, 6 , ,

VIF

, : VIF , 
!

28

7 : ,
, , 1/2,
. ,
.
, - ,
, (,
70,  5,
60 80), . , ,
: Var Xj2 (2.33) , .
,
j .
.. Xj X = Xj X
j

, , , ( -). 
(
, . . ;
2.4.1)
( ,
).
-

. , , , 7 , , :  , ,
. -,  . , ,
. -, -
.

29

t-

2 + Var()

= arg min E( )2 = ( )
B

(2.34)

B  , y .
XT X , 
  , Ip ,

Ip  p. :
1 T
ridge = XT X + Ip
X y

(2.35)

- ( . ridge  ;  . ,
, , , ; . (1981)).
shrinkage estimator, ,
-  .
, . ,
, (2.34) , , .. ,
.
Stata

- rxridge , Stata, STB-28.


Stata, 6- Stata. , webseek

rxridge .

2.3.6

, , 
(, , (2.10)). , , (  )
, ?
30

, ,
. , : ,
, ,
.
,  ,
,  , , , ..
(, ,
) .
, 
, --
(signrank ranksum) t- .
-

(1984),
() (, , ), .
, (. influence function influence curve) 
.
, (, )
.
, . , ,
,
, . ,
- y : - i- yi ,
.
31

, , -,

N
X

(2.36)

(zi ; ) min,

i=1

() , z 2
8 . , , (z, ) = |z|.
,
.
 (Huber)
(
z 2 /2,
|z| < c
Huber
c
(z) =
2
c|z| c /2, |z| c

(2.37)

c > 0 , :

c , ; , , c 0,
.
(),  (Tukey):


3 


2
2
c 1 1 z
, |z| < c
6
c
biweight
(z)
=
c
c2
,
|z| c
6

(2.38)

c  . c
.
Stata

rreg  
Stata. ,
 .

, , , - .
: ,
8

, .. :

32

z = y xT .

510% H0 : i N (0, 2 ). , ,
.
, ,
2.4.3.

2.3.7


/ . - (Box-Cox):
(
y 1
,
6= 0
()
y 1
y =
(2.39)
y ln y,
=0

Qn
1/n
y = ( i=1 yi )
 yi . -

9 . ,
- , ,
, ,
(. 2.4.2)
, , ( ), (
). 1

CV = (Var X) 2 /EX .
, ( ,
, , ,
, . .). ,
- .
, , , -
( )
, .
9 H

, -

33


.
Stata

- boxcox . boxcox . . . ,

graph . predict . . . , tyhat


boxcox . . . , generate . , , ,

y () = XT + ,

(2.40)

regress .
- boxcox2 ,
STB-54.

2.4

(2.5)(2.9), (2.2) , .

2.4.1

, , ,
, , . , , : , . ,
,
.
,
(. . ).
, ,
, . ( -
, ).
34

, , ,
, , ,
.
Stata

Stata sw
(. stepwise).
sw regress depvar varlist, ,

varlist . , , .

, (goodness of
fit), R2 : , .. 1,

R2 , . ,
- R2 , 0,
, 1, . ,
, :

R2 , , ,
(, , , :
).

R2 : R2 1.
-R2
1, , , .

R2 (goodness of fit).  (
, Granger causality test (Handbook 1983, 1984, 1986, 1994).

35

R2 , , 2
Radj
, :
2
Radj
=1

eT e/n p
,
yT y/n 1

(2.41)

e  , y  () .
, , ,
, , , .
,   ,
(overparametrization), 10 .
, (AIC, Akaike information criteria):

+ 2p,
AIC = 2 ln L()

(2.42)

 ( L()
), p  . 
AIC.
, (Schwarz Bayesian information criterion, SBIC,
BIC), p ln n, n  :

+ p ln n,
SBIC = 2 ln L()

(2.43)

,
.
Stata

, Stata , . , , fittest , SSC-IDEAS

10 , , ,
, . , . ., .,
Konishi and Kitagawa (1996).

36

2 , (http://ideas.uqam.ca ), R2 , Radj

, ,
. , ,
, ,
web- icomp 11 .

2.4.2

,
E[y|x] . , . , , ,
, , t- F-.
( , ),
1960- . .

ei =

K
X

k yik + i ,

(2.44)

k=1

yi  -, ei  ,
H0 : = 0.
Stata

Stata ovtest . Stata ( K = 4)


.

11 , ; ,
, , ,
.
AIC SBIC  , ,
.
, .
!

37

, (, y = a + bx2 + , y =

a sin x + , y = axb e ,   (, ,
) . ,
.
, ..
.

yi = f (xi , ) + i ,

(2.45)

f ()  ( y = a sin(bx+c)+, y = axb + 
?). ,

(. NLS, non-linear least squares) , ,


.
Stata

Stata

nl. , , f () nl.

2.4.3

, - , : ,
, ,
? ,  , ? , : (influential observations),
(outliers)  , , .
,
(,
),  38

+: regular points

*: outlier
*

+
+
+
+

+
++
+

+
+
+

.5

1.5

2.5

. 2.1: . : y =

1x+
,
( 1997 .), . .
, ( ) (,
) ( ).
,
(, , (. leverage) ), i . ,
, (. 2.4.3),
.
12 .
12 , , , -

39

y = X = X(XT X)1 XT y Hy

(2.46)

H X yi
Pn
y. , hii = j=1 h2ij ,

i- hi hii (. hat value,


). ,

1/n hi 1, p/n, hi  ,
3p/n.
Stata

hat-values predict . . . , hat ,

regress .

 ,
, , . , , , , , , .
i- ,
13 :

ei =

ei
(i)
se 1

,
hi

(2.47)

(i)

se  i- ,

1 hi , Var ei |H0 = (1 hi ) 2 . ei
N p 1 .
.

Draper, Smith (1998), Fox (1997), Smith and Young (2001).

13 , jack-knife,

. ,
, (1988).

40

t- y = XT + Di + i , Di 
, i- .
C   D-
(. Cook's distance):

Di =

e2i hi
p 1 hi

(2.48)

D- ,
- .   Di >

4
.
N p

k DF BET Ak,i :

DF BET Ak,i

(i)
k k
,
=
d (i) )1/2
(Var

(2.49)

(i) , i- .
,
- t-,
.
, |DF BET Ak,i | > 2/ n p.
, :
r
hii

DF F IT Si = ei
1 hii

(2.50)

hii ,
, 1 hii . ,
, p
. DF F IT Si i- 2 p/n,
, , .
Stata

predict . . . , rstudent
regress . D- predict . . . ,

cooksd , DF BET A  predict . . . , dfbeta( ) dfbeta , DF F IT S  predict . . . , dfits .

41

2.4.4


. ,  .
Stata

Stata graph , .
. . 3.14.

, , .
,  ( , ), . .

Stata

summarize .
, . . , graph   .
(kdensity ), ( qnorm ), ( diagplots )
( histplot , SSE-IDEAS, : http://ideas.uqam.ca ). ,
(, , , )  sktest , .
skewness-kurthosis test.


...

14

14 , , ,

42

( )

Stata

. . . predict . . . , residuals regress .

. . , , , ,
, ,
.

. 2.4.4.











. 2.2: ;
; ?
, , ()
, ,

(, ).

43

. .

y = X(k)T (k) + (k)

(2.51)

Xk = X(k)T (k) + (k) ,

(2.52)

(k) k - . (. added
variable plot) (. partial regression plot).
(
- ), ,
.
Stata

avplot . ,
, , .

/
(. . y,  e). ,
,
.
Stata

rvfplot  . residual versus fitted.


hettest ovtest .

( ) :

e(k) = e + k Xk
Stata

(2.53)

Stata  cprplot acprplot (. component plus residual).

, - 
.
44

2.4.5

F - (2.16).
()
. , , , .
, Ak , k -
(, , Ak  ), , ,

 X

P k Ak
P Ak

(2.54)

P (k Ak ) 1

X
k

P Ak

(2.55)

(2.55) . , ,

, , (2.54) 1 . ,
 , P(Ak )
/K , K  . (Bonferroni adjustment)
. ,
 (Sheffe), (Tukey)
- (Working-Hotelling) ( 1980, Smith and Young 2001).
 , Stata . , , set level . . . . 95 ().

query  . 3.15.

45

2.4.6

 ,
: , , , . , , ,
- (sample selection  ).
Little and Rubin (1987).

,
, . Rubin (1976). , (data are missing completely at random 
MCAR), P(Xj | X) Xj , X (
, Xj Xj , ).
(missing at random  MAR), P(Xj | X) Xj ( X ). ,
(ignorable), . , P(Xj | X)

Xj , (non-ignorable),
.
, . , MAR MCAR,
, MAR,
.
,
. (, 15%), MCAR.
(,
46

), MAR. , , , , ,
.
, .


, .. ,
(complete case analysis). , ,
MCAR.  , , ,
. . .
Stata

. . . correlate . . .

,
Stata

. . . pwcorr .

(available case analysis). 


. , MCAR .

. -
.
, ,
.



,  (imputation): 47


- , , .
- ,

.
Stata

, Stata  . : impute
(, ) ( , , ,
)
.

,
MAR,
.
,   (hot deck imputation). , , ,
, : (, ),
(,
, ,  ). ,
.
.
Stata

hotdeck ,
(Mander and Clayton 1999).

,  
(multiple imputation),
70- Rubin (1978). ,
, , 48

,
.
(within variance) (between variance).
;
 .
, MAR.
Stata

Stata, ,
, .


, . , , Y = (Ymiss , Yobs ),
Yobs  , Ymiss  , , .
, .. , L(|Y ) = f (Y |). ,  L(|Yobs ). , Rij =

I(yij ) g(R|Y, )

15

, -


Z
L(, |Yobs , R) = f (Yobs , Ymiss |)g(R|Yobs , Ymiss , )dYmiss

(2.56)


, , .
15 ,

49

EM-, (
) . , EM- ( ,
, ), Dempster et. al. (1977), Little and Rubin
(1987) , EM- 1920 . ,
EM-  ,
,
.. , .
EM- ,
. E (expectation)  
. (
, ,
, , , , ,
) ,
, E
. M (
), ( ), E. EM-
, . ,
(, 106 ).

2.5

, "- "?  ,
. ., Stata.
50

, ,
,
.
Stata

Stata ,
, .
regdiag diagplots .

2.5.1

.
Stata

Stata
(
), , regress ,
, , .
tutorial regress tutorial aboutreg .

51

2.1:



Stata

regress

H0 : Et t1 = 0

DW

0 4,

dwstat

:
. -

regress

hettest

regress

avplot ;

rvfplot
factor, pc

H0 : ln i = T zi

F, 2

max /min  1
VIF

VIF >

( VIF > 2)

regress
4

vif

RESET-

regress

F, 2

ovtest

regress

avplot ;

52

rvfplot ;

cprplot



Stata

summarize ;

sktest ;

graph

, -

norm ;

kdensity ;

qnorm

regress

predict,

cooksd ;

,
-

(,
)

D-

DF F IT S ,

predict,

DF BET A

dfit ;
predict,
dfbeta

rvfplot

hausman

avplot ;

( H0 ),

Ha )

),

( H0 )

c . .

53

2.5.2

 
.
1 tutorial

aboutreg. , , , , Stata
:

. use auto, clear


. regress price mpg foreign weight
Stata :
2.2: Stata

Source |
SS
df
MS
---------+-----------------------------Model |
317252881
3
105750960
Residual |
317812515
70 4540178.78
---------+-----------------------------Total |
635065396
73 8699525.97

Number of obs
F( 3,
70)
Prob > F
R-squared
Adj R-squared
Root MSE

=
=
=
=
=
=

74
23.29
0.0000
0.4996
0.4781
2130.8

-----------------------------------------------------------------------------price |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
---------+-------------------------------------------------------------------mpg |
21.8536
74.22114
0.294
0.769
-126.1758
169.883
weight |
3.464706
.630749
5.493
0.000
2.206717
4.722695
foreign |
3673.06
683.9783
5.370
0.000
2308.909
5037.212
_cons | -5853.696
3376.987
-1.733
0.087
-12588.88
881.4931
------------------------------------------------------------------------------

 (
y , ,
, y ),  , ( , F -
54

2
H0 : , ; R2 Radj

). , , t- H0 : k = 0
.
(, ovtest, hettest ) ,
.
, (fitted values). . 2.3 , ,
( ) ( kernreg, . 2.6.5). ,
, (2.44).
. 2.3: : , ,
. .
price
linear OLS regression

kernel regression

15000

10000

5000

0
0

5000
Fitted values / argument Xb

10000

, , (. . 2.52).
(. 2.4), , .
, 55

. 2.4: weight ( avplot weight).


FRHI

 VH

 W



H SULFH _ ;






H ZHLJKW _ ;



.
, ,
.
(. 2.5) , ,
, , . , , ,
 , .. - .
, (. . 2.6
rvfplot), ,
.
,
predict , rstudent , dfbeta , dffits , cooksd hat
16 ; . 3.1

56

16

. 2.5: ( rvfplot, yline(0) ).




5HVLGXDOV







)LWWHG YDOXHV



. 2.6: ( rvfplot, c(s) bands(10) d(50) ).

5HVLGXDOV






)LWWHG YDOXHV

57



. 2.7 , (leverage) .
D. . 2.4.3. , , . ,
, D (: predict . . . , cooksd
regress . . . , if . . . < . . . , . . .

- -

).
. 2.7: , .

&DG 6HY

&DG (OG

6WXGHQWL]HG UHVLGXDOV


R 3O\P &K
R
R

R
R
R R
R
R
R
R
R

R
R
R

R R
RR
R
RR
RR
R
R
R RR
R
R
R
R
R
RR
R
R
RR
R

R
R R
R
RR R

R
R R

9: 'LHVH

R
R

R
R

R
R

R
R






/HYHUDJH





, ,
. . 2.8
. ,
:
, .
58

. 2.8: (1)
(qnorm . . . ).

5HVLGXDOV






,QYHUVH 1RUPDO



, , Stata . , tutorial regress , tutorial aboutreg

tutorial graphics .

2.6

,
; - .
, , , . , .

59

2.6.1

,
.  .

, t-, F - 2 -.
-

, :  ( )  . (Maddala
1993, Baltagi 1995). , :

yit = xTit + ui + it

(2.57)

, (, . .) ( , ).
Stata

Stata xt, x, 
t. xtreg : (. fixed
effect)  xtreg . . . , fe , (. random effect) 
xtreg . . . , re .   . reshape , . 81. , it (,
) xtgls ,
 xtregar .

, ( .. RLMS, . 4). . ( ,
, , ;
, , )  (, RLMS
60

; ). , ,
, ,
(primary sampling units  PSU).
PSU ( RLMS  ,
, ), ,  , ..
, ,  
(, ).
, , , . ,
PSU , (
) ,
PSU , , , PSU . ,
,
,
:

yit = xTit + P SU + ui + it

(2.58)

, . , ()
,
.
Stata

Stata ,
 svy . ,
( svyset svydes ). svy , cluster() ,
Stata, , .. -

61

regress .
(. help weights ),
(.. , )  pweight (. probability weights) 
.

2.6.2

,
, .
.
. , (. . , ;  , , ) ,
. , ,
.
-
(3SLS).
Stata

2.6.3

reg3 .

, , , - . 0/1
-. () . , ,
: , 0 1. , -
62

, ( ),
() .

(. . 1 ). ,
,

P(y = 1|x) = F (xT )


P(y = 0|x) = 1 F (xT )

(2.59)

[0, 1],
F .
.
 :

F (z) =

1
1 + exp(z)

(2.60)

- - ; .
, , . , : supx(,+) |Flogit (x) FN (0,1) (x)| < 0.02, . - ,
 ,
,
. (Heckman sample selection model) 17 .
, -
(goodness of fit).
17 .

, .. , (Greene 1997);
.
2000 .

63

,
(Gomperz, , /gompit-):

F (z) = 1 exp[ exp(z)]


Stata

(2.61)

Stata probit , logit

cloglog .

. ,
:

L(yi , xi , , F ) =

F (xTi ),
1

F (xTi ),

yi = 1
yi = 0

(2.62)

L(yi , xi , , F ) = F (xTi )yi (1 F (xTi ))1yi

(2.63)

ln L(y, X, , F ) =

n
X

i=1


yi ln F (xTi ) + (1 yi ) ln(1 F (xTi ))

(2.64)

.
Stata

Stata
(Gould, Sribney 1999). ml.

- -
(, 1973).
, .
( ..
)  (Wald test) (LM test,
64

Lagrange multiplier test, score test). 2 , (,


1998, Greene 1997).
- - (, , ) , ,
, (..
, , ), ,
. , - ,
,
.
Stata

- dprobit , - , probit ,

. Stata mfx ,
.

2.6.4


, :

P[y < m|x] = p

(2.65)

, , 5%
10% ( p = 0.05 0.1). , ()
, .

p = 0.5.
Stata

Stata qreg . qreg . . . ,

65

quantile() , p
.

,
(. (2.11)):
N
X

(2.66)

|yi xi | min

i=1

- .

2.6.5


 . , E[y|x], ,
y x, (., , . 2.3).
:

m(x)

= n1

n
X

(2.67)

Wni (x)yi ,

i=1

Wni  , x.
:

n
X

Wni (x)(yi m(x


i ))2 min
m(x)

i=1

Stata

(2.68)

,  lowess (locally weighted smoothing) (Fox 1997, 1993).


Stata ksm ksm . . . , lowess .


(local regression)  (rolling
regression). .
66

   . , , ; , .
( 1993):

Wni (x) = Khn (x xi )/fhn (x)


n
X
1

fhn (x) = n
Khn (x xi )

(2.69)

Khn (u) = h1
K(u/hn )
Z n
K(u)du = 1

(2.71)

(2.70)

i=1

(2.72)

(2.70)  () ( - ), (2.71)  hn (
). (2.70) ,
.
- .
:
: K(u) = 0.75(1 u2 )I(|u| 1)
15
: K(u) =
(1 u2 )2 I(|u| 1)
16
1
: K(u) = I(|u| 1)
2
: K(u) = (1 |u|)I(|u| 1)
1
() : K(u) = exp[u2 /2]
2

(2.73)
(2.74)
(2.75)
(2.76)
(2.77)

I( )  , 1,
, 0, .
:
 ? ?,
 
? ?. , , ,
67


. hn , , ,
18 .
, ,
.

n4/9 (. . , ),
n1/9 .
Stata

kernreg ,
STB-30. (
, , , , , , ), , ,
.

kdensity , STB,
Stata.

. ,
,  , 
(,  , dimensionality curse), .
, , , ,
.
Stata

, .

. ,
: , . .,
18

h , f (x) y.

68

. 2.3.

69

3
Stata
Stata (StataCorp. 1999, 2001) : , , ,
. 80- .
1999 . , 2000 .  .
Stata :

( ,
, , , , , );

(. .
,
).
;

, ,
, ;

, Stata ( ); ;

, ;
70


(Windows, Macintosh, UNIX).
: ,

( Stata LATEX),
,
Harvard Graphics PowerPoint.
.
(, , )
Stata (, ). ,
, ;
Stata . (, ,
Stata). -

Stata
.

3.1

, Stata. , command  , ,
(, regress reg, regress). [ ]
 , . . ,  , . .
: [ 1 | 2 ]. ,

describe [ | using ] :

d
describe
71

describe x1 x2 x3
d using source
desc using source.dta
Stata .
Stata: [R] ,
(Reference); [U] 3
A brief description of Stata

 ,

3 User's Guide ( Stata 6)  Stata


(, Stata ); [G] twoway 
.

3.2

: Stata

Stata c:/stata,
. wstata.exe (Stata for Windows).
verinst .

(
200) .
.ado,

c:/stata/ado . ado-
( 900),
Stata, ( , Stata ado-); ,
Stata  Stata Technical Bulletin, STB,
Internet; ,
, .
Stata , , , ( [R] limits

help limits). :
set memory [k|m]
, Stata. 10 , : set memory 10m . -

72

: wstata /k 10240 . 2047,


. , ( ), Stata (
), .

set matsize
, Stata .
10.  800. , Stata .

Stata , 1 ,
 (, , ). ( Windows) wstata /b do

.
Stata exit .
, Stata .
. : [U] 5 Starting and stopping Stata , [U] 6 Troubleshooting starting
and stopping Stata

3.3

, , : Stata

Stata (. 3.3) ,
. UNIX, Windows .
Stata : (Stata Command),
(Stata Results), , (Review), (Variables), (Help),
(Graph), -, log- (Log; 7- Viewer). (Stata Browser)
1 . 3.13.

73

74
. 3.1: Stata.

(Stata Editor), (Stata Do-file Editor). ,


,

Windows

Stata Command Windows (, , ).


, PgUp PgDn,
( , , - ).
- Stata

Prefs

, ,

(, , ).
. : [GSW] , .. Getting Started for Windows.

3.4

: Stata

Stata, , :

[ ] [if ] [in ] [using ] [[]], []


(, ), (
) (, ). if in ,
(. 3.6). (,
..), , ,
using. , [weight=] (. help

weights; ). ,
, Stata ,
, , .
, .. ,  . 3.11.
. : [U] 14 Language syntax

75

3.5

Windows- Stata

Help

Durbin Watson statistic

Stata Command

Search

( , ,

( Stata).

, search,

help whelp.
Stata:

http://www.stata.com/info/capabilities/

Stata :
, , ,
2 ,
Stata. Internet, Stata
(MS Internet Explorer, Netscape Navigator). Stata 7
, Results.
, Stata,

Help/Contents

( help contents).

: ,
, , , , ,
, Windows.

.hlp 3 .
Stata  - (,
, ), tutorial. ,
Stata, , Stata, Stata,
.
. : [U] 8 Stata's on-line help and search facilities , [U] 9 Stata's on-line
tutorials and sample datasets .
2 , ,  ,
.

3 Windows , Stata,

Stata (Explorer) Windows .

76

3.6

Stata . [if ] [in ].


, if  , > (""), < (""), >= (" "), <=
(" "), == ("", , ), ! = = (" "); & (""), |
(""), ! (""), _n _N,
, . in
/, , ""( l) 1.
(. generate, . 79)
. , count if x!=. , x.

3.7

, , :

, , ,
. Stata
( infile; infix; insheet; . help dictionary [U] 24 Commands to input data ),

(Excel, SAS, SPSS, Statistica

..) (
, , ), . Professional Stata Windows- StatTransfer ( http://www.stattransfer.com ),
.
 DBMS/COPY.
Stata
File, .
use , [clear]

77

. use . . . , clear ,
, . (, , Windows ) ,
use using [if ] [in ],
/ ,
. 
, .. , do- (. 3.13),
.

save , [replace old]


. replace , , .  ,
. old - Stata 6 Stata 4-5
(.. Stata ). Stata 7

old Stata 6.
merge using , [nokeep ]
, . , . . . ,
( Stata master data using data) , . . ,
, , . [R]

sort sort . mmerge (Wessie 1999), (.


3.17). nokeep , ,
using data.

append using
, . . .

. : [U] 25 Commands for combining data

78

3.8

, , :

Stata . 
. ,
; . [U] data types ,

help datatypes.
generate

[] = [if

] [in

, , , . Stata ,  32, ( ), , .
, , , (, , .), (
1  0  ),
(missing value)  ( .). Stata , .
( ). g

byte nonmissx=x<. nonmiss byte (.. ), 1, x


, 0, x . , 3.6. . [U] 14 Language syntax , [U] 15 Data , [16] Functions and

expressions .
egen [ ] = egen-() [if

] [in

],

[by( )]
,
, , , , . . , -.
[R] egen help egen .

xi
xi: Stata
(0/1) , ,
. , -

79

, ..
.

i. .
recode
. .

replace = [if

] [in

rename
.

drop if | in
, .

drop
.

list [] [if ] [in ]


( , ) , ( ,
).

edit [] [if ] [in ]


. Stata
- .
.

browse [ ] [if ] [in ]


. ,
edit , .

aorder
.

sort
gsort +|- . . .
.

compress [ ]
( , , )
, , .

80

reshape
,  , . 
(long) , ,
( , 
 ,  ),  (
 ), ,
, .
, income96, income97, income98  
, income, year , year 96, 97,
98   . Stata,

xt),  .
describe [ ] [using ], [short]
: , . . ,
, .
, .

label
. label variable ""
, describe . ( _dta ,
label data ). use describe .

label define label values . : generate

egen label variable .


notes [_dta | ] : " "
.

label , notes
_dta .
:  ;  1994 .
;  households.do ..

81

lookfor
.

clear
, , , , .

3.9

summarize [if

] [in

], [detail ]

, , , , , , . detail
, . ,  lv; codebook inspect . ,
, tabulate table 
. .

correlate [if

] [in

], [covariance ]

covariance , . , .

pwcorr [if

] [in

], sig

obs

, . . , , .
sig (
), obs  .

tabulate table
, . .
tutorial tables . . [U] 28 Commands for dealing

with categorical variables


regress [if ] [in ], robust
noconst cluster( )

82

.
: ,
2 , , , F, R2 , Radj

, t- (. . 54 ). robust (2.29), . cluster


,
( ). noconst , ,
Stata, ( ).
regress ,
predict , .

tutorial regress .

Stata . , predict, , ;
(- e(b)) (e(V)); ( test) ( testnl,
- )
, .. ,
, estimates list .
_b[ ],  _se[ -

]. , ,

help est help postest Stata.


Stata ,
4 :

ivreg, rreg,
reg3, nl;

( help time): arima; ac pac; arch; 4 .

help .

83

(2.31) newey; dfuller;

pperron;
( glm);
( anova; oneway; loneway),
( factor);
( table;

tabulate; epitab);
( xt, , xtreg,

re xtreg, fe  ; xtgls  ; xtlogit xtprobit 


. . help

xt, [U]

29.13 Panel-data models );

, ,
(survival time; st; . help st, [U] 29.14
Survival-time (failure time) models );

(survey; svy; . help svy, [U] 30 Overview of survey estimation );

( logit; logistic;

lfit; probit; dprobit  -);


( ttest), ( sdtest) (
signrank; signtest; ranksum; kwallis);

( spearman; ktau);
, ( ml);

Stata 7  ;
, .
84

Stata 500 ( ).
(STB), ( 2000 .)
SSC-IDEAS (. 3.16).

3.10

Stata : (, , , . .); ( ; ), (
2126 , 232 ), ,
, (, ),

(_pi) . help functions [U]


16.3 Functions ,

[R]

functions .

. 3.17.

3.11

Stata
, .
,
.
by () : Stata
Stata . , Stata
(), .
_N

. , -

85

, Stata .

for [: for . . . ]: Stata X [Y] [


\ Stata

X [Y] . . . ]

: ( numlist ), ( varlist
), ( anylist ).
1 10 : 1(1)10 , 1 2 to 10 ,

1/10 .
, ,
. * : u* , "u".
: [U] 14 Language syntax , help numlist , help varlist .
for .
X (). for , Stata
X Y , ..

Stata
by for,
, ,
, Stata. ,
for by , Stata, quietly ,
: qui for var x1-x5: g lX=log(X) \ lab var lX "log of X"

forvalues foreach.

3.12

, Stata.
Stata , .
log using , [ append | replace ]
log on | off | close

86

, Stata ,
( , append

replace, ). log off ,


log on , log close .
, log-, Stata . Log- Stata, Stata ( , ..).
Stata 7 log-: ( ,
,
) ( ,
). log- cmdlog

using . log- HTML texman  log html log texman .


 outreg (Gallup 2001), : , , R2 .
, , , . [R] stb, help stb.
SSC-IDEAS, . 3.16.
, #review

[ ] .
. : [U] Printing and preserving output .

3.13

: do-

Stata 
 . , , .do, , do-, :

87

do , [nostop ]

Stata do-, .
, nostop.
, do run. , Stata
, , .
do- , C, . . /* , */  . ,
, *, . , , , , Stata
log-.
.
for , do X ( -
X) .
do- 5 .

, ,
, , do-.
,
,
.

, (, ..), do-.
(, reshape, merge  5 Stata Corp., Net Course 151 Stata.

88

!) () .
,
, (, ).

label data notes.


do- " ", log-, , do-.
, log- do- (,
do- - , log-, Stata
Windows).
""do-, , , income98.do, :

clear
version 6
set memory 10m
log using income98, replace
use income98
* -
...
log close
exit
Stata Corporation Internet-
Stata. ,
.
. : [U] 19 Do-files

89

3.14

Stata graph,
.
.
graph , []

graph , .
tutorial graphics .
graph ,
. Stata
(bins), , , ,
graph . . . , bin(50).

graph

. . . , norm. , ,
graph . . . , box ( box-whisker,
6 ) | star ( ) | bar ( ) | pie (
). grhist

graph.
graph, : graph

 y  x. ( ), , :

symbol  , ; symbol(.)
, symbol(o)  , symbol([]) 
; symbol([_n])  .

connect  ; connect(.) , ,

connect(l)  ; connect(s) 
. 6 (box) ,
, (whiskers)  .

90

(. 2.6.5).
, ,
: connect(l[-])  , connect(l[_])  , connect(l[.])  .  connect(l[-.]) - .

sort  , connect, x ( ).

bands  , .
, , .

density  . , .
bands.

xlab ylab  .
xtick ytick   .
xline yline  .
xscale yscale  .
title  . Stata .
grtwoway.
graph , Stata
, ..
y1 , . . . , yn1 , x.

graph, matrix.
Stata .gph, graph . . . , saving( ).
graph using () . Stata  .
91

help grother. ,

File

, -

Windows- ( .bmp .wmf),


Windows.
Stata 6 LATEX .
 PostScript (.ps)
Encapsulated PostScript (.eps) PDF LATEX
graphicx. UNIX- Stata gphpen gphprint, PostScript-. Windows, ,
PostScript- PostScript-, " ". PS-
Acrobat Distiller Adobe Acrobat ( Acrobat Reader). , , , ,
 PostScript. , LATEX PDF- (,

pdflatex

fpTEX), Stata Acrobat Distiller


PDF- , , ,
Adobe Acrobat.
Stata 7 translate,
PostScript Encapsulated PostScript.
. : [G]

3.15

, Stata, , .
query
( . . , . set

matsize , level , %,
log-, . .). set ,

92

3.2.

about
Stata , :
, exe-, .

memory
, Stata . 1520 % ,
, , .

adopath
, Stata ado- (. . 72 ado-).
Stata (, STB- Internet, . 3.17), ado-.

which
, ado-,
, .
, ,
Stata .

3.16

: Internet-
Stata

Stata 

http://www.stata.com/

. -

( , Stata  STB,
, - ). 

http://ideas.uqam.ca/

RePEc (Research Papers in Economics),


. RePEc SSC-IDEAS (Statistical Software Components), Stata.
,
93

. 

[email protected]

Stata, ,
(William Gould). ,
 .  ,
SAS.
, Stata , .  ,
.
update
Stata . update

query , ( ,
ado-, wstata.exe).
update ado , update executable update all .

net [from URL]


Stata Internet. (URL)  , , Stata 
, ,
.

webseek
Internet Stata,
. webseek Stata,
STB Stata,
. webseek net search .

, Internet, Stata
, , URL . ,

use http://www.stata.com/users/vwiggins/auto.dta
auto.dta, , ,
7 ,

subscribe statalist .

94

[email protected]

.
Stata infile, infix, insheet ,
..
-
Prefs/General Preferences/Internet Prefs.
. : [U] 32 Using Internet to keep up to date .

3.17

: Stata

Stata  . Stata ado-, update,


. statalist SSC-IDEAS,
( Stata , , statalist).
Stata Stata Technical
Bulletin (, , STB). ,
( ) , Stata. ,
,

net
net cd stb

Help/STB and User-written Programs

ado- hlp-

Stata.
Stata , STB- SSC-IDEAS
, ,
adopath (. . 93), Stata  install. 6- 7- ,
, , , ,
install from a:.
95

, Windows UNIX. -, UNIX Windows, .


SSC-IDEAS , .
net Stata ,
 , Windows.
, , ,
 Stata
199 (unrecognized command: xyz not defined by xyz.ado  ; xyz xyz.ado); Stata
, . ,
(.ado .hlp) 
, .
(ado-).
. , , Stata, :

http://www.komkon.org/~tacik/stata

, (tutorials) PDF- .

egen. -
, . ,
, _g .

3.18

,
. .
- ;

96

, , . , Stata ,
, , estimates list (
regress . 83) results list . . help estimates help

results.
Stata : , ,
, . , , ;  , do-, --more-- (
; Enter,  "", more UNIX); 
() ; 
( );  . ,

[R]

error messages

Help/Search/

rc .

(
= if, -
, , , ..). ,
,
 , 
 ( no room to add more variables , .
set memory).
Stata 7 : , URL Stata.
, ,
Stata , . , ,
, ,
.
. : [U] 11 Error messages and return codes
97

3.19

,
.

Stata , , , GAUSS. , , :
, , , ,
.   (
, , , ). Stata
help matrix.
. : [U] 17 Matrix expressions

Stata , ,
.  , ( .. , ).
Stata , , .. ,
, 8 , , Stata. , Stata (, , , , ado- ..).
Stata ($). ,
, ,
$S_level 95 ( ).
. : [U] 21.3 Macros
8 , .

98


, Stata ,
. , , ,
, -,
.
, Stata .
,
, ,
. , (
, ) .
(. . 3.3) - .

3.20

 ,
. ,
 (. 3.5,
help, winhelp).
 - tutorials. tutorial
Stata  Stata , -
. - tutorial intro,
Stata. - 
, ,
,
, Stata, , .
, . http://www.komkon.org/~tacik/stata ,
- Stata (. 3.16), :
99

. net from http://www.komkon.org/~tacik/stata


. net get aboutreg
, , ,
, , . , ,
, , - ,
Stata Corp., .
!

100

( -) RLMS (Russia Longitudinal Monitoring Survey, ;


. Mroz et. al (1999), Swafford (1996)).  , (-), , , , , . 2001 . .
19921993 ., . 1994 . ,
( 1997 .,
). 1 ftp- , ( RLMS)
http://www.cpc.unc.edu/rlms/

RLMS , ..
. RLMS ,
1 SAS Transport files. StatTransfer, Professional Stata.

101

4.1: RLMS

3973

3781

3750

3831

11284

10648

10465

10677

4718

38

RLMS
. , ,

1989 ., . 4.1.
RLMS 2 , .. . , .. , 1  , , .-.
(PSU)
. - ,
;
4.4% .
(PSU) 3 . (SSU, secondary sampling unit)
, ( ) 4 . , .
, RLMS . , RLMS
. , 89 ,
2 . . 60.
3
PSU. , ,
PSU .

102

, ,  . ,
 , 
, . :
RLMS , RLMS  .
: , . ,
. . , , ( ).
,
.
, , . ,
RLMS ,
. :

r#hh*  ;
r#he*  ;
r#in*  ;
r#*  ( , ,
..)
# , *  . ,
r7hhincm.
 . ,
pdf- ( ).
/ , merge. site# ( ), censusd# ( 
, , ), family# (
103

) person# (  ), #  - . , , ; ,
6- site6, censusd6, family6, person6 site, census, family, person ,
, . 5 aid, bid, cid did,

. , ,
;
.
(,

svy* ) (, ,
). psu psu#.
RLMS , , , site# (

psu site).
RLMS . , RLMS 
() 6 .
( ,
, ). StatTransfer
.
RLMS ( ),
5 , ,
, , , (, ,
; ., (2000)). RLMS , , , RLMS
(.., , 2000 . ),
(.. , ,
), , , .

6   (Russian Economic

Trends); 1992 .

104

 :
1. , do-
, , .
, , , .
2. , 3, ( label data ) ( label variable ) , ( notes ).
Stata ,
( ) ...
, , ,
RLMS - .

105

. , :
.
, ,
, , , .
, , , (1998) Greene (1997).
, , .
, , ,
,
.
, , -
.

106

6

.
,
.
, . ,
. , ,
.
(
 . ., . ., . . .
. ., , 1997) ( .., .. . .,
, 1999), .
, , ,
.
1. (, , , 1997) -, ?
?
107

? , ( )
( ).
2. x x2 , x3 , . . . ,
x , , . .
3. . .
Stata, .
1. regress Stata?
2. , ,
?
3. , - . ,
?
4. R2 , : 0.7315, 0.0082,
0.1041, 0.9989, 0.9305, 0.5000?
5. auto.dta . 2.32.8.
6. RLMS .
? ?

RLMS Stata, ,
, , .
.

RLMS , -

. ,

108

? ,
-
/ - ?

 .
, , , :
, ,
, ..

109


. ., . . , . . . .
. ., , 1983.
. ., . . . .
,
2000.
. ., . . . . .,
, 1998.
. . . ., , 1981.
. ., . . . ., , 1973.
., . . , . . . . . .,
, 1997.
. .,  , 1984.
. . ., , 1980.
. / . . . . .
/ . . . ., , 1989.
, . ., . . . . .,
-, 1998.
. . ., , 1993.
. . ., , 1984.
110

. . ., , 1980.
. . ., ,
1988.
Handbook of statistics. Volume 11. Econometrics. G.S. Maddala, C.R. Rao, H.D. Vinod
(eds.). North-Holland, 1993.
Handbook of econometrics, vol. 1 (ed. Z. Griliches, M. Intrilligator, 1983), 2 (ed. Z. Griliches,
M. Intrilligator, 1984), 3 (ed. Z. Griliches, M. Intrilligator, 1986), 4 (ed. R. Engle, D.
McFadden, 1994). Elsevier.
Baltagi, B. H. Econometric Analysis of Panel Data. John Wiley & Sons, 1995.
Dempster, A. P., M. M. Laird, and D. B. Rubin. Maximum likelihood from incomplete data
via the EM algorithm (with discussion). J. Royal Statist. Society , B39, 138 (1977).
Draper, N., H. Smith. Applied regression analysis. 3rd edition. Wiley, 1998 (
1- 2- : . , . .
.).
Efron, B. Bootstrap methods: Another look at the jacknife. Ann. Stat. , 7, 126, 1979.
Fox, J. Applied regression analysis, linear models, and related methods. SAGE, 1997.
Gallup, J. outreg  Formatting regression output. Stata Technical Bulletin , 46 (1998), 48
(1999), 58 (2000), 59 (2001).
Gould, W., W. Sribney. Maximum Likelihood Estimation with Stata. Stata Press, 1999.
Greene, W. H. Econometric Analysis. 3rd edition. Prentice Hall, 1997.
Hausman, J. Specification Tests in Econometrics. Econometrica , 46, 12511271, 1978.
Kolenikov, S. Review of Stata 7. J. of Applied Econometrics , forthcoming.
Konishi, S., and G. Kitagawa. Generalized information criteria in model selection. Biometri-

ka,

83

(4), 875890, 1996.

111

Little, R. J. A., and D. B. Rubin. Statistical Analysis with Missing Data. Wiley (1987).
Maddala, G. Limited Dependent and Qualitative Variables in Econometrics. Cambridge
Univ. Press, 1983.
Maddala, G. The Econometrics of Panel Data. Brookfield, 1993.
Mander, A., and D. Clayton. Hotdeck imputation. Stata Technical Bulletin , 51 (1999), 54
(2000).
Matyas, L., ed. Generalized method of moments estimation. Cambridge University Press,
1999.
Mroz, T., D. Mancini, B. Popkin. Monitoring Economic Conditions in the Russian Federation. The Russia Longitudinal Monitoring Survey 199298. Report submitted to the
USAID. Carolina Population Center, University of North Carolina at Chapel Hill, 1999.
Newey, W. K., K. D. West. A Simple, Positive Semi-definite, Heteroskedasticity and Autocorrelation Consistent Covariance Matrix. Econometrica , 55, 703708, 1987.
Neyman, J., and E. S. Pearson. On the use and interpretation of certain test criteria for
purposes of statistical inference. Biometrika , 20-A: 175247, 264299 (1928).
Rubin, D. B. Inference and missing data. Biometrika , 63, 581592 (1976).
Rubin, D. B. Multiple imputations in sample surveys  a phenomenological Bayesian approach to nonresponse. Imputation and Editing of Faulty or Missing Survey Data . U.S.
Department of Commerce, pp. 123 (1978).
Smith, R., and K. Young. Linear Regression. Oxford University Press (2001).
StataCorp. Stata Statistical Software. Release 6 (1999). Release 7 (2001).
Swafford, M. Sample of the Russian Federation. Rounds V and VI of the Russian Longitudinal Monitoring Survey. Technical Report. Paragon Research International, 1996.
Wessie, J. mmerge  Safe and easy matched merging. Stata Technical Bulletin , 53 (1999).

112

Potrebbero piacerti anche