Documente Academic
Documente Profesional
Documente Cultură
PRACTICA DIRIGIDA N 6
Se pide:
Estimar el modelo lineal por MCO y MV:
Yi 0 1 X 1i 2 X 2i i
a. Solver
b. Stata (comando regre y en el ambiente mata)
c. E-Views (ventana program con el comando LS)
d. SPSS
T T 1 (Y o 1 X i ) 2
Max LnL Ln( 2 ) Ln(2 ) i
1. E-Views 2 2 2 2
File \ New\Program
open "h:\datos1.wf1"
LS y=c(1)+c(2)*x1+c(3)*x2
''''Para graficar""""""
scat x1 y
2. Stata
3. SPSS
Archivo\Nuevo\Sintaxis
GET
FILE='H:\datos.sav'.
REGRESSION
/DEPENDENT y
/METHOD=ENTER x1 x2
DESCRIPTIVES VARIABLES=y x1 x2
/STATISTICS=MEAN STDDEV VARIANCE RANGE MIN MAX KURTOSIS SKEWNESS.
GRAPH
/SCATTERPLOT(BIVAR)=x1 WITH y
/MISSING=LISTWISE.
------------------------------------------------------------------------------
y | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
x1 | .0248607 .0160688 1.55 0.166 -.0131359 .0628573
x2 | -.0445007 .0147631 -3.01 0.020 -.0794099 -.0095916
_cons | 4.436842 1.479147 3.00 0.020 .9392158 7.934467
------------------------------------------------------------------------------
Dependent Variable: Y
Method: Least Squares
Date: 10/01/15 Time: 13:28
Sample: 1 10
Included observations: 10
Y=C(1)+C(2)*X1+C(3)*X2
Tarea:
Con la siguiente base de datos de W. Green Econometric Analysis 5ta edicin. (Capitulo 21)
cm np psi mejora
2.66 20 0 0
2.89 22 0 0
3.28 24 0 0
2.92 12 0 0
4 21 0 1
2.86 17 0 0
2.76 17 0 0
2.87 21 0 0
3.03 25 0 0
3.92 29 0 1
2.63 20 0 0
3.32 23 0 0
3.57 23 0 0
3.26 25 0 1
3.53 26 0 0
2.74 19 0 0
2.75 25 0 0
2.83 19 0 0
3.12 23 1 0
3.16 25 1 1
2.06 22 1 0
3.62 28 1 1
2.89 14 1 0
3.51 26 1 0
3.54 24 1 1
2.83 27 1 1
3.39 17 1 1
2.67 24 1 0
3.65 21 1 1
4 23 1 1
3.1 21 1 0
2.39 19 1 1