#========= VAR PADRÃO CHOLESKYdados_var <-tibble(log_despesa =log(as.numeric(despesa_real_tri_sa)),log_pib =log(as.numeric(pib_real_tri_sa)),log_receita =log(as.numeric(receita_real_tri_sa)))# Estimar o modelo VAR reduzido em nível# O número de defasagens (p=1) foi mantido do seu código original.var_red_nivel <-VAR(dados_var, p =1, type ="const")#====================== IDENTIFICAÇÃO DOS CHOQUES COM CHOLESKY# A decomposição de Cholesky é um tipo de identificação recursiva.# Para usá-la, informamos à função SVAR que a matriz de choques (Bmat)# é triangular inferior, com elementos a serem estimados.# 1) Definir as dimensões do modelon_vars <-ncol(var_red_nivel$y)# 2) Montar Bmat (Matriz de Choques)# Criar uma matriz triangular inferior com zeros na parte superior e NAs na diagonal e parte inferiorBmat <-matrix(NA, nrow = n_vars, ncol = n_vars)Bmat[upper.tri(Bmat)] <-0# Estimar o SVAR# Para a decomposição de Cholesky, a matriz Amat é a identidade.# A função SVAR assume isso como padrão quando Bmat é definida desta forma.svar_mod_cholesky <-SVAR(var_red_nivel, Bmat = Bmat)
Warning in SVAR(var_red_nivel, Bmat = Bmat): The B-model is just identified. No
test possible.
# Exibir o resumo do modelo.print(svar_mod_cholesky)
#====================== ANÁLISE DO IMPACTO COM FUNÇÕES DE IMPULSO-RESPOSTA# Gerar e plotar as IRFs para analisar o impacto dos choques fiscais no PIB.# 1. Impacto de um choque de DESPESA sobre o PIBirf_despesa_pib_svar <-irf(svar_mod_cholesky,impulse ="log_despesa", # Impulso: Choque na Despesaresponse ="log_pib", # Resposta: PIBn.ahead =36,ci =0.95,boot =TRUE)
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
plot(irf_despesa_pib_svar,main ="Resposta do PIB a um Choque de Despesa (SVAR-Cholesky)",ylab ="Impacto no PIB (em nível)",xlab ="Período (trimestres)")
# 2. Impacto de um choque de RECEITA sobre o PIBirf_receita_pib_svar <-irf(svar_mod_cholesky,impulse ="log_receita", # Impulso: Choque na Receitaresponse ="log_pib", # Resposta: PIBn.ahead =36,ci =0.95,boot =TRUE)
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
plot(irf_receita_pib_svar,main ="Resposta do PIB a um Choque de Receita (SVAR-Cholesky)",ylab ="Impacto no PIB (em nível)",xlab ="Período (trimestres)")
#============ 1° DIFERENÇA# Ordem: Despesa -> PIB -> Receitadados_var_3_diff <-tibble(d_log_despesa =diff(log(as.numeric(despesa_real_tri_sa))),d_log_pib =diff(log(as.numeric(pib_real_tri_sa))),d_log_receita =diff(log(as.numeric(receita_real_tri_sa))))# Estimar o modelo VAR reduzido em primeira diferença# O número de defasagens (p=3) foi mantido do seu código original.var_red_diff <-VAR(dados_var_3_diff, p =3, type ="const")#====================== IDENTIFICAÇÃO DOS CHOQUES COM CHOLESKY# A decomposição de Cholesky é um tipo de identificação recursiva.# Para usá-la, informamos à função SVAR que a matriz de choques (Bmat)# é triangular inferior, com elementos a serem estimados.# 1) Definir as dimensões do modelon_vars <-ncol(var_red_diff$y)# 2) Montar Bmat (Matriz de Choques)# Criar uma matriz triangular inferior com zeros na parte superior e NAs na diagonal e parte inferiorBmat <-matrix(NA, nrow = n_vars, ncol = n_vars)Bmat[upper.tri(Bmat)] <-0# Estimar o SVAR# Para a decomposição de Cholesky, a matriz Amat é a identidade.# A função SVAR assume isso como padrão quando Bmat é definida desta forma.svar_mod_cholesky_diff <-SVAR(var_red_diff, Bmat = Bmat)
Warning in SVAR(var_red_diff, Bmat = Bmat): The B-model is just identified. No
test possible.
# Exibir o resumo do modelo.print(svar_mod_cholesky_diff)
#====================== ANÁLISE DO IMPACTO COM FUNÇÕES DE IMPULSO-RESPOSTA# Gerar e plotar as IRFs para analisar o impacto dos choques fiscais no PIB.# 1. Impacto de um choque de DESPESA sobre o PIBirf_despesa_pib_svar_diff <-irf(svar_mod_cholesky_diff,impulse ="d_log_despesa", # Impulso: Choque na Despesaresponse ="d_log_pib", # Resposta: PIBn.ahead =36,ci =0.95,boot =TRUE)
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
plot(irf_despesa_pib_svar_diff,main ="Resposta do PIB a um Choque de Despesa (SVAR-Cholesky)",ylab ="Impacto no PIB (1ª Diferença)",xlab ="Período (trimestres)")
# 2. Impacto de um choque de RECEITA sobre o PIBirf_receita_pib_svar_diff <-irf(svar_mod_cholesky_diff,impulse ="d_log_receita", # Impulso: Choque na Receitaresponse ="d_log_pib", # Resposta: PIBn.ahead =36,ci =0.95,boot =TRUE)
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
Warning in SVAR(x = varboot, Bmat = Bmat): The B-model is just identified. No
test possible.
plot(irf_receita_pib_svar_diff,main ="Resposta do PIB a um Choque de Receita (SVAR-Cholesky)",ylab ="Impacto no PIB (1ª Diferença)",xlab ="Período (trimestres)")
#===== SVEC# Use os dados em nível, pois o VECM lida com a co-integraçãodados_vec <-tibble(log_despesa =log(as.numeric(despesa_real_tri_sa)),log_pib =log(as.numeric(pib_real_tri_sa)),log_receita =log(as.numeric(receita_real_tri_sa)))#====================== TESTE DE CO-INTEGRAÇÃO (JOHANSEN)# O teste de Johansen determina o número de relações de co-integração (r).# Use o número de defasagens (K) apropriado para a sua sériejo_test <-ca.jo(dados_vec, type ="trace", K =2, ecdet ="const")#====================== ESTIMAÇÃO DO SVEC COM CHOLESKY# 1) Definir as dimensõesn_vars <-ncol(dados_vec)r <-2# Usando o rank de co-integração que você encontrou# 2) Montar a matriz SR (Short-Run)# Para a decomposição de Cholesky, B é triangular inferiorSR_mat <-matrix(NA, nrow = n_vars, ncol = n_vars)SR_mat[upper.tri(SR_mat)] <-0# 3) Montar a matriz LR (Long-Run)# A função SVEC exige uma matriz 3x3 de NAs, mesmo sem restrições de longo prazoLR_mat <-matrix(NA, nrow = n_vars, ncol = n_vars)# Estimar o SVECsvec_mod <-SVEC(jo_test, r = r, LR = LR_mat, SR = SR_mat, max.iter =1000)
Warning in SVEC(jo_test, r = r, LR = LR_mat, SR = SR_mat, max.iter = 1000): The
SVEC is just identified. No test possible.
#====================== ANÁLISE DO IMPACTO COM FUNÇÕES DE IMPULSO-RESPOSTA# Gerar e plotar as IRFs para analisar o impacto dos choques fiscais no PIB.# 1. Impacto de um choque de DESPESA sobre o PIBirf_despesa_pib_svec <-irf(svec_mod,impulse ="log_despesa",response ="log_pib",n.ahead =36,ci =0.95,boot =TRUE)plot(irf_despesa_pib_svec,main ="Resposta do PIB a um Choque de Despesa (SVEC-Cholesky)",ylab ="Impacto no PIB (em nível)",xlab ="Período (trimestres)")
# 2. Impacto de um choque de RECEITA sobre o PIBirf_receita_pib_svec <-irf(svec_mod,impulse ="log_receita",response ="log_pib",n.ahead =36,ci =0.95,boot =TRUE)plot(irf_receita_pib_svec,main ="Resposta do PIB a um Choque de Receita (SVEC-Cholesky)",ylab ="Impacto no PIB (em nível)",xlab ="Período (trimestres)")