Limpando o console:
rm(list = ls())
Retirando a notação ciêntífica:
options(scipen = 9999)
options(max.print = 100000)
Carreganto os pacotes necessários:
library(urca)
library("writexl")
library(tsbox)
library(ggplot2)
library(faraway)
library(mFilter) #filtro hp
library(dynlm) #lags
library(fBasics)
library(lmtest) #pacote para fazer testes de regressão multipla
library(whitestrap)
library(FinTS) #arch
library(moments)
library(scales)
Gerando a base de dados:
CambioNominal<-rbcb::get_series(3695, start_date = "2003-01-01",
end_date = "2021-12-30")
IPP<-rbcb::get_series(225, start_date = "2003-01-01",
end_date = "2021-12-30")
IPADI<-rbcb::get_series(11758, start_date = "2003-01-01",
end_date = "2021-12-30")
IPADIBR<-rbcb::get_series(11757, start_date = "2003-01-01",
end_date = "2021-12-30")
IPADIBR$`11757`=(IPADIBR$`11757`/74.41)*100
IPPdata=read.table("tentativaIPP.txt", head=T)
CambioReal<-(CambioNominal$`3695`*IPPdata$IPPUS)/IPPdata$IPPBR
IPA10=read.table("ipa10alterado.txt", head=T)
CambioReal2<-(CambioNominal$`3695`*IPPdata$IPPUS)/IPA10$IPA.10
# write_xlsx(Phillips,"C:/Users/55819/Desktop/R Trabalho/TabelaDadosExcel.xlsx") Exportar pra excel
Phillips=read.table("Dadoscomn.txt", head=T)
Phillips=cbind(Phillips, CambioReal2)
PhillipsGraph=Phillips;
PhillipsGraph$Data<-as.Date(PhillipsGraph$Data, format = "%d/%m/%Y")
names(Phillips) <- c("n","Governo","Data", "PibR", "ipca", "eipca", "Cambio", "CambioReal2")
PhillipsDados=Phillips
Phillips$Cambio=Phillips$CambioReal2
attach(Phillips)
Visualização da base de dados:
O banco de dados contém 228 observações que estão dispostas
acima sob a forma de dados combinados
Modelos Econométricos Estimados
\[\pi _t = \alpha ^b_1+\pi_{t-1}+\alpha^b_2\pi_{t-2}+\alpha^b_3h_{t-1}+\alpha^b_4\Delta (p^F_t+e_t)+\varepsilon ^b_t\]
##
## Time series regression with "ts" data:
## Start = 2003(3), End = 2021(12)
##
## Call:
## dynlm(formula = ipca ~ lag(ipca, -1) + lag(ipca, -2) + lag(hiato,
## -1) + Cambio)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.95418 -0.17585 -0.00272 0.20260 1.37329
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.1967743167 0.1304072248 1.509 0.133
## lag(ipca, -1) 1.5644203006 0.0509379819 30.712 <0.0000000000000002 ***
## lag(ipca, -2) -0.6054611165 0.0506684882 -11.949 <0.0000000000000002 ***
## lag(hiato, -1) 0.0000002671 0.0000001633 1.635 0.103
## Cambio 0.0073434026 0.0274467302 0.268 0.789
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3731 on 221 degrees of freedom
## Multiple R-squared: 0.9819, Adjusted R-squared: 0.9816
## F-statistic: 3003 on 4 and 221 DF, p-value: < 0.00000000000000022
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 1.3014, df1 = 101, df2 = 100, p-value = 0.09432
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 24.369, df = 4, p-value = 0.00006736
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 12.69
## P-value: 0.001759
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.9326, p-value = 0.2264
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 13.603, df = 4, p-value = 0.008675
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 9.2838, df = 4, p-value = 0.05438
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 56.983, df = 12, p-value = 0.00000007959
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.84572 -0.18860 -0.00625 0.16053 1.23569
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.004642592 0.044953924 0.103 0.9178
## z.lag.1 -1.031071466 0.213822032 -4.822 0.000002827 ***
## tt -0.000002637 0.000335440 -0.008 0.9937
## z.diff.lag1 -0.010026445 0.206148293 -0.049 0.9613
## z.diff.lag2 -0.026958199 0.206331733 -0.131 0.8962
## z.diff.lag3 0.068604436 0.204335387 0.336 0.7374
## z.diff.lag4 0.186991063 0.197877526 0.945 0.3458
## z.diff.lag5 0.130619143 0.185674500 0.703 0.4826
## z.diff.lag6 0.194556022 0.171861132 1.132 0.2590
## z.diff.lag7 0.103440704 0.160973507 0.643 0.5212
## z.diff.lag8 0.120161897 0.146899963 0.818 0.4143
## z.diff.lag9 0.235310429 0.134181245 1.754 0.0810 .
## z.diff.lag10 0.376878605 0.113748685 3.313 0.0011 **
## z.diff.lag11 0.479225115 0.090170805 5.315 0.000000287 ***
## z.diff.lag12 0.121703551 0.066803788 1.822 0.0700 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2983 on 198 degrees of freedom
## Multiple R-squared: 0.628, Adjusted R-squared: 0.6017
## F-statistic: 23.88 on 14 and 198 DF, p-value: < 0.00000000000000022
##
##
## Value of test-statistic is: -4.8221 7.9085 11.72
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -3.99 -3.43 -3.13
## phi2 6.22 4.75 4.07
## phi3 8.43 6.49 5.47
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 147.4098
## P VALUE:
## Asymptotic p Value: < 0.00000000000000022
##
## Description:
## Fri Mar 17 17:55:25 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.95831, p-value = 0.00000376
vif(regressao)
## lag(ipca, -1) lag(ipca, -2) lag(hiato, -1) Cambio
## 33.232900 33.779848 1.014715 1.200278
##
## Time series regression with "ts" data:
## Start = 2003(3), End = 2010(12)
##
## Call:
## dynlm(formula = ipca2003_2010 ~ lag(ipca2003_2010, -1) + lag(ipca2003_2010,
## -2) + lag(hiato2003_2010, -1) + Cambio2003_2010)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.84406 -0.16445 0.01652 0.21434 0.88248
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 0.1542814214 0.2283400359 0.676
## lag(ipca2003_2010, -1) 1.5969468437 0.0718353064 22.231
## lag(ipca2003_2010, -2) -0.6527086553 0.0721876337 -9.042
## lag(hiato2003_2010, -1) 0.0000004039 0.0000005467 0.739
## Cambio2003_2010 0.0326519848 0.0494684896 0.660
## Pr(>|t|)
## (Intercept) 0.501
## lag(ipca2003_2010, -1) < 0.0000000000000002 ***
## lag(ipca2003_2010, -2) 0.0000000000000308 ***
## lag(hiato2003_2010, -1) 0.462
## Cambio2003_2010 0.511
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3745 on 89 degrees of freedom
## Multiple R-squared: 0.9875, Adjusted R-squared: 0.987
## F-statistic: 1762 on 4 and 89 DF, p-value: < 0.00000000000000022
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 0.13798, df1 = 35, df2 = 34, p-value = 1
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 19.981, df = 4, p-value = 0.0005036
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 16.57
## P-value: 0.000252
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.9058, p-value = 0.1976
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 15.564, df = 4, p-value = 0.003664
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 6.205, df = 4, p-value = 0.1843
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 42.595, df = 12, p-value = 0.00002643
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.53553 -0.14461 0.00091 0.15361 0.47801
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.0413161 0.0687430 -0.601 0.54985
## z.lag.1 -1.0697662 0.3911196 -2.735 0.00797 **
## tt 0.0008132 0.0011519 0.706 0.48266
## z.diff.lag1 0.0576021 0.3805021 0.151 0.88013
## z.diff.lag2 0.1376403 0.3652053 0.377 0.70745
## z.diff.lag3 0.0266671 0.3343054 0.080 0.93666
## z.diff.lag4 0.0884772 0.2962939 0.299 0.76616
## z.diff.lag5 0.0625660 0.2617225 0.239 0.81179
## z.diff.lag6 0.1091906 0.2303100 0.474 0.63697
## z.diff.lag7 -0.1305232 0.2027087 -0.644 0.52184
## z.diff.lag8 -0.1330307 0.1831157 -0.726 0.47007
## z.diff.lag9 -0.0319973 0.1554932 -0.206 0.83759
## z.diff.lag10 0.1233821 0.1203382 1.025 0.30891
## z.diff.lag11 0.2153101 0.0797507 2.700 0.00878 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2209 on 67 degrees of freedom
## Multiple R-squared: 0.7119, Adjusted R-squared: 0.656
## F-statistic: 12.73 on 13 and 67 DF, p-value: 0.0000000000001822
##
##
## Value of test-statistic is: -2.7351 2.7169 3.7976
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.04 -3.45 -3.15
## phi2 6.50 4.88 4.16
## phi3 8.73 6.49 5.47
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 159.7473
## P VALUE:
## Asymptotic p Value: < 0.00000000000000022
##
## Description:
## Fri Mar 17 17:55:25 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.91193, p-value = 0.000009675
vif(regressao)
## lag(ipca2003_2010, -1) lag(ipca2003_2010, -2) lag(hiato2003_2010, -1)
## 40.163505 42.936473 1.419914
## Cambio2003_2010
## 2.359548
##
## Time series regression with "ts" data:
## Start = 2011(3), End = 2016(5)
##
## Call:
## dynlm(formula = ipca2011_2016.8 ~ lag(ipca2011_2016.8, -1) +
## lag(ipca2011_2016.8, -2) + lag(hiato2011_2016.8, -1) + Cambio2011_2016.8)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.68093 -0.15891 0.01122 0.14844 0.70995
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) -0.09058267629 0.24202436679 -0.374
## lag(ipca2011_2016.8, -1) 1.38815037090 0.11917983103 11.648
## lag(ipca2011_2016.8, -2) -0.45660177895 0.12013193605 -3.801
## lag(hiato2011_2016.8, -1) 0.00000002262 0.00000031417 0.072
## Cambio2011_2016.8 0.13136919789 0.08050016899 1.632
## Pr(>|t|)
## (Intercept) 0.709568
## lag(ipca2011_2016.8, -1) < 0.0000000000000002 ***
## lag(ipca2011_2016.8, -2) 0.000348 ***
## lag(hiato2011_2016.8, -1) 0.942859
## Cambio2011_2016.8 0.108116
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2659 on 58 degrees of freedom
## Multiple R-squared: 0.9732, Adjusted R-squared: 0.9713
## F-statistic: 526 on 4 and 58 DF, p-value: < 0.00000000000000022
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 2.6318, df1 = 19, df2 = 19, p-value = 0.02051
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 6.2794, df = 4, p-value = 0.1792
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 3.59
## P-value: 0.165714
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.9428, p-value = 0.249
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 1.9548, df = 4, p-value = 0.7441
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 1.2486, df = 4, p-value = 0.87
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 14.8, df = 12, p-value = 0.2525
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.75973 -0.14213 0.02831 0.16628 0.66577
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.095820 0.106505 -0.900 0.373
## z.lag.1 -1.257041 0.211482 -5.944 0.000000351 ***
## tt 0.002374 0.002637 0.900 0.373
## z.diff.lag 0.154228 0.144845 1.065 0.293
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2645 on 46 degrees of freedom
## Multiple R-squared: 0.5676, Adjusted R-squared: 0.5394
## F-statistic: 20.13 on 3 and 46 DF, p-value: 0.00000001776
##
##
## Value of test-statistic is: -5.944 11.8669 17.6829
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.04 -3.45 -3.15
## phi2 6.50 4.88 4.16
## phi3 8.73 6.49 5.47
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 0.6185
## P VALUE:
## Asymptotic p Value: 0.734
##
## Description:
## Fri Mar 17 17:55:26 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.98923, p-value = 0.8584
vif(regressao)
## lag(ipca2011_2016.8, -1) lag(ipca2011_2016.8, -2) lag(hiato2011_2016.8, -1)
## 29.771442 29.270480 2.383456
## Cambio2011_2016.8
## 3.302909
##
## Time series regression with "ts" data:
## Start = 2016(8), End = 2018(12)
##
## Call:
## dynlm(formula = ipca2016.9_2018 ~ lag(ipca2016.9_2018, -1) +
## lag(ipca2016.9_2018, -2) + lag(hiato2016.9_2018, -1) + Cambio2016.9_2018)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.55549 -0.22348 -0.00532 0.10127 1.28443
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2.0961502358 1.8914474647 -1.108 0.279
## lag(ipca2016.9_2018, -1) 1.1844770484 0.1893794199 6.255 0.00000183 ***
## lag(ipca2016.9_2018, -2) -0.2741849979 0.1799365008 -1.524 0.141
## lag(hiato2016.9_2018, -1) -0.0000008188 0.0000015903 -0.515 0.611
## Cambio2016.9_2018 0.4423866371 0.3518636212 1.257 0.221
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3943 on 24 degrees of freedom
## Multiple R-squared: 0.9604, Adjusted R-squared: 0.9538
## F-statistic: 145.7 on 4 and 24 DF, p-value: < 0.00000000000000022
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 2.503, df1 = 2, df2 = 1, p-value = 0.408
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 6.8027, df = 4, p-value = 0.1467
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 0.08
## P-value: 0.961927
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 2.0855, p-value = 0.353
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 7.4747, df = 4, p-value = 0.1128
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 0.65386, df = 4, p-value = 0.9569
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 4.6062, df = 12, p-value = 0.9699
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.23361 -0.13256 -0.07201 0.00804 1.21129
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.45541 0.42953 1.060 0.309896
## z.lag.1 -1.91394 0.40398 -4.738 0.000482 ***
## tt -0.01825 0.02040 -0.895 0.388624
## z.diff.lag 0.50852 0.25793 1.972 0.072167 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3738 on 12 degrees of freedom
## Multiple R-squared: 0.7304, Adjusted R-squared: 0.663
## F-statistic: 10.84 on 3 and 12 DF, p-value: 0.0009873
##
##
## Value of test-statistic is: -4.7376 7.6312 11.4409
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.15 -3.50 -3.18
## phi2 7.02 5.13 4.31
## phi3 9.31 6.73 5.61
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 31.4838
## P VALUE:
## Asymptotic p Value: 0.0000001457
##
## Description:
## Fri Mar 17 17:55:26 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.85774, p-value = 0.001102
vif(regressao)
## lag(ipca2016.9_2018, -1) lag(ipca2016.9_2018, -2) lag(hiato2016.9_2018, -1)
## 26.086119 27.364908 6.538952
## Cambio2016.9_2018
## 4.107644
##
## Time series regression with "ts" data:
## Start = 2019(3), End = 2021(12)
##
## Call:
## dynlm(formula = ipca2019_2021 ~ lag(ipca2019_2021, -1) + lag(ipca2019_2021,
## -2) + lag(hiato2019_2021, -1) + Cambio2019_2021)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.31838 -0.30594 -0.00654 0.37472 0.82430
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.6136592622 1.4392532160 1.121 0.2714
## lag(ipca2019_2021, -1) 1.4645321920 0.1847327127 7.928 0.00000000962 ***
## lag(ipca2019_2021, -2) -0.5035934429 0.1973057970 -2.552 0.0162 *
## lag(hiato2019_2021, -1) -0.0000004400 0.0000007917 -0.556 0.5827
## Cambio2019_2021 -0.2376382028 0.2382579883 -0.997 0.3268
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.5222 on 29 degrees of freedom
## Multiple R-squared: 0.9685, Adjusted R-squared: 0.9642
## F-statistic: 223.2 on 4 and 29 DF, p-value: < 0.00000000000000022
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 0.20886, df1 = 5, df2 = 4, p-value = 0.9418
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 3.3607, df = 4, p-value = 0.4994
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 1.42
## P-value: 0.492388
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.7343, p-value = 0.07898
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 2.6666, df = 4, p-value = 0.6151
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 2.8818, df = 4, p-value = 0.5778
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 7.5871, df = 12, p-value = 0.8165
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.31509 -0.19492 -0.04064 0.15324 0.45061
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2.76713 0.74382 -3.720 0.003974 **
## z.lag.1 -8.57420 1.86152 -4.606 0.000971 ***
## tt 0.14155 0.03609 3.923 0.002854 **
## z.diff.lag1 6.71843 1.66476 4.036 0.002378 **
## z.diff.lag2 5.90478 1.46608 4.028 0.002409 **
## z.diff.lag3 4.90305 1.21289 4.042 0.002352 **
## z.diff.lag4 3.81888 0.98399 3.881 0.003054 **
## z.diff.lag5 2.83323 0.77482 3.657 0.004413 **
## z.diff.lag6 2.12471 0.57989 3.664 0.004360 **
## z.diff.lag7 1.14923 0.33908 3.389 0.006895 **
## z.diff.lag8 0.76984 0.23897 3.221 0.009153 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3158 on 10 degrees of freedom
## Multiple R-squared: 0.8286, Adjusted R-squared: 0.6573
## F-statistic: 4.836 on 10 and 10 DF, p-value: 0.0101
##
##
## Value of test-statistic is: -4.606 7.7482 11.3563
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.15 -3.50 -3.18
## phi2 7.02 5.13 4.31
## phi3 9.31 6.73 5.61
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 1.3668
## P VALUE:
## Asymptotic p Value: 0.5049
##
## Description:
## Fri Mar 17 17:55:26 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.96612, p-value = 0.3631
vif(regressao)
## lag(ipca2019_2021, -1) lag(ipca2019_2021, -2) lag(hiato2019_2021, -1)
## 28.502754 27.761932 1.263971
## Cambio2019_2021
## 1.474665
##
## Time series regression with "ts" data:
## Start = 2003(4), End = 2021(12)
##
## Call:
## dynlm(formula = Dipca ~ lag(Dipca, -1) + lag(Dipca, -2) + lag(Dhiato,
## -1) + DCambio)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.16881 -0.16657 0.03529 0.19799 1.52645
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.0146256221 0.0259026363 -0.565 0.5729
## lag(Dipca, -1) 0.7073333961 0.0695594901 10.169 <0.0000000000000002 ***
## lag(Dipca, -2) -0.1198314093 0.0667305957 -1.796 0.0739 .
## lag(Dhiato, -1) 0.0000014074 0.0000009048 1.556 0.1212
## DCambio 0.0689080525 0.1060620064 0.650 0.5166
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3875 on 220 degrees of freedom
## Multiple R-squared: 0.3894, Adjusted R-squared: 0.3783
## F-statistic: 35.08 on 4 and 220 DF, p-value: < 0.00000000000000022
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 1.1978, df1 = 100, df2 = 100, p-value = 0.1842
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 4.4658, df = 4, p-value = 0.3466
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 4.67
## P-value: 0.096761
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.9674, p-value = 0.3681
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 9.2262, df = 4, p-value = 0.05569
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 11.975, df = 4, p-value = 0.01754
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 47.265, df = 12, p-value = 0.000004193
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.7739 -0.1801 -0.0038 0.1835 1.3220
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.0049078 0.0464809 -0.106 0.91602
## z.lag.1 -1.3031176 0.2112450 -6.169 0.00000000384 ***
## tt 0.0002254 0.0003521 0.640 0.52269
## z.diff.lag1 0.1916086 0.1955015 0.980 0.32824
## z.diff.lag2 0.1884254 0.1870721 1.007 0.31506
## z.diff.lag3 0.2547803 0.1775615 1.435 0.15291
## z.diff.lag4 0.3403780 0.1673383 2.034 0.04329 *
## z.diff.lag5 0.2560144 0.1537760 1.665 0.09753 .
## z.diff.lag6 0.2979903 0.1438721 2.071 0.03964 *
## z.diff.lag7 0.1960270 0.1370238 1.431 0.15413
## z.diff.lag8 0.1863700 0.1274291 1.463 0.14519
## z.diff.lag9 0.2793328 0.1187544 2.352 0.01965 *
## z.diff.lag10 0.4080242 0.1039602 3.925 0.00012 ***
## z.diff.lag11 0.4909510 0.0855105 5.741 0.00000003509 ***
## z.diff.lag12 0.1181764 0.0640536 1.845 0.06654 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3018 on 197 degrees of freedom
## Multiple R-squared: 0.6518, Adjusted R-squared: 0.627
## F-statistic: 26.33 on 14 and 197 DF, p-value: < 0.00000000000000022
##
##
## Value of test-statistic is: -6.1687 12.9922 19.438
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -3.99 -3.43 -3.13
## phi2 6.22 4.75 4.07
## phi3 8.43 6.49 5.47
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 280.1051
## P VALUE:
## Asymptotic p Value: < 0.00000000000000022
##
## Description:
## Fri Mar 17 17:55:26 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.93312, p-value = 0.00000001332
vif(regressao)
## lag(Dipca, -1) lag(Dipca, -2) lag(Dhiato, -1) DCambio
## 1.747593 1.666213 1.067199 1.024675
##
## Time series regression with "ts" data:
## Start = 2003(4), End = 2010(12)
##
## Call:
## dynlm(formula = Dipca2003_2010 ~ lag(Dipca2003_2010, -1) + lag(Dipca2003_2010,
## -2) + lag(Dhiato2003_2010, -1) + DCambio2003_2010)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.01326 -0.14180 0.05385 0.22672 0.93413
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.039765888 0.044146543 -0.901 0.3702
## lag(Dipca2003_2010, -1) 0.810278249 0.107946351 7.506 0.0000000000467 ***
## lag(Dipca2003_2010, -2) -0.185134133 0.101829008 -1.818 0.0725 .
## lag(Dhiato2003_2010, -1) 0.000001109 0.000002099 0.528 0.5988
## DCambio2003_2010 0.081708302 0.179166835 0.456 0.6495
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4018 on 88 degrees of freedom
## Multiple R-squared: 0.4747, Adjusted R-squared: 0.4508
## F-statistic: 19.88 on 4 and 88 DF, p-value: 0.00000000001089
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 0.12124, df1 = 34, df2 = 34, p-value = 1
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 7.8766, df = 4, p-value = 0.09621
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 5.01
## P-value: 0.081487
dwtest(regressao)
## Warning in dwtest(regressao): exact p value cannot be computed (not in [0,1]),
## approximate p value will be used
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.9638, p-value = 0.3664
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 10.47, df = 4, p-value = 0.03321
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 9.7323, df = 4, p-value = 0.04519
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 25.234, df = 12, p-value = 0.01375
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.48807 -0.14489 -0.01286 0.13375 0.42454
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.011997 0.068332 -0.176 0.861178
## z.lag.1 -1.904589 0.385285 -4.943 0.00000569 ***
## tt 0.001451 0.001219 1.190 0.238244
## z.diff.lag1 0.686602 0.340573 2.016 0.047935 *
## z.diff.lag2 0.747151 0.301500 2.478 0.015814 *
## z.diff.lag3 0.618058 0.268543 2.302 0.024577 *
## z.diff.lag4 0.599555 0.234361 2.558 0.012859 *
## z.diff.lag5 0.481278 0.192292 2.503 0.014843 *
## z.diff.lag6 0.477274 0.175798 2.715 0.008482 **
## z.diff.lag7 0.232083 0.171023 1.357 0.179467
## z.diff.lag8 0.161480 0.159870 1.010 0.316206
## z.diff.lag9 0.221071 0.149846 1.475 0.144953
## z.diff.lag10 0.332816 0.131688 2.527 0.013935 *
## z.diff.lag11 0.391267 0.109789 3.564 0.000691 ***
## z.diff.lag12 0.118562 0.076789 1.544 0.127445
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2179 on 65 degrees of freedom
## Multiple R-squared: 0.7682, Adjusted R-squared: 0.7183
## F-statistic: 15.39 on 14 and 65 DF, p-value: 0.000000000000001518
##
##
## Value of test-statistic is: -4.9433 8.3562 12.3832
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.04 -3.45 -3.15
## phi2 6.50 4.88 4.16
## phi3 8.73 6.49 5.47
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 244.7212
## P VALUE:
## Asymptotic p Value: < 0.00000000000000022
##
## Description:
## Fri Mar 17 17:55:27 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.87142, p-value = 0.0000001826
vif(regressao)
## lag(Dipca2003_2010, -1) lag(Dipca2003_2010, -2) lag(Dhiato2003_2010, -1)
## 1.991596 1.894808 1.062127
## DCambio2003_2010
## 1.128444
##
## Time series regression with "ts" data:
## Start = 2011(3), End = 2016(5)
##
## Call:
## dynlm(formula = Var_Dependente ~ Var_Independente1 + Var_Independente2 +
## Var_Independente3 + Var_Independente4)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.74703 -0.13115 0.00514 0.14907 0.78656
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.026553186 0.035571665 0.746 0.45840
## Var_Independente1 0.460620366 0.142014766 3.243 0.00196 **
## Var_Independente2 -0.048757727 0.130993004 -0.372 0.71109
## Var_Independente3 -0.000000114 0.000001241 -0.092 0.92711
## Var_Independente4 0.147076718 0.153421933 0.959 0.34172
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2732 on 58 degrees of freedom
## Multiple R-squared: 0.2294, Adjusted R-squared: 0.1763
## F-statistic: 4.317 on 4 and 58 DF, p-value: 0.003994
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 2.7543, df1 = 19, df2 = 19, p-value = 0.01635
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 7.7085, df = 4, p-value = 0.1029
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 3.09
## P-value: 0.2137
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.9381, p-value = 0.3432
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 3.1636, df = 4, p-value = 0.5308
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 1.7821, df = 4, p-value = 0.7758
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 12.354, df = 12, p-value = 0.4177
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.80088 -0.11096 -0.00407 0.14874 0.75262
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.01953745 0.10908453 0.179 0.859
## z.lag.1 -1.13836006 0.20301345 -5.607 0.00000112 ***
## tt 0.00008071 0.00271873 0.030 0.976
## z.diff.lag 0.07151969 0.14175206 0.505 0.616
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2762 on 46 degrees of freedom
## Multiple R-squared: 0.5544, Adjusted R-squared: 0.5253
## F-statistic: 19.08 on 3 and 46 DF, p-value: 0.00000003507
##
##
## Value of test-statistic is: -5.6073 10.6174 15.8438
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.04 -3.45 -3.15
## phi2 6.50 4.88 4.16
## phi3 8.73 6.49 5.47
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 2.1662
## P VALUE:
## Asymptotic p Value: 0.3385
##
## Description:
## Fri Mar 17 17:55:27 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.98665, p-value = 0.7288
vif(regressao)
## Var_Independente1 Var_Independente2 Var_Independente3 Var_Independente4
## 1.518282 1.285754 1.255542 1.073508
##
## Time series regression with "ts" data:
## Start = 2016(8), End = 2018(12)
##
## Call:
## dynlm(formula = Var_Dependente ~ Var_Independente1 + Var_Independente2 +
## Var_Independente3 + Var_Independente4)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.52602 -0.24945 -0.05231 0.22058 1.54524
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.069639197 0.109370969 -0.637 0.530
## Var_Independente1 0.376034380 0.293026293 1.283 0.212
## Var_Independente2 0.112200869 0.245320533 0.457 0.652
## Var_Independente3 -0.000001342 0.000005309 -0.253 0.803
## Var_Independente4 -0.112780495 0.447664513 -0.252 0.803
##
## Residual standard error: 0.4521 on 24 degrees of freedom
## Multiple R-squared: 0.2285, Adjusted R-squared: 0.09992
## F-statistic: 1.777 on 4 and 24 DF, p-value: 0.1664
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 7.8938, df1 = 2, df2 = 1, p-value = 0.2441
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 4.6092, df = 4, p-value = 0.3298
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 1.24
## P-value: 0.536644
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.938, p-value = 0.391
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 6.5512, df = 4, p-value = 0.1616
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 0.27593, df = 4, p-value = 0.9913
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 3.8925, df = 12, p-value = 0.9853
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## 1 2 3 4 5 6 7 8
## -0.122593 0.173441 -0.076986 0.008062 0.087163 -0.149525 0.150436 0.104479
## 9 10 11 12 13 14 15 16
## -0.389222 0.281264 -0.030997 -0.043127 0.012944 -0.029399 0.045932 -0.021871
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.99312 2.54822 1.175 0.361
## z.lag.1 -5.71080 4.65774 -1.226 0.345
## tt -0.04793 0.12190 -0.393 0.732
## z.diff.lag1 3.18472 4.39436 0.725 0.544
## z.diff.lag2 1.11651 4.04816 0.276 0.809
## z.diff.lag3 -0.98393 3.72753 -0.264 0.817
## z.diff.lag4 -2.62369 3.51104 -0.747 0.533
## z.diff.lag5 -4.26854 3.30453 -1.292 0.326
## z.diff.lag6 -6.02395 3.15035 -1.912 0.196
## z.diff.lag7 -6.68758 3.31276 -2.019 0.181
## z.diff.lag8 -6.18982 3.04851 -2.030 0.179
## z.diff.lag9 -4.61023 2.66116 -1.732 0.225
## z.diff.lag10 -3.03338 1.85497 -1.635 0.244
## z.diff.lag11 -1.11213 1.12021 -0.993 0.425
##
## Residual standard error: 0.4193 on 2 degrees of freedom
## Multiple R-squared: 0.9559, Adjusted R-squared: 0.669
## F-statistic: 3.332 on 13 and 2 DF, p-value: 0.2543
##
##
## Value of test-statistic is: -1.2261 2.1585 3.213
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.15 -3.50 -3.18
## phi2 7.02 5.13 4.31
## phi3 9.31 6.73 5.61
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 36.5643
## P VALUE:
## Asymptotic p Value: 0.00000001149
##
## Description:
## Fri Mar 17 17:55:27 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.86074, p-value = 0.001275
vif(regressao)
## Var_Independente1 Var_Independente2 Var_Independente3 Var_Independente4
## 2.665826 1.862636 1.979505 1.196722
##
## Time series regression with "ts" data:
## Start = 2019(3), End = 2021(12)
##
## Call:
## dynlm(formula = Var_Dependente ~ Var_Independente1 + Var_Independente2 +
## Var_Independente3 + Var_Independente4)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.2358 -0.1853 0.0858 0.3509 0.6644
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.093116927 0.095528690 0.975 0.337744
## Var_Independente1 0.688285222 0.186120642 3.698 0.000902 ***
## Var_Independente2 -0.282964301 0.187213014 -1.511 0.141494
## Var_Independente3 0.000002635 0.000001948 1.353 0.186624
## Var_Independente4 -0.073084190 0.323154057 -0.226 0.822664
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.5123 on 29 degrees of freedom
## Multiple R-squared: 0.3459, Adjusted R-squared: 0.2557
## F-statistic: 3.834 on 4 and 29 DF, p-value: 0.01277
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 0.90964, df1 = 5, df2 = 4, p-value = 0.5519
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 6.3749, df = 4, p-value = 0.1728
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 0.19
## P-value: 0.907368
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.8615, p-value = 0.2544
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 2.028, df = 4, p-value = 0.7306
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 2.9773, df = 4, p-value = 0.5616
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 4.9196, df = 12, p-value = 0.9606
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.82084 -0.11043 0.01338 0.27962 0.54927
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.239833 0.386944 0.620 0.5436
## z.lag.1 -0.825999 0.379331 -2.178 0.0438 *
## tt -0.007308 0.016909 -0.432 0.6710
## z.diff.lag -0.112981 0.257242 -0.439 0.6660
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4267 on 17 degrees of freedom
## Multiple R-squared: 0.4914, Adjusted R-squared: 0.4016
## F-statistic: 5.474 on 3 and 17 DF, p-value: 0.008086
##
##
## Value of test-statistic is: -2.1775 2.3004 3.449
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.15 -3.50 -3.18
## phi2 7.02 5.13 4.31
## phi3 9.31 6.73 5.61
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 2.6545
## P VALUE:
## Asymptotic p Value: 0.2652
##
## Description:
## Fri Mar 17 17:55:28 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.94222, p-value = 0.0718
vif(regressao)
## Var_Independente1 Var_Independente2 Var_Independente3 Var_Independente4
## 1.436112 1.454665 1.050011 1.035440
##
## Time series regression with "ts" data:
## Start = 2003(3), End = 2021(12)
##
## Call:
## dynlm(formula = lnipca1 ~ lag(lnipca1, -1) + lag(lnipca1, -2) +
## lag(lnhiato1, -1) + lnCambio1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.30282 -0.03314 -0.00103 0.03397 0.38995
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.4096059 0.3005344 -1.363 0.174
## lag(lnipca1, -1) 1.4807396 0.0567397 26.097 <0.0000000000000002 ***
## lag(lnipca1, -2) -0.5221242 0.0565823 -9.228 <0.0000000000000002 ***
## lag(lnhiato1, -1) 0.0355144 0.0222035 1.599 0.111
## lnCambio1 0.0003217 0.0265190 0.012 0.990
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07454 on 221 degrees of freedom
## Multiple R-squared: 0.9687, Adjusted R-squared: 0.9681
## F-statistic: 1709 on 4 and 221 DF, p-value: < 0.00000000000000022
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 3.5933, df1 = 101, df2 = 100, p-value = 0.0000000003018
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 31.921, df = 4, p-value = 0.000001986
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 20.42
## P-value: 0.000037
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.8945, p-value = 0.1511
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 7.8105, df = 4, p-value = 0.09877
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 19.009, df = 4, p-value = 0.0007828
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 73.513, df = 12, p-value = 0.00000000007013
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.24222 -0.03209 -0.00389 0.03034 0.32840
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.001099324 0.009504885 0.116 0.908040
## z.lag.1 -0.966195066 0.205146812 -4.710 0.00000464540350 ***
## tt -0.000005754 0.000070995 -0.081 0.935481
## z.diff.lag1 0.061925625 0.203773548 0.304 0.761526
## z.diff.lag2 -0.037244272 0.200153631 -0.186 0.852573
## z.diff.lag3 0.042813296 0.194645740 0.220 0.826132
## z.diff.lag4 0.144924052 0.184832480 0.784 0.433924
## z.diff.lag5 -0.001393727 0.172596452 -0.008 0.993565
## z.diff.lag6 0.085985269 0.159629570 0.539 0.590727
## z.diff.lag7 0.036272399 0.144239133 0.251 0.801707
## z.diff.lag8 0.090870884 0.131581997 0.691 0.490620
## z.diff.lag9 0.246397857 0.113085784 2.179 0.030517 *
## z.diff.lag10 0.301967358 0.088255803 3.422 0.000756 ***
## z.diff.lag11 0.470617448 0.063515613 7.409 0.00000000000354 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06344 on 199 degrees of freedom
## Multiple R-squared: 0.6466, Adjusted R-squared: 0.6235
## F-statistic: 28.01 on 13 and 199 DF, p-value: < 0.00000000000000022
##
##
## Value of test-statistic is: -4.7098 7.472 11.1334
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -3.99 -3.43 -3.13
## phi2 6.22 4.75 4.07
## phi3 8.43 6.49 5.47
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 294.4202
## P VALUE:
## Asymptotic p Value: < 0.00000000000000022
##
## Description:
## Fri Mar 17 17:55:28 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.91348, p-value = 0.0000000003447
vif(regressao)
## lag(lnipca1, -1) lag(lnipca1, -2) lag(lnhiato1, -1) lnCambio1
## 23.155175 23.304882 1.010297 1.050846
##
## Time series regression with "ts" data:
## Start = 2003(3), End = 2009(13)
##
## Call:
## dynlm(formula = lnipca12003_2010 ~ lag(lnipca12003_2010, -1) +
## lag(lnipca12003_2010, -2) + lag(lnhiato12003_2010, -1) +
## lnCambio12003_2010)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.153819 -0.032028 0.000209 0.034616 0.162845
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.54124 0.82351 -0.657 0.513
## lag(lnipca12003_2010, -1) 1.56285 0.08977 17.409 < 0.0000000000000002 ***
## lag(lnipca12003_2010, -2) -0.61203 0.09033 -6.776 0.0000000021 ***
## lag(lnhiato12003_2010, -1) 0.04343 0.06397 0.679 0.499
## lnCambio12003_2010 0.02270 0.04621 0.491 0.625
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.05518 on 78 degrees of freedom
## Multiple R-squared: 0.9846, Adjusted R-squared: 0.9838
## F-statistic: 1244 on 4 and 78 DF, p-value: < 0.00000000000000022
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 0.52141, df1 = 29, df2 = 29, p-value = 0.9576
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 6.5871, df = 4, p-value = 0.1594
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 0.18
## P-value: 0.914976
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.9744, p-value = 0.2986
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 7.5312, df = 4, p-value = 0.1103
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 2.119, df = 4, p-value = 0.7139
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 33.837, df = 12, p-value = 0.0007157
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.08842 -0.03032 -0.00187 0.02655 0.09457
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.00017259 0.01444563 0.012 0.9905
## z.lag.1 -1.04403106 0.42069870 -2.482 0.0161 *
## tt 0.00001732 0.00027523 0.063 0.9501
## z.diff.lag1 0.02039568 0.40969623 0.050 0.9605
## z.diff.lag2 0.07002542 0.39232397 0.178 0.8590
## z.diff.lag3 0.00525374 0.36882996 0.014 0.9887
## z.diff.lag4 0.09180218 0.33624789 0.273 0.7858
## z.diff.lag5 0.01576712 0.30136682 0.052 0.9585
## z.diff.lag6 0.21972896 0.27879571 0.788 0.4339
## z.diff.lag7 -0.07349536 0.25119431 -0.293 0.7709
## z.diff.lag8 -0.14023269 0.22864946 -0.613 0.5422
## z.diff.lag9 0.01530522 0.19752958 0.077 0.9385
## z.diff.lag10 0.10990628 0.16229433 0.677 0.5011
## z.diff.lag11 0.29952487 0.11488722 2.607 0.0117 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04585 on 56 degrees of freedom
## Multiple R-squared: 0.7087, Adjusted R-squared: 0.641
## F-statistic: 10.48 on 13 and 56 DF, p-value: 0.00000000009438
##
##
## Value of test-statistic is: -2.4817 2.2475 3.1214
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.04 -3.45 -3.15
## phi2 6.50 4.88 4.16
## phi3 8.73 6.49 5.47
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 1.3319
## P VALUE:
## Asymptotic p Value: 0.5138
##
## Description:
## Fri Mar 17 17:55:28 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.98406, p-value = 0.396
vif(regressao)
## lag(lnipca12003_2010, -1) lag(lnipca12003_2010, -2)
## 43.199733 45.596892
## lag(lnhiato12003_2010, -1) lnCambio12003_2010
## 1.632289 2.470818
##
## Time series regression with "ts" data:
## Start = 2011(3), End = 2016(5)
##
## Call:
## dynlm(formula = lnipca12011_2016.8 ~ lag(lnipca12011_2016.8,
## -1) + lag(lnipca12011_2016.8, -2) + lag(lnhiato12011_2016.8,
## -1) + lnCambio12011_2016.8)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.086288 -0.022640 0.000766 0.023998 0.106938
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.101011 0.461199 -0.219 0.827405
## lag(lnipca12011_2016.8, -1) 1.405751 0.117778 11.936 < 0.0000000000000002
## lag(lnipca12011_2016.8, -2) -0.455020 0.123859 -3.674 0.000523
## lag(lnhiato12011_2016.8, -1) 0.008224 0.030867 0.266 0.790840
## lnCambio12011_2016.8 0.058392 0.045617 1.280 0.205619
##
## (Intercept)
## lag(lnipca12011_2016.8, -1) ***
## lag(lnipca12011_2016.8, -2) ***
## lag(lnhiato12011_2016.8, -1)
## lnCambio12011_2016.8
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03765 on 58 degrees of freedom
## Multiple R-squared: 0.9697, Adjusted R-squared: 0.9676
## F-statistic: 464.6 on 4 and 58 DF, p-value: < 0.00000000000000022
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 1.3861, df1 = 19, df2 = 19, p-value = 0.2417
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 1.334, df = 4, p-value = 0.8556
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 0.25
## P-value: 0.881011
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 2.0284, p-value = 0.3679
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 3.151, df = 4, p-value = 0.5329
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 3.0484, df = 4, p-value = 0.5498
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 15.115, df = 12, p-value = 0.2352
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.081065 -0.020972 0.000448 0.021335 0.097773
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.0105243 0.0146017 -0.721 0.475
## z.lag.1 -1.2761628 0.2106505 -6.058 0.000000237 ***
## tt 0.0002900 0.0003622 0.801 0.427
## z.diff.lag 0.0988440 0.1398999 0.707 0.483
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0362 on 46 degrees of freedom
## Multiple R-squared: 0.6099, Adjusted R-squared: 0.5845
## F-statistic: 23.98 on 3 and 46 DF, p-value: 0.000000001718
##
##
## Value of test-statistic is: -6.0582 12.4056 18.4412
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.04 -3.45 -3.15
## phi2 6.50 4.88 4.16
## phi3 8.73 6.49 5.47
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 0.89
## P VALUE:
## Asymptotic p Value: 0.6408
##
## Description:
## Fri Mar 17 17:55:29 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.98008, p-value = 0.3987
vif(regressao)
## lag(lnipca12011_2016.8, -1) lag(lnipca12011_2016.8, -2)
## 25.769306 27.569023
## lag(lnhiato12011_2016.8, -1) lnCambio12011_2016.8
## 2.138323 2.402437
##
## Time series regression with "ts" data:
## Start = 2016(8), End = 2018(12)
##
## Call:
## dynlm(formula = lnipca12016.9_2018 ~ lag(lnipca12016.9_2018,
## -1) + lag(lnipca12016.9_2018, -2) + lag(lnhiato12016.9_2018,
## -1) + lnCambio12016.9_2018)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.17028 -0.04969 0.00776 0.03613 0.34587
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.4723 2.5265 0.979 0.3376
## lag(lnipca12016.9_2018, -1) 1.1039 0.1952 5.656 0.00000798 ***
## lag(lnipca12016.9_2018, -2) -0.2389 0.1840 -1.298 0.2066
## lag(lnhiato12016.9_2018, -1) -0.2756 0.2267 -1.216 0.2358
## lnCambio12016.9_2018 0.8302 0.4655 1.783 0.0872 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.09972 on 24 degrees of freedom
## Multiple R-squared: 0.9416, Adjusted R-squared: 0.9319
## F-statistic: 96.79 on 4 and 24 DF, p-value: 0.00000000000001925
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 8.8031, df1 = 2, df2 = 1, p-value = 0.2318
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 7.7446, df = 4, p-value = 0.1014
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 0.54
## P-value: 0.764458
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 2.1287, p-value = 0.4036
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 3.3907, df = 4, p-value = 0.4947
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 0.45196, df = 4, p-value = 0.978
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 4.332, df = 12, p-value = 0.9767
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## 1 2 3 4 5 6 7 8
## -0.025906 0.057791 -0.041424 -0.005119 0.028039 -0.034052 0.019812 0.021119
## 9 10 11 12 13 14 15 16
## -0.052211 0.037369 -0.006347 0.009019 -0.003150 0.004466 0.001708 -0.011116
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.49657 0.70074 -0.709 0.608
## z.lag.1 -10.33117 6.43349 -1.606 0.355
## tt 0.02298 0.03252 0.707 0.608
## z.diff.lag1 8.35818 6.06148 1.379 0.399
## z.diff.lag2 7.01661 5.54133 1.266 0.426
## z.diff.lag3 5.82941 4.73634 1.231 0.434
## z.diff.lag4 5.19848 4.05824 1.281 0.422
## z.diff.lag5 4.44166 3.20178 1.387 0.398
## z.diff.lag6 3.83205 2.43466 1.574 0.360
## z.diff.lag7 2.90842 2.24535 1.295 0.419
## z.diff.lag8 2.90733 1.89744 1.532 0.368
## z.diff.lag9 2.71026 1.44159 1.880 0.311
## z.diff.lag10 1.35273 1.03566 1.306 0.416
## z.diff.lag11 2.15766 1.07715 2.003 0.295
## z.diff.lag12 1.78316 1.34912 1.322 0.412
##
## Residual standard error: 0.1137 on 1 degrees of freedom
## Multiple R-squared: 0.9709, Adjusted R-squared: 0.5638
## F-statistic: 2.385 on 14 and 1 DF, p-value: 0.4723
##
##
## Value of test-statistic is: -1.6058 2.0519 2.6659
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.15 -3.50 -3.18
## phi2 7.02 5.13 4.31
## phi3 9.31 6.73 5.61
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 43.1263
## P VALUE:
## Asymptotic p Value: 0.0000000004318
##
## Description:
## Fri Mar 17 17:55:29 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.86455, p-value = 0.001538
vif(regressao)
## lag(lnipca12016.9_2018, -1) lag(lnipca12016.9_2018, -2)
## 17.944250 17.908241
## lag(lnhiato12016.9_2018, -1) lnCambio12016.9_2018
## 7.029376 4.208471
##
## Time series regression with "ts" data:
## Start = 2019(3), End = 2021(12)
##
## Call:
## dynlm(formula = lnipca12019_2021 ~ lag(lnipca12019_2021, -1) +
## lag(lnipca12019_2021, -2) + lag(lnhiato12019_2021, -1) +
## lnCambio12019_2021)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.32783 -0.06717 0.00465 0.07779 0.27026
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.6782 1.8557 0.904 0.373
## lag(lnipca12019_2021, -1) 1.3843 0.1756 7.885 0.0000000107 ***
## lag(lnipca12019_2021, -2) -0.4768 0.1779 -2.681 0.012 *
## lag(lnhiato12019_2021, -1) -0.0622 0.1357 -0.458 0.650
## lnCambio12019_2021 -0.3996 0.3714 -1.076 0.291
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1358 on 29 degrees of freedom
## Multiple R-squared: 0.9379, Adjusted R-squared: 0.9293
## F-statistic: 109.4 on 4 and 29 DF, p-value: < 0.00000000000000022
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 0.03362, df1 = 5, df2 = 4, p-value = 0.9989
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 5.6823, df = 4, p-value = 0.2242
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 3.33
## P-value: 0.189118
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.6986, p-value = 0.06573
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 6.9429, df = 4, p-value = 0.1389
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 5.2157, df = 4, p-value = 0.2659
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 17.784, df = 12, p-value = 0.1224
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.14034 -0.06150 -0.01285 0.06129 0.11368
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.149971 0.096794 -1.549 0.14360
## z.lag.1 -1.963343 0.512152 -3.834 0.00183 **
## tt 0.008053 0.004262 1.889 0.07972 .
## z.diff.lag1 0.917894 0.411004 2.233 0.04237 *
## z.diff.lag2 0.608439 0.357945 1.700 0.11127
## z.diff.lag3 0.548695 0.232314 2.362 0.03320 *
## z.diff.lag4 0.420338 0.176834 2.377 0.03226 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08563 on 14 degrees of freedom
## Multiple R-squared: 0.6918, Adjusted R-squared: 0.5597
## F-statistic: 5.238 on 6 and 14 DF, p-value: 0.005082
##
##
## Value of test-statistic is: -3.8335 5.4079 7.7452
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.15 -3.50 -3.18
## phi2 7.02 5.13 4.31
## phi3 9.31 6.73 5.61
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 0.66
## P VALUE:
## Asymptotic p Value: 0.7189
##
## Description:
## Fri Mar 17 17:55:29 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.98239, p-value = 0.8446
vif(regressao)
## lag(lnipca12019_2021, -1) lag(lnipca12019_2021, -2)
## 13.312753 12.280156
## lag(lnhiato12019_2021, -1) lnCambio12019_2021
## 1.166828 1.647516
##
## Time series regression with "ts" data:
## Start = 2003(4), End = 2021(12)
##
## Call:
## dynlm(formula = Dlnipca1 ~ lag(Dlnipca1, -1) + lag(Dlnipca1,
## -2) + lag(Dlnhiato1, -1) + DlnCambio1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.28175 -0.03675 0.00509 0.03184 0.42103
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.001307 0.005080 -0.257 0.7972
## lag(Dlnipca1, -1) 0.605807 0.069267 8.746 0.000000000000000581 ***
## lag(Dlnipca1, -2) -0.143239 0.067012 -2.138 0.0337 *
## lag(Dlnhiato1, -1) 0.120410 0.120319 1.001 0.3180
## DlnCambio1 0.065390 0.110912 0.590 0.5561
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07612 on 220 degrees of freedom
## Multiple R-squared: 0.282, Adjusted R-squared: 0.2689
## F-statistic: 21.6 on 4 and 220 DF, p-value: 0.000000000000004797
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 3.4438, df1 = 100, df2 = 100, p-value = 0.00000000107
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 1.2924, df = 4, p-value = 0.8627
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 8.93
## P-value: 0.011487
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.9708, p-value = 0.3827
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 6.435, df = 4, p-value = 0.1689
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 11.581, df = 4, p-value = 0.02076
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 66.447, df = 12, p-value = 0.000000001471
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.24384 -0.03391 -0.00614 0.03382 0.34497
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.0014059 0.0098583 -0.143 0.886745
## z.lag.1 -1.0893776 0.1963265 -5.549 0.000000091476504 ***
## tt 0.0000320 0.0000743 0.431 0.667192
## z.diff.lag1 0.1351980 0.1916928 0.705 0.481462
## z.diff.lag2 0.0945206 0.1857008 0.509 0.611323
## z.diff.lag3 0.1742041 0.1784313 0.976 0.330103
## z.diff.lag4 0.2694368 0.1683524 1.600 0.111097
## z.diff.lag5 0.1039575 0.1574954 0.660 0.509978
## z.diff.lag6 0.1596579 0.1462277 1.092 0.276228
## z.diff.lag7 0.1059108 0.1331299 0.796 0.427249
## z.diff.lag8 0.1441683 0.1231072 1.171 0.242974
## z.diff.lag9 0.2815104 0.1078234 2.611 0.009723 **
## z.diff.lag10 0.3300819 0.0868802 3.799 0.000193 ***
## z.diff.lag11 0.4771807 0.0619208 7.706 0.000000000000611 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06468 on 198 degrees of freedom
## Multiple R-squared: 0.6609, Adjusted R-squared: 0.6387
## F-statistic: 29.69 on 13 and 198 DF, p-value: < 0.00000000000000022
##
##
## Value of test-statistic is: -5.5488 10.4898 15.6635
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -3.99 -3.43 -3.13
## phi2 6.22 4.75 4.07
## phi3 8.43 6.49 5.47
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 387.9929
## P VALUE:
## Asymptotic p Value: < 0.00000000000000022
##
## Description:
## Fri Mar 17 17:55:29 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.90024, p-value = 0.00000000004362
vif(regressao)
## lag(Dlnipca1, -1) lag(Dlnipca1, -2) lag(Dlnhiato1, -1) DlnCambio1
## 1.468509 1.381042 1.069721 1.030642
## Warning in window.default(x, ...): 'start' value not changed
## Warning in window.default(x, ...): 'start' value not changed
## Warning in window.default(x, ...): 'start' value not changed
##
## Time series regression with "ts" data:
## Start = 2003(4), End = 2010(12)
##
## Call:
## dynlm(formula = Var_Dependente ~ Var_Independente1 + Var_Independente2 +
## Var_Independente3 + Var_Independente4)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.187432 -0.031729 0.006054 0.029833 0.169732
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.003178 0.006028 -0.527 0.599
## Var_Independente1 0.731293 0.109248 6.694 0.00000000195 ***
## Var_Independente2 -0.121817 0.105663 -1.153 0.252
## Var_Independente3 0.240567 0.190694 1.262 0.210
## Var_Independente4 0.117594 0.141388 0.832 0.408
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.05544 on 88 degrees of freedom
## Multiple R-squared: 0.4246, Adjusted R-squared: 0.3984
## F-statistic: 16.23 on 4 and 88 DF, p-value: 0.0000000005408
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 0.32345, df1 = 34, df2 = 34, p-value = 0.9993
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 1.8753, df = 4, p-value = 0.7587
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 0.54
## P-value: 0.763909
dwtest(regressao)
## Warning in dwtest(regressao): exact p value cannot be computed (not in [0,1]),
## approximate p value will be used
##
## Durbin-Watson test
##
## data: regressao
## DW = 2.0345, p-value = 0.5084
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 6.1704, df = 4, p-value = 0.1868
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 0.090219, df = 4, p-value = 0.999
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 29.676, df = 12, p-value = 0.003124
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.085006 -0.026531 -0.009382 0.032815 0.080122
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.0002754 0.0131797 0.021 0.983389
## z.lag.1 -1.6309317 0.3850666 -4.235 0.0000722 ***
## tt 0.0001135 0.0002331 0.487 0.628091
## z.diff.lag1 0.5882019 0.3616459 1.626 0.108618
## z.diff.lag2 0.6199414 0.3327916 1.863 0.066934 .
## z.diff.lag3 0.4839102 0.3053743 1.585 0.117827
## z.diff.lag4 0.4811012 0.2743641 1.754 0.084157 .
## z.diff.lag5 0.2960593 0.2476515 1.195 0.236182
## z.diff.lag6 0.4617386 0.2368999 1.949 0.055537 .
## z.diff.lag7 0.1470536 0.2208061 0.666 0.507742
## z.diff.lag8 0.0792077 0.2029851 0.390 0.697635
## z.diff.lag9 0.1799523 0.1769308 1.017 0.312831
## z.diff.lag10 0.2379720 0.1477519 1.611 0.112035
## z.diff.lag11 0.3632081 0.1013898 3.582 0.000646 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04356 on 66 degrees of freedom
## Multiple R-squared: 0.7331, Adjusted R-squared: 0.6806
## F-statistic: 13.95 on 13 and 66 DF, p-value: 0.00000000000002928
##
##
## Value of test-statistic is: -4.2355 6.4356 9.4351
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.04 -3.45 -3.15
## phi2 6.50 4.88 4.16
## phi3 8.73 6.49 5.47
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 6.2303
## P VALUE:
## Asymptotic p Value: 0.04437
##
## Description:
## Fri Mar 17 17:55:30 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.98038, p-value = 0.1755
vif(regressao)
## Var_Independente1 Var_Independente2 Var_Independente3 Var_Independente4
## 1.824251 1.713469 1.052189 1.141788
##
## Time series regression with "ts" data:
## Start = 2011(3), End = 2016(5)
##
## Call:
## dynlm(formula = Var_Dependente ~ Var_Independente1 + Var_Independente2 +
## Var_Independente3 + Var_Independente4)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.086982 -0.020903 -0.002089 0.026534 0.116081
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.004130 0.005088 0.812 0.42027
## Var_Independente1 0.450533 0.136780 3.294 0.00169 **
## Var_Independente2 0.036859 0.131203 0.281 0.77976
## Var_Independente3 0.068913 0.123909 0.556 0.58024
## Var_Independente4 0.022874 0.101011 0.226 0.82165
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03847 on 58 degrees of freedom
## Multiple R-squared: 0.2083, Adjusted R-squared: 0.1537
## F-statistic: 3.814 on 4 and 58 DF, p-value: 0.008061
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 1.3853, df1 = 19, df2 = 19, p-value = 0.2421
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 3.169, df = 4, p-value = 0.5299
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 1.65
## P-value: 0.437283
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.9809, p-value = 0.4121
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 0.21413, df = 4, p-value = 0.9947
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 3.0901, df = 4, p-value = 0.5429
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 13.679, df = 12, p-value = 0.3217
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.088080 -0.019232 -0.001902 0.023291 0.108607
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.00170707 0.01490617 0.115 0.909
## z.lag.1 -1.19451062 0.20233419 -5.904 0.000000404 ***
## tt 0.00006146 0.00037189 0.165 0.869
## z.diff.lag 0.07429475 0.13788544 0.539 0.593
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03765 on 46 degrees of freedom
## Multiple R-squared: 0.5875, Adjusted R-squared: 0.5606
## F-statistic: 21.84 on 3 and 46 DF, p-value: 0.0000000061
##
##
## Value of test-statistic is: -5.9037 11.8167 17.5926
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.04 -3.45 -3.15
## phi2 6.50 4.88 4.16
## phi3 8.73 6.49 5.47
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 1.7941
## P VALUE:
## Asymptotic p Value: 0.4078
##
## Description:
## Fri Mar 17 17:55:30 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.97759, p-value = 0.3047
vif(regressao)
## Var_Independente1 Var_Independente2 Var_Independente3 Var_Independente4
## 1.370628 1.257415 1.154596 1.059229
##
## Time series regression with "ts" data:
## Start = 2016(8), End = 2018(12)
##
## Call:
## dynlm(formula = Var_Dependente ~ Var_Independente1 + Var_Independente2 +
## Var_Independente3 + Var_Independente4)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.11527 -0.05866 -0.01437 0.02643 0.40262
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.001709 0.027347 -0.062 0.951
## Var_Independente1 0.144672 0.297085 0.487 0.631
## Var_Independente2 0.134692 0.227414 0.592 0.559
## Var_Independente3 -0.790301 0.808296 -0.978 0.338
## Var_Independente4 -0.152158 0.588822 -0.258 0.798
##
## Residual standard error: 0.1118 on 24 degrees of freedom
## Multiple R-squared: 0.1789, Adjusted R-squared: 0.04209
## F-statistic: 1.308 on 4 and 24 DF, p-value: 0.2954
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 30.533, df1 = 2, df2 = 1, p-value = 0.1269
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 2.9335, df = 4, p-value = 0.569
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 2
## P-value: 0.367057
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.8572, p-value = 0.3233
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 7.4464, df = 4, p-value = 0.1141
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 0.2732, df = 4, p-value = 0.9915
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 3.9348, df = 12, p-value = 0.9846
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## 1 2 3 4 5 6 7
## -0.0509288 0.0893962 -0.0452669 -0.0037552 0.0168140 -0.0288752 0.0145431
## 8 9 10 11 12 13 14
## 0.0228070 -0.0452846 0.0543909 -0.0237325 0.0080014 0.0010941 -0.0002696
## 15 16
## 0.0109335 -0.0198673
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.73603 1.59504 -0.461 0.725
## z.lag.1 -8.53124 10.14770 -0.841 0.555
## tt 0.04596 0.08130 0.565 0.672
## z.diff.lag1 6.53873 9.81735 0.666 0.626
## z.diff.lag2 5.25973 9.36063 0.562 0.674
## z.diff.lag3 4.15405 8.56437 0.485 0.712
## z.diff.lag4 3.63780 7.83281 0.464 0.723
## z.diff.lag5 2.77839 6.84714 0.406 0.755
## z.diff.lag6 1.59140 5.59434 0.284 0.824
## z.diff.lag7 0.94060 4.57336 0.206 0.871
## z.diff.lag8 1.27201 3.43179 0.371 0.774
## z.diff.lag9 1.98513 2.55462 0.777 0.579
## z.diff.lag10 1.65136 2.02202 0.817 0.564
## z.diff.lag11 1.95978 1.59826 1.226 0.436
## z.diff.lag12 1.28713 1.30313 0.988 0.504
##
## Residual standard error: 0.1437 on 1 degrees of freedom
## Multiple R-squared: 0.96, Adjusted R-squared: 0.4001
## F-statistic: 1.715 on 14 and 1 DF, p-value: 0.5423
##
##
## Value of test-statistic is: -0.8407 1.7542 1.9501
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.15 -3.50 -3.18
## phi2 7.02 5.13 4.31
## phi3 9.31 6.73 5.61
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 63.3003
## P VALUE:
## Asymptotic p Value: 0.00000000000001799
##
## Description:
## Fri Mar 17 17:55:30 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.8134, p-value = 0.0001466
vif(regressao)
## Var_Independente1 Var_Independente2 Var_Independente3 Var_Independente4
## 2.564944 1.470376 2.075427 1.195578
##
## Time series regression with "ts" data:
## Start = 2019(3), End = 2021(12)
##
## Call:
## dynlm(formula = Var_Dependente ~ Var_Independente1 + Var_Independente2 +
## Var_Independente3 + Var_Independente4)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.29235 -0.07259 0.01418 0.06614 0.25793
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.01818 0.02376 0.765 0.45046
## Var_Independente1 0.64786 0.18083 3.583 0.00123 **
## Var_Independente2 -0.33968 0.17642 -1.925 0.06403 .
## Var_Independente3 0.16304 0.34469 0.473 0.63976
## Var_Independente4 -0.06852 0.47846 -0.143 0.88712
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.134 on 29 degrees of freedom
## Multiple R-squared: 0.3172, Adjusted R-squared: 0.223
## F-statistic: 3.368 on 4 and 29 DF, p-value: 0.02215
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 0.29525, df1 = 5, df2 = 4, p-value = 0.8934
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 4.721, df = 4, p-value = 0.3171
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 2.22
## P-value: 0.330189
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.8235, p-value = 0.2209
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 7.3405, df = 4, p-value = 0.119
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 3.4332, df = 4, p-value = 0.4881
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 14.476, df = 12, p-value = 0.2714
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.13121 -0.06497 -0.01486 0.04579 0.16761
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.0336158 0.0975624 0.345 0.7355
## z.lag.1 -0.9513216 0.4339440 -2.192 0.0458 *
## tt -0.0004764 0.0042639 -0.112 0.9126
## z.diff.lag1 0.0741531 0.3821793 0.194 0.8489
## z.diff.lag2 0.0996220 0.3488547 0.286 0.7794
## z.diff.lag3 0.3384508 0.2630304 1.287 0.2191
## z.diff.lag4 0.3781769 0.1913461 1.976 0.0682 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.09913 on 14 degrees of freedom
## Multiple R-squared: 0.5994, Adjusted R-squared: 0.4277
## F-statistic: 3.491 on 6 and 14 DF, p-value: 0.02526
##
##
## Value of test-statistic is: -2.1923 2.3997 3.527
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.15 -3.50 -3.18
## phi2 7.02 5.13 4.31
## phi3 9.31 6.73 5.61
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 0.7118
## P VALUE:
## Asymptotic p Value: 0.7005
##
## Description:
## Fri Mar 17 17:55:31 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.97421, p-value = 0.5864
vif(regressao)
## Var_Independente1 Var_Independente2 Var_Independente3 Var_Independente4
## 1.372415 1.306163 1.035538 1.059124
\[\pi _t = \alpha ^f_1+\pi_{t-1}+\alpha^f_2E_t(\pi_{t+1})+\alpha^f_3h_{t-1}+\alpha^f_4\Delta (p^F_t+e_t)+\varepsilon ^f_t \]
##
## Time series regression with "ts" data:
## Start = 2003(2), End = 2021(12)
##
## Call:
## dynlm(formula = ipca ~ lag(ipca, -1) + eipca + lag(hiato, -1) +
## Cambio)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.23401 -0.25225 0.00631 0.21913 1.56003
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.73979007204 0.22254632791 -3.324 0.00104 **
## lag(ipca, -1) 0.88116201091 0.01853417832 47.543 < 0.0000000000000002 ***
## eipca 0.27047395882 0.04341363345 6.230 0.00000000231 ***
## lag(hiato, -1) -0.00000004853 0.00000021447 -0.226 0.82120
## Cambio 0.01527813153 0.03292011496 0.464 0.64303
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4537 on 222 degrees of freedom
## Multiple R-squared: 0.9746, Adjusted R-squared: 0.9741
## F-statistic: 2128 on 4 and 222 DF, p-value: < 0.00000000000000022
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 1.2644, df1 = 101, df2 = 101, p-value = 0.12
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 35.758, df = 4, p-value = 0.0000003245
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 13.53
## P-value: 0.001154
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 0.69217, p-value < 0.00000000000000022
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 116.14, df = 4, p-value < 0.00000000000000022
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 55.858, df = 4, p-value = 0.00000000002148
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 186.6, df = 12, p-value < 0.00000000000000022
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.74454 -0.15983 0.00578 0.15726 1.16929
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.0368725 0.0442287 -0.834 0.40546
## z.lag.1 -0.3766490 0.0933708 -4.034 0.0000782 ***
## tt 0.0003556 0.0003282 1.084 0.27984
## z.diff.lag1 0.0111518 0.0968891 0.115 0.90848
## z.diff.lag2 -0.0364814 0.0978680 -0.373 0.70972
## z.diff.lag3 0.0726235 0.0983866 0.738 0.46130
## z.diff.lag4 0.1113153 0.0927219 1.201 0.23136
## z.diff.lag5 -0.0076628 0.0872137 -0.088 0.93007
## z.diff.lag6 0.1022116 0.0824954 1.239 0.21681
## z.diff.lag7 -0.0645548 0.0815654 -0.791 0.42962
## z.diff.lag8 0.0339458 0.0764194 0.444 0.65738
## z.diff.lag9 0.1253187 0.0733524 1.708 0.08911 .
## z.diff.lag10 0.2029498 0.0704410 2.881 0.00440 **
## z.diff.lag11 0.2190627 0.0658045 3.329 0.00104 **
## z.diff.lag12 -0.1816940 0.0637593 -2.850 0.00484 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.274 on 199 degrees of freedom
## Multiple R-squared: 0.3875, Adjusted R-squared: 0.3444
## F-statistic: 8.991 on 14 and 199 DF, p-value: 0.000000000000004086
##
##
## Value of test-statistic is: -4.0339 5.684 8.1933
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -3.99 -3.43 -3.13
## phi2 6.22 4.75 4.07
## phi3 8.43 6.49 5.47
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 108.6282
## P VALUE:
## Asymptotic p Value: < 0.00000000000000022
##
## Description:
## Fri Mar 17 17:55:31 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.9557, p-value = 0.000001838
vif(regressao)
## lag(ipca, -1) eipca lag(hiato, -1) Cambio
## 3.091579 2.963252 1.184547 1.242029
##
## Time series regression with "ts" data:
## Start = 2003(2), End = 2010(12)
##
## Call:
## dynlm(formula = ipca2003_2010 ~ lag(ipca2003_2010, -1) + eipca2003_2010 +
## lag(hiato2003_2010, -1) + Cambio2003_2010)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.82244 -0.18586 0.06247 0.21930 0.98605
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) -0.8538423916 0.2908325393 -2.936
## lag(ipca2003_2010, -1) 0.8563819824 0.0220758462 38.793
## eipca2003_2010 0.4828518618 0.0596870651 8.090
## lag(hiato2003_2010, -1) -0.0000003323 0.0000006256 -0.531
## Cambio2003_2010 -0.1457747507 0.0538890980 -2.705
## Pr(>|t|)
## (Intercept) 0.00422 **
## lag(ipca2003_2010, -1) < 0.0000000000000002 ***
## eipca2003_2010 0.00000000000266 ***
## lag(hiato2003_2010, -1) 0.59664
## Cambio2003_2010 0.00817 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4226 on 90 degrees of freedom
## Multiple R-squared: 0.9853, Adjusted R-squared: 0.9846
## F-statistic: 1505 on 4 and 90 DF, p-value: < 0.00000000000000022
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 0.127, df1 = 35, df2 = 35, p-value = 1
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 24.007, df = 4, p-value = 0.00007962
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 11.75
## P-value: 0.002812
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 0.76752, p-value = 0.0000000000003576
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 40.924, df = 4, p-value = 0.00000002787
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 29.432, df = 4, p-value = 0.000006386
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 56.772, df = 12, p-value = 0.00000008691
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.36665 -0.13498 -0.00953 0.10239 0.51102
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.113214 0.058502 1.935 0.05713 .
## z.lag.1 -0.434027 0.126225 -3.439 0.00100 **
## tt -0.001807 0.001002 -1.804 0.07568 .
## z.diff.lag1 -0.082149 0.143715 -0.572 0.56947
## z.diff.lag2 0.039468 0.142797 0.276 0.78308
## z.diff.lag3 -0.056395 0.143116 -0.394 0.69478
## z.diff.lag4 0.071674 0.117282 0.611 0.54315
## z.diff.lag5 0.068132 0.103002 0.661 0.51055
## z.diff.lag6 0.089964 0.097883 0.919 0.36129
## z.diff.lag7 -0.147817 0.092276 -1.602 0.11381
## z.diff.lag8 -0.048038 0.091305 -0.526 0.60051
## z.diff.lag9 0.068729 0.084339 0.815 0.41797
## z.diff.lag10 0.193709 0.080708 2.400 0.01913 *
## z.diff.lag11 0.209309 0.073918 2.832 0.00609 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2007 on 68 degrees of freedom
## Multiple R-squared: 0.5332, Adjusted R-squared: 0.4439
## F-statistic: 5.974 on 13 and 68 DF, p-value: 0.0000003102
##
##
## Value of test-statistic is: -3.4385 5.9556 8.7624
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.04 -3.45 -3.15
## phi2 6.50 4.88 4.16
## phi3 8.73 6.49 5.47
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 76.8795
## P VALUE:
## Asymptotic p Value: < 0.00000000000000022
##
## Description:
## Fri Mar 17 17:55:31 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.92598, p-value = 0.00004618
vif(regressao)
## lag(ipca2003_2010, -1) eipca2003_2010 lag(hiato2003_2010, -1)
## 3.153858 3.137254 1.490383
## Cambio2003_2010
## 2.402122
##
## Time series regression with "ts" data:
## Start = 2011(2), End = 2016(5)
##
## Call:
## dynlm(formula = ipca2011_2016.8 ~ lag(ipca2011_2016.8, -1) +
## eipca2011_2016.8 + lag(hiato2011_2016.8, -1) + Cambio2011_2016.8)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.90875 -0.17277 -0.00182 0.20980 0.63017
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) -0.7400232376 0.4239794334 -1.745
## lag(ipca2011_2016.8, -1) 0.9515487464 0.0588010848 16.183
## eipca2011_2016.8 0.1288743526 0.1140378635 1.130
## lag(hiato2011_2016.8, -1) 0.0000001608 0.0000003752 0.429
## Cambio2011_2016.8 0.0755001809 0.0952770552 0.792
## Pr(>|t|)
## (Intercept) 0.0861 .
## lag(ipca2011_2016.8, -1) <0.0000000000000002 ***
## eipca2011_2016.8 0.2630
## lag(hiato2011_2016.8, -1) 0.6698
## Cambio2011_2016.8 0.4313
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2917 on 59 degrees of freedom
## Multiple R-squared: 0.9674, Adjusted R-squared: 0.9651
## F-statistic: 437 on 4 and 59 DF, p-value: < 0.00000000000000022
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 1.4848, df1 = 20, df2 = 19, p-value = 0.1967
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 6.4038, df = 4, p-value = 0.171
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 4.8
## P-value: 0.090517
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.0617, p-value = 0.000003354
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 18.315, df = 4, p-value = 0.001071
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 4.892, df = 4, p-value = 0.2986
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 47.213, df = 12, p-value = 0.000004281
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.6917 -0.1219 -0.0113 0.1265 0.6421
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.074041 0.109104 -0.679 0.501188
## z.lag.1 -1.085849 0.284941 -3.811 0.000457 ***
## tt 0.001559 0.002686 0.580 0.564962
## z.diff.lag1 0.360403 0.253200 1.423 0.162188
## z.diff.lag2 0.332738 0.252941 1.315 0.195659
## z.diff.lag3 0.408384 0.242889 1.681 0.100297
## z.diff.lag4 0.477853 0.230302 2.075 0.044312 *
## z.diff.lag5 0.529573 0.204625 2.588 0.013294 *
## z.diff.lag6 0.714059 0.182978 3.902 0.000347 ***
## z.diff.lag7 0.270614 0.172091 1.573 0.123520
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2437 on 41 degrees of freedom
## Multiple R-squared: 0.5006, Adjusted R-squared: 0.391
## F-statistic: 4.567 on 9 and 41 DF, p-value: 0.0003319
##
##
## Value of test-statistic is: -3.8108 5.2956 7.9413
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.04 -3.45 -3.15
## phi2 6.50 4.88 4.16
## phi3 8.73 6.49 5.47
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 2.8101
## P VALUE:
## Asymptotic p Value: 0.2454
##
## Description:
## Fri Mar 17 17:55:31 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.98361, p-value = 0.5547
vif(regressao)
## lag(ipca2011_2016.8, -1) eipca2011_2016.8 lag(hiato2011_2016.8, -1)
## 6.055965 2.908851 2.836256
## Cambio2011_2016.8
## 3.938820
##
## Time series regression with "ts" data:
## Start = 2016(7), End = 2018(12)
##
## Call:
## dynlm(formula = ipca2016.9_2018 ~ lag(ipca2016.9_2018, -1) +
## eipca2016.9_2018 + lag(hiato2016.9_2018, -1) + Cambio2016.9_2018)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.54276 -0.25877 -0.01249 0.15930 0.58407
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -5.027314532 1.547577301 -3.249 0.003299
## lag(ipca2016.9_2018, -1) 0.879443490 0.048192395 18.249 0.00000000000000058
## eipca2016.9_2018 0.826203207 0.194719640 4.243 0.000265
## lag(hiato2016.9_2018, -1) 0.000001899 0.000001431 1.327 0.196362
## Cambio2016.9_2018 0.425813765 0.275556117 1.545 0.134842
##
## (Intercept) **
## lag(ipca2016.9_2018, -1) ***
## eipca2016.9_2018 ***
## lag(hiato2016.9_2018, -1)
## Cambio2016.9_2018
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3181 on 25 degrees of freedom
## Multiple R-squared: 0.9777, Adjusted R-squared: 0.9742
## F-statistic: 274.2 on 4 and 25 DF, p-value: < 0.00000000000000022
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 2.4226, df1 = 3, df2 = 2, p-value = 0.3056
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 10.088, df = 4, p-value = 0.03897
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 0.02
## P-value: 0.988943
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.5336, p-value = 0.02676
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 2.7719, df = 4, p-value = 0.5967
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 6.468, df = 4, p-value = 0.1668
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 8.3627, df = 12, p-value = 0.7562
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## 1 2 3 4 5 6 7 8
## 0.02313 -0.03131 -0.09800 0.16662 -0.06836 -0.08697 0.14282 -0.04225
## 9 10 11 12 13 14 15 16
## 0.09368 -0.18445 0.03822 0.13257 -0.06621 -0.01598 0.04934 -0.10193
## 17
## 0.04907
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.79672 1.12359 -0.709 0.552
## z.lag.1 -4.93656 3.09810 -1.593 0.252
## tt 0.04193 0.05323 0.788 0.513
## z.diff.lag1 3.94091 2.83870 1.388 0.299
## z.diff.lag2 3.24357 2.63938 1.229 0.344
## z.diff.lag3 2.99796 2.39034 1.254 0.336
## z.diff.lag4 2.88059 2.19584 1.312 0.320
## z.diff.lag5 2.25769 1.86314 1.212 0.349
## z.diff.lag6 1.92928 1.64824 1.171 0.362
## z.diff.lag7 2.00381 1.54128 1.300 0.323
## z.diff.lag8 1.03259 1.22593 0.842 0.488
## z.diff.lag9 1.54596 0.82623 1.871 0.202
## z.diff.lag10 0.67291 0.68278 0.986 0.428
## z.diff.lag11 0.89127 0.59136 1.507 0.271
## z.diff.lag12 0.66734 0.45955 1.452 0.284
##
## Residual standard error: 0.2784 on 2 degrees of freedom
## Multiple R-squared: 0.9392, Adjusted R-squared: 0.514
## F-statistic: 2.209 on 14 and 2 DF, p-value: 0.3552
##
##
## Value of test-statistic is: -1.5934 2.7898 3.7434
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.15 -3.50 -3.18
## phi2 7.02 5.13 4.31
## phi3 9.31 6.73 5.61
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 0.8431
## P VALUE:
## Asymptotic p Value: 0.656
##
## Description:
## Fri Mar 17 17:55:32 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.98022, p-value = 0.8313
vif(regressao)
## lag(ipca2016.9_2018, -1) eipca2016.9_2018 lag(hiato2016.9_2018, -1)
## 3.022270 3.109767 8.822912
## Cambio2016.9_2018
## 3.997206
##
## Time series regression with "ts" data:
## Start = 2019(2), End = 2021(12)
##
## Call:
## dynlm(formula = ipca2019_2021 ~ lag(ipca2019_2021, -1) + eipca2019_2021 +
## lag(hiato2019_2021, -1) + Cambio2019_2021)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.17540 -0.26997 0.06955 0.26718 0.91923
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.1407065139 1.5175611258 -0.752 0.458106
## lag(ipca2019_2021, -1) 0.7691050119 0.0723818831 10.626 0.0000000000109 ***
## eipca2019_2021 0.8787154782 0.2310444430 3.803 0.000654 ***
## lag(hiato2019_2021, -1) -0.0000009716 0.0000006608 -1.470 0.151868
## Cambio2019_2021 -0.1753813629 0.2101153547 -0.835 0.410490
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4671 on 30 degrees of freedom
## Multiple R-squared: 0.9741, Adjusted R-squared: 0.9707
## F-statistic: 282.3 on 4 and 30 DF, p-value: < 0.00000000000000022
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 1.0555, df1 = 5, df2 = 5, p-value = 0.4771
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 5.479, df = 4, p-value = 0.2416
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 4.2
## P-value: 0.122708
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 0.95505, p-value = 0.00002587
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 12.956, df = 4, p-value = 0.01149
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 0.96732, df = 4, p-value = 0.9147
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 11.425, df = 12, p-value = 0.4929
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.62288 -0.19208 -0.01733 0.20051 0.64211
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.201738 0.310822 0.649 0.525
## z.lag.1 -0.419851 0.307180 -1.367 0.189
## tt -0.008244 0.013496 -0.611 0.549
## z.diff.lag 0.339601 0.303017 1.121 0.277
##
## Residual standard error: 0.3597 on 18 degrees of freedom
## Multiple R-squared: 0.1783, Adjusted R-squared: 0.04132
## F-statistic: 1.302 on 3 and 18 DF, p-value: 0.3044
##
##
## Value of test-statistic is: -1.3668 1.331 1.8008
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.15 -3.50 -3.18
## phi2 7.02 5.13 4.31
## phi3 9.31 6.73 5.61
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 4.7686
## P VALUE:
## Asymptotic p Value: 0.09215
##
## Description:
## Fri Mar 17 17:55:32 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.94137, p-value = 0.0616
vif(regressao)
## lag(ipca2019_2021, -1) eipca2019_2021 lag(hiato2019_2021, -1)
## 5.503023 5.659080 1.103412
## Cambio2019_2021
## 1.449957
##
## Time series regression with "ts" data:
## Start = 2003(3), End = 2021(12)
##
## Call:
## dynlm(formula = Dipca ~ lag(Dipca, -1) + Deipca + lag(Dhiato,
## -1) + DCambio)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.94958 -0.17295 0.00793 0.18603 1.17346
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.0011822360 0.0222705049 0.053 0.958
## lag(Dipca, -1) 0.6451602682 0.0457464211 14.103 <0.0000000000000002 ***
## Deipca 0.7021802993 0.0777975994 9.026 <0.0000000000000002 ***
## lag(Dhiato, -1) -0.0000005835 0.0000007930 -0.736 0.463
## DCambio -0.0037354828 0.0909305896 -0.041 0.967
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3329 on 221 degrees of freedom
## Multiple R-squared: 0.5519, Adjusted R-squared: 0.5438
## F-statistic: 68.06 on 4 and 221 DF, p-value: < 0.00000000000000022
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 1.0581, df1 = 101, df2 = 100, p-value = 0.3889
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 9.8223, df = 4, p-value = 0.04353
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 10.45
## P-value: 0.005375
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.9092, p-value = 0.2145
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 3.9048, df = 4, p-value = 0.419
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 5.6885, df = 4, p-value = 0.2236
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 33.936, df = 12, p-value = 0.0006905
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.78779 -0.15855 0.00518 0.15105 1.15598
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.0239979 0.0414859 -0.578 0.563608
## z.lag.1 -2.0245272 0.2968522 -6.820 0.000000000107 ***
## tt 0.0002574 0.0003124 0.824 0.410936
## z.diff.lag1 0.9438877 0.2797879 3.374 0.000892 ***
## z.diff.lag2 0.7610309 0.2604655 2.922 0.003882 **
## z.diff.lag3 0.7576156 0.2377609 3.186 0.001672 **
## z.diff.lag4 0.7258497 0.2116106 3.430 0.000733 ***
## z.diff.lag5 0.5797549 0.1894534 3.060 0.002517 **
## z.diff.lag6 0.5566279 0.1700917 3.273 0.001257 **
## z.diff.lag7 0.3184964 0.1522401 2.092 0.037701 *
## z.diff.lag8 0.2434356 0.1350093 1.803 0.072885 .
## z.diff.lag9 0.2379802 0.1132347 2.102 0.036842 *
## z.diff.lag10 0.2734321 0.0875081 3.125 0.002046 **
## z.diff.lag11 0.2718552 0.0606905 4.479 0.000012608507 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2678 on 199 degrees of freedom
## Multiple R-squared: 0.6111, Adjusted R-squared: 0.5857
## F-statistic: 24.05 on 13 and 199 DF, p-value: < 0.00000000000000022
##
##
## Value of test-statistic is: -6.82 15.9115 23.8529
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -3.99 -3.43 -3.13
## phi2 6.22 4.75 4.07
## phi3 8.43 6.49 5.47
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 324.6662
## P VALUE:
## Asymptotic p Value: < 0.00000000000000022
##
## Description:
## Fri Mar 17 17:55:32 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.93889, p-value = 0.00000004082
vif(regressao)
## lag(Dipca, -1) Deipca lag(Dhiato, -1) DCambio
## 1.061057 1.087034 1.119397 1.034545
## Warning in window.default(x, ...): 'start' value not changed
## Warning in window.default(x, ...): 'start' value not changed
## Warning in window.default(x, ...): 'start' value not changed
## Warning in window.default(x, ...): 'start' value not changed
##
## Time series regression with "ts" data:
## Start = 2003(3), End = 2010(12)
##
## Call:
## dynlm(formula = Var_Dependente ~ Var_Independente1 + Var_Independente2 +
## Var_Independente3 + Var_Independente4)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.84038 -0.14512 0.02748 0.18706 0.97013
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.001216783 0.038672594 0.031 0.975
## Var_Independente1 0.709204751 0.067791890 10.461 < 0.0000000000000002 ***
## Var_Independente2 0.699663338 0.124052072 5.640 0.000000198 ***
## Var_Independente3 -0.000001838 0.000001848 -0.995 0.322
## Var_Independente4 -0.001846810 0.156239390 -0.012 0.991
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3494 on 89 degrees of freedom
## Multiple R-squared: 0.6081, Adjusted R-squared: 0.5905
## F-statistic: 34.53 on 4 and 89 DF, p-value: < 0.00000000000000022
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 0.10308, df1 = 35, df2 = 34, p-value = 1
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 10.922, df = 4, p-value = 0.02745
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 7.51
## P-value: 0.023373
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.9154, p-value = 0.2716
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 4.486, df = 4, p-value = 0.3442
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 4.7816, df = 4, p-value = 0.3105
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 24.933, df = 12, p-value = 0.01514
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.36880 -0.12766 0.00082 0.14282 0.44273
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.0379289 0.0583734 0.650 0.518100
## z.lag.1 -1.9647646 0.4495651 -4.370 0.0000449 ***
## tt -0.0007220 0.0009936 -0.727 0.470053
## z.diff.lag1 0.7355212 0.4105062 1.792 0.077758 .
## z.diff.lag2 0.7288751 0.3805286 1.915 0.059772 .
## z.diff.lag3 0.6525563 0.3498202 1.865 0.066570 .
## z.diff.lag4 0.6539784 0.3013095 2.170 0.033575 *
## z.diff.lag5 0.5797780 0.2616174 2.216 0.030135 *
## z.diff.lag6 0.5493762 0.2293674 2.395 0.019458 *
## z.diff.lag7 0.2649948 0.2052038 1.291 0.201079
## z.diff.lag8 0.1706610 0.1798439 0.949 0.346113
## z.diff.lag9 0.1704272 0.1616407 1.054 0.295563
## z.diff.lag10 0.2771844 0.1368853 2.025 0.046922 *
## z.diff.lag11 0.3899148 0.1102010 3.538 0.000743 ***
## z.diff.lag12 0.1713979 0.0771773 2.221 0.029799 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2016 on 66 degrees of freedom
## Multiple R-squared: 0.7401, Adjusted R-squared: 0.685
## F-statistic: 13.42 on 14 and 66 DF, p-value: 0.00000000000002789
##
##
## Value of test-statistic is: -4.3704 6.5408 9.6738
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.04 -3.45 -3.15
## phi2 6.50 4.88 4.16
## phi3 8.73 6.49 5.47
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 306.4671
## P VALUE:
## Asymptotic p Value: < 0.00000000000000022
##
## Description:
## Fri Mar 17 17:55:33 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.88299, p-value = 0.0000004783
vif(regressao)
## Var_Independente1 Var_Independente2 Var_Independente3 Var_Independente4
## 1.121053 1.113057 1.128740 1.165477
##
## Time series regression with "ts" data:
## Start = 2011(2), End = 2016(5)
##
## Call:
## dynlm(formula = Var_Dependente ~ Var_Independente1 + Var_Independente2 +
## Var_Independente3 + Var_Independente4)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.60845 -0.16691 0.04493 0.13775 0.65680
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.016703513 0.032182542 0.519 0.605685
## Var_Independente1 0.442660511 0.119369720 3.708 0.000463 ***
## Var_Independente2 0.457282860 0.139415567 3.280 0.001745 **
## Var_Independente3 -0.000001128 0.000001175 -0.960 0.340922
## Var_Independente4 0.068375923 0.141705467 0.483 0.631221
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2494 on 59 degrees of freedom
## Multiple R-squared: 0.3466, Adjusted R-squared: 0.3023
## F-statistic: 7.824 on 4 and 59 DF, p-value: 0.00003963
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 2.317, df1 = 20, df2 = 19, p-value = 0.0363
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 6.0356, df = 4, p-value = 0.1965
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 4.85
## P-value: 0.088574
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.9523, p-value = 0.357
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 1.165, df = 4, p-value = 0.8838
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 2.331, df = 4, p-value = 0.6751
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 18.503, df = 12, p-value = 0.1012
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.51640 -0.13516 0.00457 0.11368 0.53733
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.189558 0.112367 -1.687 0.100027
## z.lag.1 -2.605618 0.748566 -3.481 0.001299 **
## tt 0.005244 0.002893 1.813 0.077976 .
## z.diff.lag1 1.403901 0.700738 2.003 0.052492 .
## z.diff.lag2 1.351890 0.640649 2.110 0.041665 *
## z.diff.lag3 1.413628 0.558042 2.533 0.015673 *
## z.diff.lag4 1.407699 0.488067 2.884 0.006505 **
## z.diff.lag5 1.299692 0.442825 2.935 0.005702 **
## z.diff.lag6 1.528114 0.425173 3.594 0.000944 ***
## z.diff.lag7 1.112716 0.425271 2.616 0.012788 *
## z.diff.lag8 0.616863 0.402279 1.533 0.133680
## z.diff.lag9 0.395209 0.354160 1.116 0.271657
## z.diff.lag10 0.334772 0.276504 1.211 0.233677
## z.diff.lag11 0.389262 0.177306 2.195 0.034483 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.212 on 37 degrees of freedom
## Multiple R-squared: 0.7435, Adjusted R-squared: 0.6534
## F-statistic: 8.251 on 13 and 37 DF, p-value: 0.0000001965
##
##
## Value of test-statistic is: -3.4808 4.2278 6.3386
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.04 -3.45 -3.15
## phi2 6.50 4.88 4.16
## phi3 8.73 6.49 5.47
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 0.8948
## P VALUE:
## Asymptotic p Value: 0.6393
##
## Description:
## Fri Mar 17 17:55:33 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.97548, p-value = 0.2316
vif(regressao)
## Var_Independente1 Var_Independente2 Var_Independente3 Var_Independente4
## 1.286788 1.140072 1.349925 1.098882
##
## Time series regression with "ts" data:
## Start = 2016(7), End = 2018(12)
##
## Call:
## dynlm(formula = Var_Dependente ~ Var_Independente1 + Var_Independente2 +
## Var_Independente3 + Var_Independente4)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.57159 -0.16682 -0.00189 0.14210 0.84929
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.091971878 0.088143131 1.043 0.30673
## Var_Independente1 0.495803397 0.173456296 2.858 0.00846 **
## Var_Independente2 0.935103015 0.237841535 3.932 0.00059 ***
## Var_Independente3 -0.000007416 0.000004096 -1.810 0.08226 .
## Var_Independente4 0.014902680 0.321555109 0.046 0.96340
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3513 on 25 degrees of freedom
## Multiple R-squared: 0.5152, Adjusted R-squared: 0.4376
## F-statistic: 6.642 on 4 and 25 DF, p-value: 0.0008734
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 5.9946, df1 = 3, df2 = 2, p-value = 0.1463
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 7.3153, df = 4, p-value = 0.1201
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 9.54
## P-value: 0.008496
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 2.1941, p-value = 0.6799
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 3.0888, df = 4, p-value = 0.5431
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 4.1336, df = 4, p-value = 0.3882
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 7.1777, df = 12, p-value = 0.8456
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.1940 -0.1288 0.0037 0.1134 0.3187
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.03383 0.43217 -0.078 0.9401
## z.lag.1 -4.11808 1.55719 -2.645 0.0383 *
## tt 0.01461 0.02162 0.676 0.5244
## z.diff.lag1 2.42176 1.35665 1.785 0.1245
## z.diff.lag2 1.80268 1.13804 1.584 0.1643
## z.diff.lag3 1.46760 0.99101 1.481 0.1891
## z.diff.lag4 1.07811 0.87067 1.238 0.2619
## z.diff.lag5 0.57682 0.70560 0.817 0.4449
## z.diff.lag6 0.03142 0.52820 0.059 0.9545
## z.diff.lag7 -0.16600 0.41173 -0.403 0.7008
## z.diff.lag8 -0.41831 0.26608 -1.572 0.1670
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2528 on 6 degrees of freedom
## Multiple R-squared: 0.9152, Adjusted R-squared: 0.7739
## F-statistic: 6.477 on 10 and 6 DF, p-value: 0.01643
##
##
## Value of test-statistic is: -2.6446 4.0672 5.4869
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.15 -3.50 -3.18
## phi2 7.02 5.13 4.31
## phi3 9.31 6.73 5.61
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 1.6477
## P VALUE:
## Asymptotic p Value: 0.4387
##
## Description:
## Fri Mar 17 17:55:33 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.96526, p-value = 0.4189
vif(regressao)
## Var_Independente1 Var_Independente2 Var_Independente3 Var_Independente4
## 1.570562 1.435144 1.951993 1.024182
##
## Time series regression with "ts" data:
## Start = 2019(2), End = 2021(12)
##
## Call:
## dynlm(formula = Var_Dependente ~ Var_Independente1 + Var_Independente2 +
## Var_Independente3 + Var_Independente4)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.10780 -0.18824 0.03105 0.36749 0.55748
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.0161326707 0.0764274400 0.211 0.834248
## Var_Independente1 0.5496322504 0.1285174510 4.277 0.000178 ***
## Var_Independente2 0.9370482044 0.2260916892 4.145 0.000256 ***
## Var_Independente3 0.0000004923 0.0000015919 0.309 0.759258
## Var_Independente4 0.0982676551 0.2646345946 0.371 0.712999
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4172 on 30 degrees of freedom
## Multiple R-squared: 0.5514, Adjusted R-squared: 0.4916
## F-statistic: 9.22 on 4 and 30 DF, p-value: 0.00005553
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 2.0646, df1 = 5, df2 = 5, p-value = 0.2226
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 5.7072, df = 4, p-value = 0.2221
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 0.81
## P-value: 0.665684
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.6419, p-value = 0.09668
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 6.034, df = 4, p-value = 0.1966
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 3.5293, df = 4, p-value = 0.4734
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 8.0349, df = 12, p-value = 0.7824
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.58410 -0.20234 0.04801 0.17050 0.46683
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.28310 0.28412 0.996 0.333
## z.lag.1 -0.30431 0.44793 -0.679 0.506
## tt -0.01361 0.01181 -1.152 0.265
## z.diff.lag1 -0.39061 0.36951 -1.057 0.305
## z.diff.lag2 -0.39337 0.25729 -1.529 0.145
##
## Residual standard error: 0.3429 on 17 degrees of freedom
## Multiple R-squared: 0.427, Adjusted R-squared: 0.2922
## F-statistic: 3.167 on 4 and 17 DF, p-value: 0.04073
##
##
## Value of test-statistic is: -0.6794 0.8545 1.0702
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.15 -3.50 -3.18
## phi2 7.02 5.13 4.31
## phi3 9.31 6.73 5.61
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 2.7094
## P VALUE:
## Asymptotic p Value: 0.258
##
## Description:
## Fri Mar 17 17:55:34 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.95151, p-value = 0.1261
vif(regressao)
## Var_Independente1 Var_Independente2 Var_Independente3 Var_Independente4
## 1.035307 1.073117 1.057486 1.050669
##
## Time series regression with "ts" data:
## Start = 2003(2), End = 2021(12)
##
## Call:
## dynlm(formula = lnipca1 ~ lag(lnipca1, -1) + lneipca1 + lag(lnhiato1,
## -1) + lnCambio1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.26291 -0.04110 0.00404 0.03638 0.34906
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.234808 0.335996 -0.699 0.485
## lag(lnipca1, -1) 0.863792 0.022773 37.931 < 0.0000000000000002 ***
## lneipca1 0.245446 0.042429 5.785 0.0000000245 ***
## lag(lnhiato1, -1) 0.004413 0.025700 0.172 0.864
## lnCambio1 0.010034 0.029057 0.345 0.730
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.082 on 222 degrees of freedom
## Multiple R-squared: 0.963, Adjusted R-squared: 0.9623
## F-statistic: 1443 on 4 and 222 DF, p-value: < 0.00000000000000022
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 3.5933, df1 = 101, df2 = 100, p-value = 0.0000000003018
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 31.921, df = 4, p-value = 0.000001986
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 20.42
## P-value: 0.000037
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.8945, p-value = 0.1511
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 7.8105, df = 4, p-value = 0.09877
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 19.009, df = 4, p-value = 0.0007828
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 73.513, df = 12, p-value = 0.00000000007013
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.24222 -0.03209 -0.00389 0.03034 0.32840
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.001099324 0.009504885 0.116 0.908040
## z.lag.1 -0.966195066 0.205146812 -4.710 0.00000464540350 ***
## tt -0.000005754 0.000070995 -0.081 0.935481
## z.diff.lag1 0.061925625 0.203773548 0.304 0.761526
## z.diff.lag2 -0.037244272 0.200153631 -0.186 0.852573
## z.diff.lag3 0.042813296 0.194645740 0.220 0.826132
## z.diff.lag4 0.144924052 0.184832480 0.784 0.433924
## z.diff.lag5 -0.001393727 0.172596452 -0.008 0.993565
## z.diff.lag6 0.085985269 0.159629570 0.539 0.590727
## z.diff.lag7 0.036272399 0.144239133 0.251 0.801707
## z.diff.lag8 0.090870884 0.131581997 0.691 0.490620
## z.diff.lag9 0.246397857 0.113085784 2.179 0.030517 *
## z.diff.lag10 0.301967358 0.088255803 3.422 0.000756 ***
## z.diff.lag11 0.470617448 0.063515613 7.409 0.00000000000354 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06344 on 199 degrees of freedom
## Multiple R-squared: 0.6466, Adjusted R-squared: 0.6235
## F-statistic: 28.01 on 13 and 199 DF, p-value: < 0.00000000000000022
##
##
## Value of test-statistic is: -4.7098 7.472 11.1334
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -3.99 -3.43 -3.13
## phi2 6.22 4.75 4.07
## phi3 8.43 6.49 5.47
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 294.4202
## P VALUE:
## Asymptotic p Value: < 0.00000000000000022
##
## Description:
## Fri Mar 17 17:55:34 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.91348, p-value = 0.0000000003447
vif(regressao)
## lag(lnipca1, -1) lag(lnipca1, -2) lag(lnhiato1, -1) lnCambio1
## 23.155175 23.304882 1.010297 1.050846
##
## Time series regression with "ts" data:
## Start = 2003(2), End = 2010(1)
##
## Call:
## dynlm(formula = lnipca12003_2010 ~ lag(lnipca12003_2010, -1) +
## lneipca12003_2010 + lag(lnhiato12003_2010, -1) + lnCambio12003_2010)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.143876 -0.030133 0.004692 0.031499 0.171261
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.46654 0.85722 -1.711 0.091040 .
## lag(lnipca12003_2010, -1) 0.85182 0.02759 30.870 < 0.0000000000000002 ***
## lneipca12003_2010 0.34543 0.05721 6.038 0.0000000481 ***
## lag(lnhiato12003_2010, -1) 0.10716 0.06647 1.612 0.110924
## lnCambio12003_2010 -0.16451 0.04802 -3.426 0.000975 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.05886 on 79 degrees of freedom
## Multiple R-squared: 0.9833, Adjusted R-squared: 0.9824
## F-statistic: 1162 on 4 and 79 DF, p-value: < 0.00000000000000022
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 0.38707, df1 = 30, df2 = 29, p-value = 0.9941
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 16.61, df = 4, p-value = 0.0023
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 1.04
## P-value: 0.595138
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 0.8954, p-value = 0.0000000009482
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 29.429, df = 4, p-value = 0.000006395
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 16.778, df = 4, p-value = 0.002135
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 55.173, df = 12, p-value = 0.0000001685
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.084254 -0.024679 0.002983 0.019656 0.093339
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.00433232 0.01254272 0.345 0.731061
## z.lag.1 -0.89882306 0.22740994 -3.952 0.000216 ***
## tt -0.00007211 0.00023863 -0.302 0.763621
## z.diff.lag1 0.32078286 0.22010493 1.457 0.150491
## z.diff.lag2 0.41120281 0.21080135 1.951 0.056020 .
## z.diff.lag3 0.31830354 0.20566664 1.548 0.127237
## z.diff.lag4 0.42437560 0.18080038 2.347 0.022412 *
## z.diff.lag5 0.30826496 0.15701152 1.963 0.054494 .
## z.diff.lag6 0.39352735 0.15023317 2.619 0.011266 *
## z.diff.lag7 0.02565725 0.14187150 0.181 0.857128
## z.diff.lag8 0.06732546 0.13311748 0.506 0.614976
## z.diff.lag9 0.23461002 0.12077708 1.943 0.057022 .
## z.diff.lag10 0.22628807 0.11704880 1.933 0.058174 .
## z.diff.lag11 0.39272103 0.10617911 3.699 0.000489 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04034 on 57 degrees of freedom
## Multiple R-squared: 0.554, Adjusted R-squared: 0.4523
## F-statistic: 5.447 on 13 and 57 DF, p-value: 0.000002883
##
##
## Value of test-statistic is: -3.9524 5.6019 8.2402
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.04 -3.45 -3.15
## phi2 6.50 4.88 4.16
## phi3 8.73 6.49 5.47
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 0.9884
## P VALUE:
## Asymptotic p Value: 0.6101
##
## Description:
## Fri Mar 17 17:55:34 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.97579, p-value = 0.1143
vif(regressao)
## lag(lnipca12003_2010, -1) lneipca12003_2010
## 3.762582 4.336689
## lag(lnhiato12003_2010, -1) lnCambio12003_2010
## 1.579691 2.510501
##
## Time series regression with "ts" data:
## Start = 2011(2), End = 2016(5)
##
## Call:
## dynlm(formula = lnipca12011_2016.8 ~ lag(lnipca12011_2016.8,
## -1) + lneipca12011_2016.8 + lag(lnhiato12011_2016.8, -1) +
## lnCambio12011_2016.8)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.106549 -0.025742 0.002239 0.030385 0.073050
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.613452 0.467858 -1.311 0.195
## lag(lnipca12011_2016.8, -1) 0.987412 0.049552 19.927 <0.0000000000000002
## lneipca12011_2016.8 0.136552 0.093578 1.459 0.150
## lag(lnhiato12011_2016.8, -1) 0.030321 0.033237 0.912 0.365
## lnCambio12011_2016.8 -0.008261 0.058453 -0.141 0.888
##
## (Intercept)
## lag(lnipca12011_2016.8, -1) ***
## lneipca12011_2016.8
## lag(lnhiato12011_2016.8, -1)
## lnCambio12011_2016.8
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04074 on 59 degrees of freedom
## Multiple R-squared: 0.9642, Adjusted R-squared: 0.9617
## F-statistic: 396.9 on 4 and 59 DF, p-value: < 0.00000000000000022
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 0.83149, df1 = 20, df2 = 19, p-value = 0.6576
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 0.49767, df = 4, p-value = 0.9737
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 0.09
## P-value: 0.957901
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.1019, p-value = 0.000007884
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 17.334, df = 4, p-value = 0.001665
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 4.0204, df = 4, p-value = 0.4032
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 57.59, df = 12, p-value = 0.00000006185
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.070422 -0.017430 -0.005732 0.020573 0.090351
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.0106551 0.0148296 -0.719 0.476522
## z.lag.1 -1.0942616 0.2637581 -4.149 0.000164 ***
## tt 0.0002586 0.0003635 0.711 0.480889
## z.diff.lag1 0.2840954 0.2298261 1.236 0.223445
## z.diff.lag2 0.3398625 0.2266627 1.499 0.141426
## z.diff.lag3 0.4111754 0.2197861 1.871 0.068522 .
## z.diff.lag4 0.4532612 0.2093221 2.165 0.036230 *
## z.diff.lag5 0.5333893 0.1901597 2.805 0.007659 **
## z.diff.lag6 0.6553321 0.1730997 3.786 0.000492 ***
## z.diff.lag7 0.2600780 0.1569340 1.657 0.105104
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03447 on 41 degrees of freedom
## Multiple R-squared: 0.5009, Adjusted R-squared: 0.3913
## F-statistic: 4.572 on 9 and 41 DF, p-value: 0.0003288
##
##
## Value of test-statistic is: -4.1487 6.0306 8.9985
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.04 -3.45 -3.15
## phi2 6.50 4.88 4.16
## phi3 8.73 6.49 5.47
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 2.1195
## P VALUE:
## Asymptotic p Value: 0.3465
##
## Description:
## Fri Mar 17 17:55:34 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.97855, p-value = 0.3283
vif(regressao)
## lag(lnipca12011_2016.8, -1) lneipca12011_2016.8
## 3.918814 2.691264
## lag(lnhiato12011_2016.8, -1) lnCambio12011_2016.8
## 2.122454 3.471579
##
## Time series regression with "ts" data:
## Start = 2016(7), End = 2018(12)
##
## Call:
## dynlm(formula = lnipca12016.9_2018 ~ lag(lnipca12016.9_2018,
## -1) + lneipca12016.9_2018 + lag(lnhiato12016.9_2018, -1) +
## lnCambio12016.9_2018)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.126237 -0.049577 0.000523 0.052117 0.198827
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -4.64935 2.89996 -1.603 0.12144
## lag(lnipca12016.9_2018, -1) 0.89995 0.06461 13.929 0.000000000000276 ***
## lneipca12016.9_2018 0.82168 0.23035 3.567 0.00149 **
## lag(lnhiato12016.9_2018, -1) 0.18471 0.23280 0.793 0.43500
## lnCambio12016.9_2018 0.69563 0.38461 1.809 0.08255 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08348 on 25 degrees of freedom
## Multiple R-squared: 0.9629, Adjusted R-squared: 0.9569
## F-statistic: 162 on 4 and 25 DF, p-value: < 0.00000000000000022
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 10.638, df1 = 3, df2 = 2, p-value = 0.08714
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 15.653, df = 4, p-value = 0.003523
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 2.62
## P-value: 0.269775
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.4891, p-value = 0.02153
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 3.369, df = 4, p-value = 0.4981
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 4.6017, df = 4, p-value = 0.3307
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 7.3322, df = 12, p-value = 0.8349
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## 1 2 3 4 5 6
## -0.00009746 0.00432546 -0.02211291 0.02755896 -0.00174259 -0.03702991
## 7 8 9 10 11 12
## 0.04116984 -0.00971994 0.00823906 -0.02252865 0.00105514 0.02681164
## 13 14 15 16 17
## -0.01274969 -0.00707184 0.01831825 -0.02101033 0.00658497
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.47350 0.31284 -1.514 0.269
## z.lag.1 -7.16221 3.46230 -2.069 0.174
## tt 0.02236 0.01434 1.559 0.259
## z.diff.lag1 6.07358 3.12133 1.946 0.191
## z.diff.lag2 5.18136 2.90594 1.783 0.217
## z.diff.lag3 4.66424 2.56065 1.822 0.210
## z.diff.lag4 4.44143 2.35918 1.883 0.200
## z.diff.lag5 3.52830 1.97688 1.785 0.216
## z.diff.lag6 3.02085 1.66327 1.816 0.211
## z.diff.lag7 2.73753 1.52108 1.800 0.214
## z.diff.lag8 1.66780 1.24801 1.336 0.313
## z.diff.lag9 2.09143 0.75298 2.778 0.109
## z.diff.lag10 0.87862 0.74083 1.186 0.357
## z.diff.lag11 1.10720 0.59781 1.852 0.205
## z.diff.lag12 0.77047 0.57734 1.335 0.314
##
## Residual standard error: 0.05813 on 2 degrees of freedom
## Multiple R-squared: 0.9685, Adjusted R-squared: 0.7482
## F-statistic: 4.395 on 14 and 2 DF, p-value: 0.2006
##
##
## Value of test-statistic is: -2.0686 3.2865 3.8782
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.15 -3.50 -3.18
## phi2 7.02 5.13 4.31
## phi3 9.31 6.73 5.61
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 0.1502
## P VALUE:
## Asymptotic p Value: 0.9277
##
## Description:
## Fri Mar 17 17:55:35 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.96374, p-value = 0.3845
vif(regressao)
## lag(lnipca12016.9_2018, -1) lneipca12016.9_2018
## 3.151259 3.226981
## lag(lnhiato12016.9_2018, -1) lnCambio12016.9_2018
## 11.638601 4.240519
##
## Time series regression with "ts" data:
## Start = 2019(2), End = 2021(12)
##
## Call:
## dynlm(formula = lnipca12019_2021 ~ lag(lnipca12019_2021, -1) +
## lneipca12019_2021 + lag(lnhiato12019_2021, -1) + lnCambio12019_2021)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.22812 -0.07543 0.01244 0.06649 0.14476
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.97783 1.24031 1.595 0.121
## lag(lnipca12019_2021, -1) 0.62909 0.06397 9.835 0.0000000000674 ***
## lneipca12019_2021 1.00657 0.15343 6.560 0.0000002945627 ***
## lag(lnhiato12019_2021, -1) -0.18399 0.09007 -2.043 0.050 *
## lnCambio12019_2021 -0.15996 0.26071 -0.614 0.544
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.09559 on 30 degrees of freedom
## Multiple R-squared: 0.9682, Adjusted R-squared: 0.964
## F-statistic: 228.4 on 4 and 30 DF, p-value: < 0.00000000000000022
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 0.26716, df1 = 5, df2 = 5, p-value = 0.9131
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 4.7412, df = 4, p-value = 0.3149
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 0.4
## P-value: 0.818442
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.2355, p-value = 0.001246
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 10.154, df = 4, p-value = 0.03792
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 0.87835, df = 4, p-value = 0.9276
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 14.009, df = 12, p-value = 0.3002
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.111200 -0.047029 -0.005046 0.045731 0.130569
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.0204636 0.0584926 0.350 0.7305
## z.lag.1 -0.6728465 0.2873354 -2.342 0.0309 *
## tt -0.0007602 0.0024327 -0.312 0.7583
## z.diff.lag 0.2878042 0.2589267 1.112 0.2810
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0713 on 18 degrees of freedom
## Multiple R-squared: 0.2528, Adjusted R-squared: 0.1282
## F-statistic: 2.03 on 3 and 18 DF, p-value: 0.1458
##
##
## Value of test-statistic is: -2.3417 2.1287 2.9915
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.15 -3.50 -3.18
## phi2 7.02 5.13 4.31
## phi3 9.31 6.73 5.61
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 2.3644
## P VALUE:
## Asymptotic p Value: 0.3066
##
## Description:
## Fri Mar 17 17:55:35 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.95196, p-value = 0.1302
vif(regressao)
## lag(lnipca12019_2021, -1) lneipca12019_2021
## 3.574165 3.556733
## lag(lnhiato12019_2021, -1) lnCambio12019_2021
## 1.040284 1.655345
##
## Time series regression with "ts" data:
## Start = 2003(3), End = 2021(12)
##
## Call:
## dynlm(formula = Dlnipca1 ~ lag(Dlnipca1, -1) + Dlneipca1 + lag(Dlnhiato1,
## -1) + DlnCambio1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.27164 -0.03460 -0.00309 0.02840 0.34130
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.0008906 0.0042185 0.211 0.833
## lag(Dlnipca1, -1) 0.5610684 0.0490855 11.430 <0.0000000000000002 ***
## Dlneipca1 0.7311724 0.0716686 10.202 <0.0000000000000002 ***
## lag(Dlnhiato1, -1) -0.1278175 0.1019648 -1.254 0.211
## DlnCambio1 0.0436402 0.0917586 0.476 0.635
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06326 on 221 degrees of freedom
## Multiple R-squared: 0.5023, Adjusted R-squared: 0.4933
## F-statistic: 55.77 on 4 and 221 DF, p-value: < 0.00000000000000022
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 2.6851, df1 = 101, df2 = 100, p-value = 0.000000651
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 3.7473, df = 4, p-value = 0.4413
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 0.76
## P-value: 0.683773
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.987, p-value = 0.4275
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 5.3489, df = 4, p-value = 0.2533
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 6.2385, df = 4, p-value = 0.182
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 39.271, df = 12, p-value = 0.00009495
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.155411 -0.033012 -0.001172 0.031137 0.311949
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.00453084 0.00865179 -0.524 0.601079
## z.lag.1 -2.09860247 0.30455710 -6.891 0.0000000000715 ***
## tt 0.00003804 0.00006478 0.587 0.557675
## z.diff.lag1 1.03738003 0.29051121 3.571 0.000446 ***
## z.diff.lag2 0.84930799 0.27522747 3.086 0.002319 **
## z.diff.lag3 0.86866636 0.25751851 3.373 0.000893 ***
## z.diff.lag4 0.85005351 0.23609961 3.600 0.000401 ***
## z.diff.lag5 0.65023009 0.21257682 3.059 0.002528 **
## z.diff.lag6 0.54019895 0.18902339 2.858 0.004719 **
## z.diff.lag7 0.37536424 0.16596960 2.262 0.024801 *
## z.diff.lag8 0.35332171 0.14560868 2.427 0.016136 *
## z.diff.lag9 0.43868690 0.12178688 3.602 0.000399 ***
## z.diff.lag10 0.39579913 0.09332277 4.241 0.0000340411298 ***
## z.diff.lag11 0.39281560 0.06446893 6.093 0.0000000056350 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.05665 on 199 degrees of freedom
## Multiple R-squared: 0.6275, Adjusted R-squared: 0.6031
## F-statistic: 25.78 on 13 and 199 DF, p-value: < 0.00000000000000022
##
##
## Value of test-statistic is: -6.8907 16.1053 24.1457
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -3.99 -3.43 -3.13
## phi2 6.22 4.75 4.07
## phi3 8.43 6.49 5.47
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 288.5021
## P VALUE:
## Asymptotic p Value: < 0.00000000000000022
##
## Description:
## Fri Mar 17 17:55:35 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.93458, p-value = 0.00000001682
vif(regressao)
## lag(Dlnipca1, -1) Dlneipca1 lag(Dlnhiato1, -1) DlnCambio1
## 1.072661 1.065076 1.118296 1.026445
## Warning in window.default(x, ...): 'start' value not changed
## Warning in window.default(x, ...): 'start' value not changed
## Warning in window.default(x, ...): 'start' value not changed
## Warning in window.default(x, ...): 'start' value not changed
##
## Time series regression with "ts" data:
## Start = 2003(3), End = 2010(12)
##
## Call:
## dynlm(formula = Dlnipca1aux ~ lag(Dlnipca1aux, -1) + Dlneipca1aux +
## lag(Dlnhiato1aux, -1) + DlnCambio1aux)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.159451 -0.026855 0.001323 0.031348 0.148858
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.0004871 0.0053460 0.091 0.928
## lag(Dlnipca1aux, -1) 0.6471186 0.0736607 8.785 0.000000000000105 ***
## Dlneipca1aux 0.5044980 0.1010858 4.991 0.000002962538979 ***
## lag(Dlnhiato1aux, -1) 0.0096420 0.1719920 0.056 0.955
## DlnCambio1aux 0.0767383 0.1241757 0.618 0.538
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0491 on 89 degrees of freedom
## Multiple R-squared: 0.5465, Adjusted R-squared: 0.5262
## F-statistic: 26.82 on 4 and 89 DF, p-value: 0.00000000000001317
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 0.30273, df1 = 35, df2 = 34, p-value = 0.9997
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 2.5641, df = 4, p-value = 0.6332
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 0.35
## P-value: 0.841156
dwtest(regressao)
## Warning in dwtest(regressao): exact p value cannot be computed (not in [0,1]),
## approximate p value will be used
##
## Durbin-Watson test
##
## data: regressao
## DW = 2.0093, p-value = 0.4502
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 2.5328, df = 4, p-value = 0.6388
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 1.5029, df = 4, p-value = 0.8261
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 26.433, df = 12, p-value = 0.009318
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.078716 -0.022199 0.003935 0.021776 0.088295
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.0041609 0.0114523 0.363 0.717523
## z.lag.1 -1.9150764 0.4944142 -3.873 0.000249 ***
## tt -0.0000707 0.0001960 -0.361 0.719446
## z.diff.lag1 0.7942303 0.4597934 1.727 0.088780 .
## z.diff.lag2 0.7612107 0.4375521 1.740 0.086573 .
## z.diff.lag3 0.6594842 0.4051171 1.628 0.108314
## z.diff.lag4 0.7112161 0.3686966 1.929 0.058033 .
## z.diff.lag5 0.5627663 0.3287367 1.712 0.091610 .
## z.diff.lag6 0.5809194 0.2868906 2.025 0.046928 *
## z.diff.lag7 0.2268016 0.2665326 0.851 0.397883
## z.diff.lag8 0.1571223 0.2378515 0.661 0.511174
## z.diff.lag9 0.1930589 0.2161972 0.893 0.375114
## z.diff.lag10 0.2118221 0.1848559 1.146 0.255984
## z.diff.lag11 0.4406325 0.1522206 2.895 0.005140 **
## z.diff.lag12 0.1607679 0.1109278 1.449 0.151988
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04037 on 66 degrees of freedom
## Multiple R-squared: 0.7167, Adjusted R-squared: 0.6566
## F-statistic: 11.92 on 14 and 66 DF, p-value: 0.0000000000003997
##
##
## Value of test-statistic is: -3.8734 5.2572 7.7348
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.04 -3.45 -3.15
## phi2 6.50 4.88 4.16
## phi3 8.73 6.49 5.47
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 5.3712
## P VALUE:
## Asymptotic p Value: 0.06818
##
## Description:
## Fri Mar 17 17:55:36 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.98565, p-value = 0.3974
vif(regressao)
## lag(Dlnipca1aux, -1) Dlneipca1aux lag(Dlnhiato1aux, -1)
## 1.080735 1.073406 1.119827
## DlnCambio1aux
## 1.134550
##
## Time series regression with "ts" data:
## Start = 2011(2), End = 2016(5)
##
## Call:
## dynlm(formula = Dlnipca1aux ~ lag(Dlnipca1aux, -1) + Dlneipca1aux +
## lag(Dlnhiato1aux, -1) + DlnCambio1aux)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.092061 -0.023380 0.005102 0.021377 0.103827
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.002921 0.004732 0.617 0.53938
## lag(Dlnipca1aux, -1) 0.493557 0.117223 4.210 0.0000882 ***
## Dlneipca1aux 0.335309 0.124014 2.704 0.00894 **
## lag(Dlnhiato1aux, -1) -0.017070 0.119922 -0.142 0.88729
## DlnCambio1aux -0.018783 0.095786 -0.196 0.84521
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03601 on 59 degrees of freedom
## Multiple R-squared: 0.2944, Adjusted R-squared: 0.2466
## F-statistic: 6.154 on 4 and 59 DF, p-value: 0.0003301
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 1.2296, df1 = 20, df2 = 19, p-value = 0.3279
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 2.0258, df = 4, p-value = 0.731
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 1.81
## P-value: 0.404544
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 2.0319, p-value = 0.4823
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 1.0596, df = 4, p-value = 0.9006
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 2.3453, df = 4, p-value = 0.6725
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 17.674, df = 12, p-value = 0.1259
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.059113 -0.020042 -0.003396 0.016138 0.075972
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.0335651 0.0172795 -1.942 0.059719 .
## z.lag.1 -2.6105529 0.7168514 -3.642 0.000824 ***
## tt 0.0009135 0.0004383 2.084 0.044115 *
## z.diff.lag1 1.3970205 0.6655934 2.099 0.042708 *
## z.diff.lag2 1.3528912 0.5967582 2.267 0.029320 *
## z.diff.lag3 1.3611299 0.5217684 2.609 0.013036 *
## z.diff.lag4 1.3290692 0.4619857 2.877 0.006630 **
## z.diff.lag5 1.2297643 0.4245208 2.897 0.006297 **
## z.diff.lag6 1.3904430 0.4081624 3.407 0.001599 **
## z.diff.lag7 1.0404972 0.4018720 2.589 0.013677 *
## z.diff.lag8 0.6511654 0.3732660 1.745 0.089373 .
## z.diff.lag9 0.4123829 0.3222439 1.280 0.208609
## z.diff.lag10 0.3112082 0.2504929 1.242 0.221912
## z.diff.lag11 0.3695629 0.1581509 2.337 0.024973 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03207 on 37 degrees of freedom
## Multiple R-squared: 0.7292, Adjusted R-squared: 0.6341
## F-statistic: 7.665 on 13 and 37 DF, p-value: 0.0000004858
##
##
## Value of test-statistic is: -3.6417 4.5814 6.8343
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.04 -3.45 -3.15
## phi2 6.50 4.88 4.16
## phi3 8.73 6.49 5.47
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 1.3473
## P VALUE:
## Asymptotic p Value: 0.5098
##
## Description:
## Fri Mar 17 17:55:36 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.98412, p-value = 0.5816
vif(regressao)
## lag(Dlnipca1aux, -1) Dlneipca1aux lag(Dlnhiato1aux, -1)
## 1.149349 1.150602 1.234911
## DlnCambio1aux
## 1.087615
##
## Time series regression with "ts" data:
## Start = 2016(7), End = 2018(12)
##
## Call:
## dynlm(formula = Dlnipca1aux ~ lag(Dlnipca1aux, -1) + Dlneipca1aux +
## lag(Dlnhiato1aux, -1) + DlnCambio1aux)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.12216 -0.04010 -0.01166 0.02482 0.26651
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.02875 0.02208 1.302 0.204857
## lag(Dlnipca1aux, -1) 0.37742 0.20385 1.851 0.075947 .
## Dlneipca1aux 0.92286 0.24023 3.842 0.000744 ***
## lag(Dlnhiato1aux, -1) -1.27738 0.62386 -2.048 0.051249 .
## DlnCambio1aux 0.03514 0.42669 0.082 0.935017
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08769 on 25 degrees of freedom
## Multiple R-squared: 0.4746, Adjusted R-squared: 0.3906
## F-statistic: 5.647 on 4 and 25 DF, p-value: 0.002221
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 6.2676, df1 = 3, df2 = 2, p-value = 0.1407
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 6.363, df = 4, p-value = 0.1736
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 17.03
## P-value: 0.000201
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 2.3647, p-value = 0.8389
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 5.4835, df = 4, p-value = 0.2412
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 2.0948, df = 4, p-value = 0.7183
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 9.6006, df = 12, p-value = 0.651
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## 1 2 3 4 5 6 7 8
## -0.033547 0.042819 -0.027489 0.020246 0.006283 -0.055856 0.044354 0.021357
## 9 10 11 12 13 14 15 16
## -0.003862 -0.034428 0.012747 0.038088 -0.013083 -0.024500 0.039716 -0.029266
## 17
## -0.003580
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.72768 0.56641 -1.285 0.328
## z.lag.1 -10.96438 6.41766 -1.708 0.230
## tt 0.03652 0.02643 1.382 0.301
## z.diff.lag1 9.12602 6.09156 1.498 0.273
## z.diff.lag2 8.07423 5.60532 1.440 0.286
## z.diff.lag3 7.03644 5.17174 1.361 0.307
## z.diff.lag4 6.39942 4.70038 1.361 0.306
## z.diff.lag5 5.30165 4.04680 1.310 0.320
## z.diff.lag6 3.93169 3.35815 1.171 0.362
## z.diff.lag7 2.84284 2.72564 1.043 0.406
## z.diff.lag8 2.13847 2.10058 1.018 0.416
## z.diff.lag9 2.06017 1.51647 1.359 0.307
## z.diff.lag10 1.64204 1.29593 1.267 0.333
## z.diff.lag11 1.20632 1.06840 1.129 0.376
## z.diff.lag12 0.90027 0.60813 1.480 0.277
##
## Residual standard error: 0.08871 on 2 degrees of freedom
## Multiple R-squared: 0.9567, Adjusted R-squared: 0.6536
## F-statistic: 3.156 on 14 and 2 DF, p-value: 0.2665
##
##
## Value of test-statistic is: -1.7085 2.9325 2.6858
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.15 -3.50 -3.18
## phi2 7.02 5.13 4.31
## phi3 9.31 6.73 5.61
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 17.2244
## P VALUE:
## Asymptotic p Value: 0.0001819
##
## Description:
## Fri Mar 17 17:55:36 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.89686, p-value = 0.007043
vif(regressao)
## lag(Dlnipca1aux, -1) Dlneipca1aux lag(Dlnhiato1aux, -1)
## 1.967860 1.347255 2.024698
## DlnCambio1aux
## 1.022953
##
## Time series regression with "ts" data:
## Start = 2019(2), End = 2021(12)
##
## Call:
## dynlm(formula = Dlnipca1aux ~ lag(Dlnipca1aux, -1) + Dlneipca1aux +
## lag(Dlnhiato1aux, -1) + DlnCambio1aux)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.259066 -0.050040 0.000741 0.066532 0.185832
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.0002586 0.0179258 -0.014 0.988587
## lag(Dlnipca1aux, -1) 0.5445794 0.1227328 4.437 0.000114 ***
## Dlneipca1aux 1.0261126 0.2000589 5.129 0.0000162 ***
## lag(Dlnhiato1aux, -1) -0.1004700 0.2654830 -0.378 0.707767
## DlnCambio1aux 0.2808293 0.3676918 0.764 0.450974
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1021 on 30 degrees of freedom
## Multiple R-squared: 0.5896, Adjusted R-squared: 0.5349
## F-statistic: 10.78 on 4 and 30 DF, p-value: 0.00001553
gqtest(regressao, fraction=15, alternative = "greater")
##
## Goldfeld-Quandt test
##
## data: regressao
## GQ = 0.7409, df1 = 5, df2 = 5, p-value = 0.6249
## alternative hypothesis: variance increases from segment 1 to 2
bptest(regressao)
##
## studentized Breusch-Pagan test
##
## data: regressao
## BP = 2.6345, df = 4, p-value = 0.6207
white_test(regressao)
## White's test results
##
## Null hypothesis: Homoskedasticity of the residuals
## Alternative hypothesis: Heteroskedasticity of the residuals
## Test Statistic: 1.5
## P-value: 0.471995
dwtest(regressao)
##
## Durbin-Watson test
##
## data: regressao
## DW = 1.9813, p-value = 0.3879
## alternative hypothesis: true autocorrelation is greater than 0
bgtest(regressao, order=4)
##
## Breusch-Godfrey test for serial correlation of order up to 4
##
## data: regressao
## LM test = 5.5004, df = 4, p-value = 0.2397
ArchTest(residuos, lags=4)
##
## ARCH LM-test; Null hypothesis: no ARCH effects
##
## data: residuos
## Chi-squared = 2.4475, df = 4, p-value = 0.6541
Box.test(residuos, lag=12, type="Box-Pierce")
##
## Box-Pierce test
##
## data: residuos
## X-squared = 11.414, df = 12, p-value = 0.4938
dickey1<-ur.df(residuos, lags=12, type="trend", selectlags="AIC")
summary(dickey1)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.15045 -0.05450 -0.01019 0.04899 0.14971
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.029111 0.069821 0.417 0.6817
## z.lag.1 -0.988320 0.348413 -2.837 0.0109 *
## tt -0.001468 0.002868 -0.512 0.6150
## z.diff.lag -0.031846 0.243409 -0.131 0.8974
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08494 on 18 degrees of freedom
## Multiple R-squared: 0.5134, Adjusted R-squared: 0.4323
## F-statistic: 6.33 on 3 and 18 DF, p-value: 0.004038
##
##
## Value of test-statistic is: -2.8366 2.8484 4.2633
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.15 -3.50 -3.18
## phi2 7.02 5.13 4.31
## phi3 9.31 6.73 5.61
jarqueberaTest(residuos)
##
## Title:
## Jarque - Bera Normalality Test
##
## Test Results:
## STATISTIC:
## X-squared: 0.6245
## P VALUE:
## Asymptotic p Value: 0.7318
##
## Description:
## Fri Mar 17 17:55:37 2023 by user: 55819
shapiro.test(residuos)
##
## Shapiro-Wilk normality test
##
## data: residuos
## W = 0.98368, p-value = 0.8702
vif(regressao)
## lag(Dlnipca1aux, -1) Dlneipca1aux lag(Dlnhiato1aux, -1)
## 1.088894 1.061646 1.057265
## DlnCambio1aux
## 1.080806