Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
library(ggplot2)
library(ggfortify)
library(tseries)
library(forecast)
library(githubinstall)
library(fpp2)
library(lmtest)
plot(uschange)
plot(uschange[,c("Consumption")])
plot(decompA)
autoplot(decompus)
# Y[t]=T[t]*S[t]*I[t]
decompM <- decompose(uschange[,c("Consumption")],
type="multiplicative")
plot(decompM)
autoplot(acf(uschange[,c("Consumption")],plot=FALSE))+labs(title="Correl
ograma de Consumo de 1970-2016")
adf.test(uschange[,c("Consumption")])
#TAREA: VERIFICAR LA ESTACIONARIEDAD DE LAS OTRAS VARIABLES DE LA
BASE DE DATOS
modelo<-tslm(Consumption~Income+Production+Unemployment,
data=uschange)
summary(modelo)
residuos<-modelo$residuals
checkresiduals(modelo)
bptest(modelo)
dwtest(modelo)
# ¿Existe autocorrelación en los residuos?