You are on page 1of 2

PROGRAMA BOCAS DE PAUTO

clear all

use "C:\MARG\ASESORIA USTA\Doc Estudiantes\Base de Datos Pauto.dta", clear

ren var1 t

gen NumProy=var2/1000000

gen MWS=var3/1000000

gen PKWH=var4/1000000

gen PD=var5/1000000

gen TRM=var6/1000000

gen IPC=var7/1000000

gen IPP=var8/1000000

tsset t, monthly

*d

*d t

graph matrix NumProy MWS PKWH PD TRM IPC IPP

*twoway (tsline NumProy, lcolor(blue)) (tsline MWS, yaxis(2) lcolor(red)) //Aqui grafico en color
rojo el numero de proyectos en gráfica comparada con la energia en MW

*twoway (tsline PKWH, lcolor(blue)) (tsline PD, yaxis(2) lcolor(red)) (tsline TRM, yaxis(2)
lcolor(dkorange)) //Comparar precios del diesesl, TRM y el del KWH

//Luego de realizar el dfuller a todas las todas las variables, tengo que

//A las que debo realizar flexibilizacion por NO ser estacionarias, son:

//PD, PKWH, IPP, y depronto NumProy

*histogram PD, norm

*gladder PD //hay que usar log

gen LPD=ln(PD)

//Ahora usamos rezados o series en diferencia así

gen DLPD=D.LPD
*twoway (tsline PD, yaxis(2) lcolor(red)) (tsline DLPD) //Comparamos el antes y el despues de PD y
DLPD

*gladder PKWH //No es necesario usar log

gen DPKWH=D.PKWH //Probamos primeras diferencias

*dfuller DPKWH // y demostramos que con primeras diferencias es suficiente

*twoway (tsline PKWH) (tsline DPKWH, yaxis(2)) //comparo antes y despues del PKWH y su
diferencia sin log

*gladder IPP //No hay log por tener numeros negativos

gen DIPP=D.IPP // primeras diferencias, luego dfuller y con eso es suficiente

* twoway (tsline IPP, lcolor(blue)) (tsline DIPP, yaxis(2) lcolor(red)) // comparacion IPP y su primera
diferencia

*reg DPKWH DIPP IPC DLPD TRM MWS NumProy

*estat dwatson

gen DNP=D.NumProy

reg MWS DNP L.DPKWH DIPP DLPD IPC NumProy, nocons

predict EC, residuals

reg MWS L.EC DNP DPKWH DIPP DLPD IPC NumProy, nocons

estat dwatson

predict Yhat, xb

twoway (tsline Yhat, lcolor(blue)) (tsline MWS, yaxis(2) lcolor(red))

You might also like