## Warning: package 'DataExplorer' was built under R version 4.4.1
## Warning: package 'ggplot2' was built under R version 4.4.3
ggplot(NUSEDAT, aes(x= year, y= ttexp))+
geom_line()+
facet_wrap(~region)+
labs(title = "Evolución de las exportaciones", x= "Año", y= "Valor FOB (VAR %)" ) +
scale_x_continuous(breaks = seq(200,2025, by=6))+
theme(axis.text.x = element_text(size = 5))## Warning: Removed 26 rows containing missing values or values outside the scale range
## (`geom_line()`).
NUSEDAT %>%
group_by(region) %>%
summarise(top_exp= mean(ttexp*100, na.rm= TRUE)) %>%
slice_min(top_exp, n=5)library(ggplot2)
ggplot(NUSEDAT, aes(x= year, y= ttpbi))+
geom_line()+
facet_wrap(~region)+
labs(title = "Evolución del PBI", x= "Año")+
scale_x_continuous(breaks = seq(200,2025, by=6))+
theme(axis.text.x = element_text(size = 5))## Warning: Removed 26 rows containing missing values or values outside the scale range
## (`geom_line()`).
library(ggplot2)
ggplot(NUSEDAT, aes(x=year, y= IRBS*100))+
geom_line()+
facet_wrap(~region)+
labs(title = "Evolución del Índice de Bienestar Social", x= "Año", y="IRBS")+
scale_x_continuous(breaks = seq(2000,2024,6))+
theme(axis.text.x = element_text(size = 7))library(ggplot2)
ggplot(NUSEDAT, aes(x = year, y = ind_cap*100)) +
geom_line(show.legend = FALSE) +
facet_wrap(~region) +
labs(title = "Evolución del pilar capital humano",
x = "Año",
y = "Pilar: Capital Humano")+
theme(axis.text.x = element_text(size= 7))+
scale_x_continuous(breaks = seq(2000,2024,6))library(ggplot2)
ggplot(NUSEDAT, aes(x = year, y = ind_segu*100)) +
geom_line(show.legend = FALSE) +
facet_wrap(~region) +
labs(title = "Evolución del pilar seguridad y orden interno por regiones",
x = "Año",
y = "Pilar: Seguridad y orden interno")+
theme(axis.text.x = element_text(size = 7))+
scale_x_continuous(breaks = seq(2000,2024, 6))##
## Call:
## lm(formula = log(pbi) ~ ind_cap + ind_cohes + ind_equi + ind_segu +
## log(exp))
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.57874 -0.57375 -0.08777 0.26650 2.41850
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 12.04656 0.29156 41.317 < 2e-16 ***
## ind_cap 0.08256 0.35591 0.232 0.81663
## ind_cohes 0.55219 0.18820 2.934 0.00346 **
## ind_equi 0.69008 0.21057 3.277 0.00110 **
## ind_segu -0.51475 0.25026 -2.057 0.04010 *
## log(exp) 0.50873 0.01625 31.297 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.778 on 644 degrees of freedom
## Multiple R-squared: 0.6311, Adjusted R-squared: 0.6282
## F-statistic: 220.3 on 5 and 644 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = log(pbi) ~ IRBS + log(exp))
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4182 -0.5972 -0.1045 0.2753 2.2668
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 11.84122 0.25280 46.840 < 2e-16 ***
## IRBS 1.06510 0.41020 2.597 0.00963 **
## log(exp) 0.51755 0.01587 32.617 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.785 on 647 degrees of freedom
## Multiple R-squared: 0.6226, Adjusted R-squared: 0.6214
## F-statistic: 533.7 on 2 and 647 DF, p-value: < 2.2e-16
summary(lm(log(pbi) ~ factor(region) - 1 +
ind_cap:factor(region) +
ind_cohes:factor(region) +
ind_equi:factor(region) +
ind_segu:factor(region)))##
## Call:
## lm(formula = log(pbi) ~ factor(region) - 1 + ind_cap:factor(region) +
## ind_cohes:factor(region) + ind_equi:factor(region) + ind_segu:factor(region))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.46296 -0.04244 0.00796 0.04763 0.53790
##
## Coefficients:
## Estimate Std. Error t value
## factor(region)AMAZONAS 14.478173 0.168009 86.175
## factor(region)ÁNCASH 16.679943 0.198350 84.093
## factor(region)APURÍMAC 14.342267 0.233880 61.323
## factor(region)AREQUIPA 16.794377 0.200795 83.640
## factor(region)AYACUCHO 14.721301 0.220660 66.715
## factor(region)CAJAMARCA 15.977729 0.225826 70.752
## factor(region)CUSCO 16.352373 0.162530 100.611
## factor(region)HUANCAVELICA 14.863434 0.178057 83.475
## factor(region)HUÁNUCO 15.165490 0.213858 70.914
## factor(region)ICA 16.758247 0.279385 59.983
## factor(region)JUNÍN 16.248484 0.225762 71.972
## factor(region)LA LIBERTAD 16.445973 0.138720 118.555
## factor(region)LAMBAYEQUE 15.904542 0.282921 56.216
## factor(region)LIMA METROPOLITANA 18.955334 0.318906 59.439
## factor(region)LIMA PROVINCIAS 18.979676 0.174299 108.891
## factor(region)LORETO 15.847891 0.135733 116.757
## factor(region)MADRE DE DIOS 14.646574 0.207982 70.422
## factor(region)MOQUEGUA 16.345450 0.166964 97.898
## factor(region)PASCO 15.585061 0.246370 63.259
## factor(region)PIURA 16.388904 0.198995 82.359
## factor(region)PROV. CONS. DEL CALLAO 18.531150 0.226136 81.947
## factor(region)PUNO 15.357061 0.318001 48.293
## factor(region)SAN MARTÍN 14.661109 0.181514 80.771
## factor(region)TACNA 15.559511 0.251367 61.899
## factor(region)TUMBES 14.054576 0.210473 66.776
## factor(region)UCAYALI 15.023670 0.237066 63.373
## factor(region)AMAZONAS:ind_cap 0.377046 0.248055 1.520
## factor(region)ÁNCASH:ind_cap 0.165987 0.345332 0.481
## factor(region)APURÍMAC:ind_cap 0.623508 0.278325 2.240
## factor(region)AREQUIPA:ind_cap 0.845234 0.354165 2.387
## factor(region)AYACUCHO:ind_cap 0.200712 0.272636 0.736
## factor(region)CAJAMARCA:ind_cap -0.151130 0.342336 -0.441
## factor(region)CUSCO:ind_cap 0.091816 0.237137 0.387
## factor(region)HUANCAVELICA:ind_cap -0.039421 0.278436 -0.142
## factor(region)HUÁNUCO:ind_cap 0.582673 0.256910 2.268
## factor(region)ICA:ind_cap -0.230795 0.268924 -0.858
## factor(region)JUNÍN:ind_cap 0.742750 0.356287 2.085
## factor(region)LA LIBERTAD:ind_cap -0.124917 0.373851 -0.334
## factor(region)LAMBAYEQUE:ind_cap 0.675044 0.277762 2.430
## factor(region)LIMA METROPOLITANA:ind_cap 0.242108 0.290297 0.834
## factor(region)LIMA PROVINCIAS:ind_cap 0.314170 0.233200 1.347
## factor(region)LORETO:ind_cap -0.051713 0.218459 -0.237
## factor(region)MADRE DE DIOS:ind_cap 0.125441 0.247093 0.508
## factor(region)MOQUEGUA:ind_cap -0.282543 0.280614 -1.007
## factor(region)PASCO:ind_cap -0.171689 0.307162 -0.559
## factor(region)PIURA:ind_cap 0.306325 0.239356 1.280
## factor(region)PROV. CONS. DEL CALLAO:ind_cap 0.327881 0.305447 1.073
## factor(region)PUNO:ind_cap 0.582748 0.351588 1.657
## factor(region)SAN MARTÍN:ind_cap 0.448764 0.294060 1.526
## factor(region)TACNA:ind_cap 0.229799 0.274452 0.837
## factor(region)TUMBES:ind_cap 0.278849 0.232503 1.199
## factor(region)UCAYALI:ind_cap -0.012691 0.270468 -0.047
## factor(region)AMAZONAS:ind_cohes 0.026859 0.132914 0.202
## factor(region)ÁNCASH:ind_cohes -0.252321 0.148670 -1.697
## factor(region)APURÍMAC:ind_cohes -1.310919 0.165347 -7.928
## factor(region)AREQUIPA:ind_cohes -0.359911 0.179185 -2.009
## factor(region)AYACUCHO:ind_cohes -0.041356 0.172579 -0.240
## factor(region)CAJAMARCA:ind_cohes -0.080116 0.135375 -0.592
## factor(region)CUSCO:ind_cohes -0.115198 0.151417 -0.761
## factor(region)HUANCAVELICA:ind_cohes -0.197841 0.134209 -1.474
## factor(region)HUÁNUCO:ind_cohes -0.483721 0.142344 -3.398
## factor(region)ICA:ind_cohes -0.416086 0.140017 -2.972
## factor(region)JUNÍN:ind_cohes -0.641556 0.179994 -3.564
## factor(region)LA LIBERTAD:ind_cohes -0.185899 0.137859 -1.348
## factor(region)LAMBAYEQUE:ind_cohes -0.420851 0.184479 -2.281
## factor(region)LIMA METROPOLITANA:ind_cohes -0.382805 0.170773 -2.242
## factor(region)LIMA PROVINCIAS:ind_cohes -0.513100 0.139972 -3.666
## factor(region)LORETO:ind_cohes -0.147487 0.097386 -1.514
## factor(region)MADRE DE DIOS:ind_cohes 0.180251 0.143689 1.254
## factor(region)MOQUEGUA:ind_cohes -0.563522 0.136565 -4.126
## factor(region)PASCO:ind_cohes -0.135585 0.161016 -0.842
## factor(region)PIURA:ind_cohes -0.334920 0.147472 -2.271
## factor(region)PROV. CONS. DEL CALLAO:ind_cohes -0.201774 0.148718 -1.357
## factor(region)PUNO:ind_cohes -0.072528 0.202942 -0.357
## factor(region)SAN MARTÍN:ind_cohes -0.187711 0.112364 -1.671
## factor(region)TACNA:ind_cohes -0.594588 0.136121 -4.368
## factor(region)TUMBES:ind_cohes -0.250408 0.145027 -1.727
## factor(region)UCAYALI:ind_cohes -0.201573 0.149271 -1.350
## factor(region)AMAZONAS:ind_equi 0.471799 0.148381 3.180
## factor(region)ÁNCASH:ind_equi 0.002896 0.171012 0.017
## factor(region)APURÍMAC:ind_equi 0.854453 0.187171 4.565
## factor(region)AREQUIPA:ind_equi -0.024965 0.181808 -0.137
## factor(region)AYACUCHO:ind_equi 0.714289 0.243424 2.934
## factor(region)CAJAMARCA:ind_equi 0.425453 0.258257 1.647
## factor(region)CUSCO:ind_equi 0.651214 0.155937 4.176
## factor(region)HUANCAVELICA:ind_equi 0.306314 0.152945 2.003
## factor(region)HUÁNUCO:ind_equi 0.131545 0.173043 0.760
## factor(region)ICA:ind_equi 0.634529 0.166208 3.818
## factor(region)JUNÍN:ind_equi 0.001950 0.258992 0.008
## factor(region)LA LIBERTAD:ind_equi 0.392136 0.190576 2.058
## factor(region)LAMBAYEQUE:ind_equi 0.054371 0.214724 0.253
## factor(region)LIMA METROPOLITANA:ind_equi 0.303974 0.126201 2.409
## factor(region)LIMA PROVINCIAS:ind_equi 0.220199 0.166660 1.321
## factor(region)LORETO:ind_equi 0.211623 0.103897 2.037
## factor(region)MADRE DE DIOS:ind_equi 0.050081 0.137583 0.364
## factor(region)MOQUEGUA:ind_equi -0.127725 0.138039 -0.925
## factor(region)PASCO:ind_equi -0.017880 0.186289 -0.096
## factor(region)PIURA:ind_equi 0.373763 0.137204 2.724
## factor(region)PROV. CONS. DEL CALLAO:ind_equi 0.434549 0.210719 2.062
## factor(region)PUNO:ind_equi 0.404501 0.203407 1.989
## factor(region)SAN MARTÍN:ind_equi 0.712451 0.132845 5.363
## factor(region)TACNA:ind_equi -0.056284 0.143062 -0.393
## factor(region)TUMBES:ind_equi 0.472443 0.123267 3.833
## factor(region)UCAYALI:ind_equi 0.382203 0.094123 4.061
## factor(region)AMAZONAS:ind_segu -0.271900 0.219011 -1.241
## factor(region)ÁNCASH:ind_segu 0.116852 0.181424 0.644
## factor(region)APURÍMAC:ind_segu 0.869343 0.272797 3.187
## factor(region)AREQUIPA:ind_segu -0.157755 0.271219 -0.582
## factor(region)AYACUCHO:ind_segu 0.206509 0.174014 1.187
## factor(region)CAJAMARCA:ind_segu 0.094497 0.332708 0.284
## factor(region)CUSCO:ind_segu -0.123434 0.180723 -0.683
## factor(region)HUANCAVELICA:ind_segu 0.038413 0.188881 0.203
## factor(region)HUÁNUCO:ind_segu 0.075491 0.268305 0.281
## factor(region)ICA:ind_segu -0.505464 0.259282 -1.949
## factor(region)JUNÍN:ind_segu -0.102849 0.200659 -0.513
## factor(region)LA LIBERTAD:ind_segu 0.368474 0.203799 1.808
## factor(region)LAMBAYEQUE:ind_segu 0.061524 0.308250 0.200
## factor(region)LIMA METROPOLITANA:ind_segu 0.019658 0.214882 0.091
## factor(region)LIMA PROVINCIAS:ind_segu 0.142997 0.257612 0.555
## factor(region)LORETO:ind_segu 0.099720 0.216587 0.460
## factor(region)MADRE DE DIOS:ind_segu -0.544393 0.188542 -2.887
## factor(region)MOQUEGUA:ind_segu 0.255123 0.162167 1.573
## factor(region)PASCO:ind_segu 0.037510 0.190495 0.197
## factor(region)PIURA:ind_segu 0.042363 0.211029 0.201
## factor(region)PROV. CONS. DEL CALLAO:ind_segu 0.380187 0.257879 1.474
## factor(region)PUNO:ind_segu 0.027286 0.215014 0.127
## factor(region)SAN MARTÍN:ind_segu 0.303459 0.214408 1.415
## factor(region)TACNA:ind_segu 0.582293 0.213818 2.723
## factor(region)TUMBES:ind_segu 0.499258 0.167760 2.976
## factor(region)UCAYALI:ind_segu 0.071040 0.233765 0.304
## Pr(>|t|)
## factor(region)AMAZONAS < 2e-16 ***
## factor(region)ÁNCASH < 2e-16 ***
## factor(region)APURÍMAC < 2e-16 ***
## factor(region)AREQUIPA < 2e-16 ***
## factor(region)AYACUCHO < 2e-16 ***
## factor(region)CAJAMARCA < 2e-16 ***
## factor(region)CUSCO < 2e-16 ***
## factor(region)HUANCAVELICA < 2e-16 ***
## factor(region)HUÁNUCO < 2e-16 ***
## factor(region)ICA < 2e-16 ***
## factor(region)JUNÍN < 2e-16 ***
## factor(region)LA LIBERTAD < 2e-16 ***
## factor(region)LAMBAYEQUE < 2e-16 ***
## factor(region)LIMA METROPOLITANA < 2e-16 ***
## factor(region)LIMA PROVINCIAS < 2e-16 ***
## factor(region)LORETO < 2e-16 ***
## factor(region)MADRE DE DIOS < 2e-16 ***
## factor(region)MOQUEGUA < 2e-16 ***
## factor(region)PASCO < 2e-16 ***
## factor(region)PIURA < 2e-16 ***
## factor(region)PROV. CONS. DEL CALLAO < 2e-16 ***
## factor(region)PUNO < 2e-16 ***
## factor(region)SAN MARTÍN < 2e-16 ***
## factor(region)TACNA < 2e-16 ***
## factor(region)TUMBES < 2e-16 ***
## factor(region)UCAYALI < 2e-16 ***
## factor(region)AMAZONAS:ind_cap 0.129116
## factor(region)ÁNCASH:ind_cap 0.630960
## factor(region)APURÍMAC:ind_cap 0.025499 *
## factor(region)AREQUIPA:ind_cap 0.017364 *
## factor(region)AYACUCHO:ind_cap 0.461948
## factor(region)CAJAMARCA:ind_cap 0.659058
## factor(region)CUSCO:ind_cap 0.698776
## factor(region)HUANCAVELICA:ind_cap 0.887467
## factor(region)HUÁNUCO:ind_cap 0.023738 *
## factor(region)ICA:ind_cap 0.391168
## factor(region)JUNÍN:ind_cap 0.037584 *
## factor(region)LA LIBERTAD:ind_cap 0.738411
## factor(region)LAMBAYEQUE:ind_cap 0.015424 *
## factor(region)LIMA METROPOLITANA:ind_cap 0.404663
## factor(region)LIMA PROVINCIAS:ind_cap 0.178498
## factor(region)LORETO:ind_cap 0.812969
## factor(region)MADRE DE DIOS:ind_cap 0.611901
## factor(region)MOQUEGUA:ind_cap 0.314464
## factor(region)PASCO:ind_cap 0.576434
## factor(region)PIURA:ind_cap 0.201191
## factor(region)PROV. CONS. DEL CALLAO:ind_cap 0.283570
## factor(region)PUNO:ind_cap 0.098027 .
## factor(region)SAN MARTÍN:ind_cap 0.127594
## factor(region)TACNA:ind_cap 0.402808
## factor(region)TUMBES:ind_cap 0.230943
## factor(region)UCAYALI:ind_cap 0.962593
## factor(region)AMAZONAS:ind_cohes 0.839932
## factor(region)ÁNCASH:ind_cohes 0.090260 .
## factor(region)APURÍMAC:ind_cohes 1.37e-14 ***
## factor(region)AREQUIPA:ind_cohes 0.045097 *
## factor(region)AYACUCHO:ind_cohes 0.810706
## factor(region)CAJAMARCA:ind_cohes 0.554238
## factor(region)CUSCO:ind_cohes 0.447120
## factor(region)HUANCAVELICA:ind_cohes 0.141055
## factor(region)HUÁNUCO:ind_cohes 0.000730 ***
## factor(region)ICA:ind_cohes 0.003099 **
## factor(region)JUNÍN:ind_cohes 0.000398 ***
## factor(region)LA LIBERTAD:ind_cohes 0.178093
## factor(region)LAMBAYEQUE:ind_cohes 0.022934 *
## factor(region)LIMA METROPOLITANA:ind_cohes 0.025408 *
## factor(region)LIMA PROVINCIAS:ind_cohes 0.000272 ***
## factor(region)LORETO:ind_cohes 0.130518
## factor(region)MADRE DE DIOS:ind_cohes 0.210242
## factor(region)MOQUEGUA:ind_cohes 4.29e-05 ***
## factor(region)PASCO:ind_cohes 0.400142
## factor(region)PIURA:ind_cohes 0.023550 *
## factor(region)PROV. CONS. DEL CALLAO:ind_cohes 0.175449
## factor(region)PUNO:ind_cohes 0.720952
## factor(region)SAN MARTÍN:ind_cohes 0.095409 .
## factor(region)TACNA:ind_cohes 1.51e-05 ***
## factor(region)TUMBES:ind_cohes 0.084828 .
## factor(region)UCAYALI:ind_cohes 0.177481
## factor(region)AMAZONAS:ind_equi 0.001562 **
## factor(region)ÁNCASH:ind_equi 0.986493
## factor(region)APURÍMAC:ind_equi 6.24e-06 ***
## factor(region)AREQUIPA:ind_equi 0.890836
## factor(region)AYACUCHO:ind_equi 0.003490 **
## factor(region)CAJAMARCA:ind_equi 0.100079
## factor(region)CUSCO:ind_equi 3.48e-05 ***
## factor(region)HUANCAVELICA:ind_equi 0.045720 *
## factor(region)HUÁNUCO:ind_equi 0.447488
## factor(region)ICA:ind_equi 0.000151 ***
## factor(region)JUNÍN:ind_equi 0.993995
## factor(region)LA LIBERTAD:ind_equi 0.040123 *
## factor(region)LAMBAYEQUE:ind_equi 0.800204
## factor(region)LIMA METROPOLITANA:ind_equi 0.016359 *
## factor(region)LIMA PROVINCIAS:ind_equi 0.186999
## factor(region)LORETO:ind_equi 0.042171 *
## factor(region)MADRE DE DIOS:ind_equi 0.716001
## factor(region)MOQUEGUA:ind_equi 0.355247
## factor(region)PASCO:ind_equi 0.923573
## factor(region)PIURA:ind_equi 0.006664 **
## factor(region)PROV. CONS. DEL CALLAO:ind_equi 0.039683 *
## factor(region)PUNO:ind_equi 0.047266 *
## factor(region)SAN MARTÍN:ind_equi 1.23e-07 ***
## factor(region)TACNA:ind_equi 0.694167
## factor(region)TUMBES:ind_equi 0.000142 ***
## factor(region)UCAYALI:ind_equi 5.65e-05 ***
## factor(region)AMAZONAS:ind_segu 0.214985
## factor(region)ÁNCASH:ind_segu 0.519806
## factor(region)APURÍMAC:ind_segu 0.001525 **
## factor(region)AREQUIPA:ind_segu 0.561054
## factor(region)AYACUCHO:ind_segu 0.235873
## factor(region)CAJAMARCA:ind_segu 0.776506
## factor(region)CUSCO:ind_segu 0.494910
## factor(region)HUANCAVELICA:ind_segu 0.838925
## factor(region)HUÁNUCO:ind_segu 0.778545
## factor(region)ICA:ind_segu 0.051776 .
## factor(region)JUNÍN:ind_segu 0.608478
## factor(region)LA LIBERTAD:ind_segu 0.071180 .
## factor(region)LAMBAYEQUE:ind_segu 0.841879
## factor(region)LIMA METROPOLITANA:ind_segu 0.927145
## factor(region)LIMA PROVINCIAS:ind_segu 0.579076
## factor(region)LORETO:ind_segu 0.645412
## factor(region)MADRE DE DIOS:ind_segu 0.004046 **
## factor(region)MOQUEGUA:ind_segu 0.116279
## factor(region)PASCO:ind_segu 0.843977
## factor(region)PIURA:ind_segu 0.840975
## factor(region)PROV. CONS. DEL CALLAO:ind_segu 0.141010
## factor(region)PUNO:ind_segu 0.899067
## factor(region)SAN MARTÍN:ind_segu 0.157569
## factor(region)TACNA:ind_segu 0.006680 **
## factor(region)TUMBES:ind_segu 0.003056 **
## factor(region)UCAYALI:ind_segu 0.761330
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.09771 on 520 degrees of freedom
## Multiple R-squared: 1, Adjusted R-squared: 1
## F-statistic: 1.372e+05 on 130 and 520 DF, p-value: < 2.2e-16
## Warning: package 'plm' was built under R version 4.4.1
##
## Adjuntando el paquete: 'plm'
## The following objects are masked from 'package:dplyr':
##
## between, lag, lead
fijo_pi <- plm(log(pbi)~ind_cap+ind_cohes+ind_equi+ind_segu+log(exp), index = c("region","year"), model = "within", data= NUSEDAT)
summary(fijo_pi)## Oneway (individual) effect Within Model
##
## Call:
## plm(formula = log(pbi) ~ ind_cap + ind_cohes + ind_equi + ind_segu +
## log(exp), data = NUSEDAT, model = "within", index = c("region",
## "year"))
##
## Balanced Panel: n = 26, T = 25, N = 650
##
## Residuals:
## Min. 1st Qu. Median 3rd Qu. Max.
## -0.431514 -0.075143 -0.006775 0.070220 0.549142
##
## Coefficients:
## Estimate Std. Error t-value Pr(>|t|)
## ind_cap 0.2992083 0.0638954 4.6828 3.480e-06 ***
## ind_cohes -0.2174159 0.0345333 -6.2958 5.795e-10 ***
## ind_equi 0.3005527 0.0368835 8.1487 2.041e-15 ***
## ind_segu 0.0759248 0.0478399 1.5871 0.113
## log(exp) 0.0888265 0.0081785 10.8610 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Total Sum of Squares: 30.5
## Residual Sum of Squares: 10.53
## R-Squared: 0.65477
## Adj. R-Squared: 0.63804
## F-statistic: 234.798 on 5 and 619 DF, p-value: < 2.22e-16
library(plm)
aleatorio_pi <- plm(log(pbi)~ind_cap+ind_cohes+ind_equi+ind_segu+log(exp), index = c("region","year"), model = "random", data= NUSEDAT)
summary(aleatorio_pi)## Oneway (individual) effect Random Effect Model
## (Swamy-Arora's transformation)
##
## Call:
## plm(formula = log(pbi) ~ ind_cap + ind_cohes + ind_equi + ind_segu +
## log(exp), data = NUSEDAT, model = "random", index = c("region",
## "year"))
##
## Balanced Panel: n = 26, T = 25, N = 650
##
## Effects:
## var std.dev share
## idiosyncratic 0.01701 0.13042 0.033
## individual 0.50481 0.71050 0.967
## theta: 0.9633
##
## Residuals:
## Min. 1st Qu. Median 3rd Qu. Max.
## -0.4684571 -0.0877581 -0.0012459 0.0836587 0.4961057
##
## Coefficients:
## Estimate Std. Error z-value Pr(>|z|)
## (Intercept) 15.2123421 0.1632885 93.1624 < 2.2e-16 ***
## ind_cap 0.2974517 0.0658184 4.5193 6.205e-06 ***
## ind_cohes -0.2140443 0.0355695 -6.0176 1.770e-09 ***
## ind_equi 0.3004044 0.0379950 7.9064 2.649e-15 ***
## ind_segu 0.0723603 0.0492728 1.4686 0.142
## log(exp) 0.0941463 0.0083783 11.2369 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Total Sum of Squares: 31.881
## Residual Sum of Squares: 11.627
## R-Squared: 0.63531
## Adj. R-Squared: 0.63248
## Chisq: 1121.89 on 5 DF, p-value: < 2.22e-16
library(plm)
fijo_ind <- plm(log(pbi)~IRBS+log(exp), index = c("region","year"), model = "within", data= NUSEDAT)
summary(fijo_ind)## Oneway (individual) effect Within Model
##
## Call:
## plm(formula = log(pbi) ~ IRBS + log(exp), data = NUSEDAT, model = "within",
## index = c("region", "year"))
##
## Balanced Panel: n = 26, T = 25, N = 650
##
## Residuals:
## Min. 1st Qu. Median 3rd Qu. Max.
## -0.4206037 -0.1139524 -0.0044547 0.0929421 0.6110343
##
## Coefficients:
## Estimate Std. Error t-value Pr(>|t|)
## IRBS 1.356487 0.095510 14.203 < 2.2e-16 ***
## log(exp) 0.134082 0.010254 13.076 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Total Sum of Squares: 30.5
## Residual Sum of Squares: 17.916
## R-Squared: 0.41259
## Adj. R-Squared: 0.38709
## F-statistic: 218.441 on 2 and 622 DF, p-value: < 2.22e-16
aleatorio_ind <- plm(log(pbi)~IRBS+log(exp), index = c("region","year"), model = "random", data= NUSEDAT)
summary(aleatorio_ind)## Oneway (individual) effect Random Effect Model
## (Swamy-Arora's transformation)
##
## Call:
## plm(formula = log(pbi) ~ IRBS + log(exp), data = NUSEDAT, model = "random",
## index = c("region", "year"))
##
## Balanced Panel: n = 26, T = 25, N = 650
##
## Effects:
## var std.dev share
## idiosyncratic 0.0288 0.1697 0.048
## individual 0.5769 0.7596 0.952
## theta: 0.9554
##
## Residuals:
## Min. 1st Qu. Median 3rd Qu. Max.
## -0.4652583 -0.1107972 -0.0076255 0.0959372 0.5615118
##
## Coefficients:
## Estimate Std. Error z-value Pr(>|z|)
## (Intercept) 14.395740 0.174040 82.715 < 2.2e-16 ***
## IRBS 1.346104 0.097366 13.825 < 2.2e-16 ***
## log(exp) 0.140830 0.010375 13.574 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Total Sum of Squares: 32.545
## Residual Sum of Squares: 19.382
## R-Squared: 0.40447
## Adj. R-Squared: 0.40262
## Chisq: 439.419 on 2 DF, p-value: < 2.22e-16