Universitas : UIN MAULANA MALIK IBRAHIM MALANG
Jurusan : Teknik Informatika
Inflow, disebut investasi sebagai langsung dalam ekonomi pelaporan, termasuk semua kewajiban dan aset yang ditransfer antara perusahaan investasi langsung penduduk dan investor langsung mereka. Ini juga mencakup transfer aset dan kewajiban antara perusahaan yang bertempat tinggal dan yang tidak residen, jika orang tua pengendali utama adalah bukan penduduk.
Outflow, disebut sebagai investasi langsung di luar negeri, termasuk aset dan kewajiban yang ditransfer antara investor langsung penduduk dan perusahaan investasi langsung mereka. Ini juga mencakup transfer aset dan kewajiban antara sesama dan non-residen perusahaan, jika orang tua pengendali utama adalah penduduk. Investasi langsung keluar juga disebut investasi langsung di luar negeri.
library(readxl)
datainflow <- read_excel(path = "InflowTahun.xlsx")
## New names:
## * `` -> ...2
datainflow
## # A tibble: 12 x 12
## Keterangan ...2 `Bali Nusra` Bali `Nusa Tenggara Barat` `Nusa Tenggara T~`
## <dbl> <lgl> <dbl> <dbl> <dbl> <dbl>
## 1 NA NA NA NA NA NA
## 2 2011 NA 10322. 6394. 1803. 2125.
## 3 2012 NA 14613. 8202. 3676. 2735.
## 4 2013 NA 17512. 5066. 7024. 5422.
## 5 2014 NA 20807. 11590. 5704. 3512.
## 6 2015 NA 23008. 13072. 6285. 3651.
## 7 2016 NA 30965. 17914. 8842. 4210.
## 8 2017 NA 30797. 16962. 8383. 5452.
## 9 2018 NA 33866. 18610. 9140. 6116.
## 10 2019 NA 38116. 21422. 9614. 7080.
## 11 2020 NA 29400. 14735. 8007. 6657.
## 12 2021 NA 18892. 7505. 5888. 5498.
## # ... with 6 more variables: Kalimantan <dbl>, `Kalimantan Barat` <dbl>,
## # `Kalimantan Tengah` <dbl>, `Kalimantan Selatan` <dbl>,
## # `Kalimantan Timur` <dbl>, `Kalimantan Utara` <dbl>
library (readxl)
dataoutflow <- read_excel(path = "OutflowTahun.xlsx")
dataoutflow
## # A tibble: 11 x 10
## Tahun Bali `Nusa Tenggara Ba~` `Nusa Tenggara~` Kalimantan `Kalimantan Ba~`
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 2011 8912. 3819. 3693. 29535. 5221.
## 2 2012 10782. 4379. 4260. 33444. 5698.
## 3 2013 7248. 10628. 11524. 44929. 6011.
## 4 2014 13104. 5620. 4668. 38772. 6764.
## 5 2015 14471. 6728. 5530. 41945. 8486.
## 6 2016 18140. 8149. 5652. 42179. 9402.
## 7 2017 17822. 8770. 7569. 50404. 11132.
## 8 2018 20434. 9271. 7555. 53989. 12278.
## 9 2019 20654. 10288. 7738. 57579. 13768.
## 10 2020 14323. 8546. 8356. 52060. 13501.
## 11 2021 6531. 5222. 3472. 30291. 6958.
## # ... with 4 more variables: `Kalimantan Tengah` <dbl>,
## # `Kalimantan Selatan` <dbl>, `Kalimantan Timur` <dbl>,
## # `Kalimantan Utara` <dbl>
dataoutflow
## # A tibble: 11 x 10
## Tahun Bali `Nusa Tenggara Ba~` `Nusa Tenggara~` Kalimantan `Kalimantan Ba~`
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 2011 8912. 3819. 3693. 29535. 5221.
## 2 2012 10782. 4379. 4260. 33444. 5698.
## 3 2013 7248. 10628. 11524. 44929. 6011.
## 4 2014 13104. 5620. 4668. 38772. 6764.
## 5 2015 14471. 6728. 5530. 41945. 8486.
## 6 2016 18140. 8149. 5652. 42179. 9402.
## 7 2017 17822. 8770. 7569. 50404. 11132.
## 8 2018 20434. 9271. 7555. 53989. 12278.
## 9 2019 20654. 10288. 7738. 57579. 13768.
## 10 2020 14323. 8546. 8356. 52060. 13501.
## 11 2021 6531. 5222. 3472. 30291. 6958.
## # ... with 4 more variables: `Kalimantan Tengah` <dbl>,
## # `Kalimantan Selatan` <dbl>, `Kalimantan Timur` <dbl>,
## # `Kalimantan Utara` <dbl>
plot(datainflow$Keterangan,datainflow$Bali,type = "l", col= "steelblue")
plot(dataoutflow$Tahun,dataoutflow$Bali,type = "l", col= "red")
plot(datainflow$Keterangan,datainflow$Bali,type = "l", col= "steelblue")
lines(dataoutflow$Tahun,dataoutflow$Bali,col="red")
legend("top",c("Inflow","Outflow"),fill=c("green","steelblue"))
library(readxl)
datainflowperbulan <- read_excel(path = "InflowBulan.xlsx")
## New names:
## * `` -> ...2
datainflowperbulan
## # A tibble: 128 x 12
## Bulan ...2 `Bali Nusra` Bali `Nusa Tenggara Barat`
## <dttm> <lgl> <dbl> <dbl> <dbl>
## 1 2011-01-01 00:00:00 NA 912. 463. 93.8
## 2 2011-02-01 00:00:00 NA 591. 401. 82.1
## 3 2011-03-01 00:00:00 NA 869. 532. 125.
## 4 2011-04-01 00:00:00 NA 709. 431. 124.
## 5 2011-05-01 00:00:00 NA 754. 474. 113.
## 6 2011-06-01 00:00:00 NA 633. 393. 105.
## 7 2011-07-01 00:00:00 NA 856. 585. 137.
## 8 2011-08-01 00:00:00 NA 607. 328. 136.
## 9 2011-09-01 00:00:00 NA 1965. 1434. 292.
## 10 2011-10-01 00:00:00 NA 874. 522. 184.
## # ... with 118 more rows, and 7 more variables: `Nusa Tenggara Timur` <dbl>,
## # Kalimantan <dbl>, `Kalimantan Barat` <dbl>, `Kalimantan Tengah` <dbl>,
## # `Kalimantan Selatan` <dbl>, `Kalimantan Timur` <dbl>,
## # `Kalimantan Utara` <dbl>
dataoutflowperbulan <- read_excel(path = "OutflowBulan.xlsx")
datainflowperbulan
## # A tibble: 128 x 12
## Bulan ...2 `Bali Nusra` Bali `Nusa Tenggara Barat`
## <dttm> <lgl> <dbl> <dbl> <dbl>
## 1 2011-01-01 00:00:00 NA 912. 463. 93.8
## 2 2011-02-01 00:00:00 NA 591. 401. 82.1
## 3 2011-03-01 00:00:00 NA 869. 532. 125.
## 4 2011-04-01 00:00:00 NA 709. 431. 124.
## 5 2011-05-01 00:00:00 NA 754. 474. 113.
## 6 2011-06-01 00:00:00 NA 633. 393. 105.
## 7 2011-07-01 00:00:00 NA 856. 585. 137.
## 8 2011-08-01 00:00:00 NA 607. 328. 136.
## 9 2011-09-01 00:00:00 NA 1965. 1434. 292.
## 10 2011-10-01 00:00:00 NA 874. 522. 184.
## # ... with 118 more rows, and 7 more variables: `Nusa Tenggara Timur` <dbl>,
## # Kalimantan <dbl>, `Kalimantan Barat` <dbl>, `Kalimantan Tengah` <dbl>,
## # `Kalimantan Selatan` <dbl>, `Kalimantan Timur` <dbl>,
## # `Kalimantan Utara` <dbl>
dataoutflowperbulan
## # A tibble: 128 x 11
## Bulan `Bali Nusra` Bali `Nusa Tenggara Barat` `Nusa Tenggara~`
## <dttm> <dbl> <dbl> <dbl> <dbl>
## 1 2011-01-01 00:00:00 423. 177. 194. 51.9
## 2 2011-02-01 00:00:00 482. 353. 40.9 87.6
## 3 2011-03-01 00:00:00 989. 581. 273. 136.
## 4 2011-04-01 00:00:00 1207. 662. 343. 202.
## 5 2011-05-01 00:00:00 1168. 652. 279. 237.
## 6 2011-06-01 00:00:00 1476. 852. 351. 273.
## 7 2011-07-01 00:00:00 1536. 746. 319. 471.
## 8 2011-08-01 00:00:00 3084. 1888. 796. 400.
## 9 2011-09-01 00:00:00 926. 458. 293. 175.
## 10 2011-10-01 00:00:00 1321. 609. 399. 313.
## # ... with 118 more rows, and 6 more variables: Kalimantan <dbl>,
## # `Kalimantan Barat` <dbl>, `Kalimantan Tengah` <dbl>,
## # `Kalimantan Selatan` <dbl>, `Kalimantan Timur` <dbl>,
## # `Kalimantan Utara` <dbl>
plot(datainflowperbulan$Bali, type = "l", col = "steelblue")
lines(dataoutflowperbulan$Bali,col="red")
legend("top",c("Inflow","Outflow"),fill=c("steelblue","red"))
Balitimeseries <- datainflowperbulan$Bali
plot.ts(Balitimeseries , type = "l", col = "steelblue")
logBali <- log(datainflowperbulan$Bali)
plot.ts(logBali)
Baliinflowtimeseries <- ts(datainflowperbulan$Bali, frequency=12, start=c(2011,1))
Baliinflowtimeseries
## Jan Feb Mar Apr May Jun Jul
## 2011 463.4942 401.2705 531.8321 430.9272 474.4475 393.3474 585.2862
## 2012 762.4934 914.6596 603.7560 585.8805 728.3468 587.1981 596.7980
## 2013 504.5470 225.2885 144.5615 138.7439 154.8955 140.1864 181.5579
## 2014 1580.2015 1062.1237 689.1191 989.9306 589.6238 1027.5450 499.7980
## 2015 2142.3029 977.6232 965.6738 1078.2866 916.6191 815.5232 1816.1220
## 2016 2074.5030 1651.8148 1349.2410 1088.3478 1353.8161 952.5911 2201.8241
## 2017 2052.4898 1421.0190 1101.7151 1574.5009 1468.2795 832.9708 2545.4088
## 2018 2241.5629 1242.8403 1018.0038 1503.9253 850.0291 2939.5841 1575.9134
## 2019 3472.2707 1615.9872 1701.0987 1460.2353 1252.9815 2856.2398 1316.8511
## 2020 2986.7851 1546.2565 1229.2731 1473.7059 1016.1529 1296.2055 835.0932
## 2021 2434.9203 871.2755 774.6759 852.3260 1078.5028 501.8520 395.7334
## Aug Sep Oct Nov Dec
## 2011 328.0076 1434.0210 522.3054 515.8948 313.5151
## 2012 722.4166 871.1744 622.0534 802.9841 404.7057
## 2013 628.6199 741.6369 633.2221 1035.4237 537.7725
## 2014 1880.5043 878.8203 894.8855 995.4530 501.9600
## 2015 1003.7575 849.1843 865.9261 975.2170 665.4194
## 2016 1280.5338 1804.2490 1450.3419 1467.4868 1238.9536
## 2017 1177.3180 1206.4513 1048.4978 1787.1670 746.2877
## 2018 1537.0602 1540.6172 1925.8187 1558.4903 675.7620
## 2019 1640.0412 1524.4376 1758.9356 1566.7674 1255.8585
## 2020 832.4055 1163.7777 660.4813 1155.9158 539.1009
## 2021 595.8928
Balioutflowtimeseries <- ts(dataoutflowperbulan$Bali, frequency=12, start=c(2011,1))
Balioutflowtimeseries
## Jan Feb Mar Apr May Jun
## 2011 177.04785 353.18190 580.84406 662.00472 652.35527 852.01834
## 2012 451.04246 341.39192 830.24284 688.71274 904.20054 1196.88221
## 2013 57.18282 214.88582 231.08275 240.06173 465.74861 437.29678
## 2014 539.79219 545.37326 1297.23545 706.53950 1253.95573 708.63728
## 2015 448.78833 824.46903 816.20727 1369.16692 887.81091 1207.45967
## 2016 467.61312 1284.03949 1185.71883 1072.46665 1332.92351 2701.59907
## 2017 664.22361 940.12622 2369.52057 911.87713 1340.86594 3569.26368
## 2018 441.30460 1156.29890 1850.51681 1273.03798 2789.95571 2614.49313
## 2019 362.28166 1287.88184 2032.19820 1594.95019 4132.40136 681.97264
## 2020 998.41301 1560.90210 1466.22016 771.87655 1129.30582 598.21047
## 2021 208.86741 606.52211 940.73108 1365.48474 1381.95964 839.89621
## Jul Aug Sep Oct Nov Dec
## 2011 745.90148 1888.16025 458.37649 608.86935 572.37848 1360.66160
## 2012 840.91454 1898.63637 387.91387 772.62723 857.06659 1612.13863
## 2013 674.75666 507.77241 922.70871 931.60575 804.41288 1760.04933
## 2014 2669.93489 733.76944 1017.97525 1149.32633 770.15061 1710.94016
## 2015 2976.88610 953.14580 968.62953 898.48387 948.15400 2171.43853
## 2016 1644.16987 1701.46965 1780.98094 1467.68976 1337.69222 2163.22355
## 2017 781.43826 1801.45865 1017.94123 1565.91417 1111.98409 1747.07757
## 2018 1206.27367 1944.98961 1483.80701 1389.89394 1240.50547 3042.89475
## 2019 1962.25710 1375.85971 1406.26619 1366.25863 1482.11267 2969.92057
## 2020 1147.79277 1027.66274 1053.31914 1419.90221 772.16276 2376.77159
## 2021 752.80505 434.30228
plot.ts(Baliinflowtimeseries)
plot.ts(Balioutflowtimeseries)
Baliintimeseriescomponents <- decompose(Baliinflowtimeseries)
Baliintimeseriescomponents$seasonal
## Jan Feb Mar Apr May
## 2011 872.9690241 0.3238317 -199.9542593 -78.1078782 -255.3564776
## 2012 872.9690241 0.3238317 -199.9542593 -78.1078782 -255.3564776
## 2013 872.9690241 0.3238317 -199.9542593 -78.1078782 -255.3564776
## 2014 872.9690241 0.3238317 -199.9542593 -78.1078782 -255.3564776
## 2015 872.9690241 0.3238317 -199.9542593 -78.1078782 -255.3564776
## 2016 872.9690241 0.3238317 -199.9542593 -78.1078782 -255.3564776
## 2017 872.9690241 0.3238317 -199.9542593 -78.1078782 -255.3564776
## 2018 872.9690241 0.3238317 -199.9542593 -78.1078782 -255.3564776
## 2019 872.9690241 0.3238317 -199.9542593 -78.1078782 -255.3564776
## 2020 872.9690241 0.3238317 -199.9542593 -78.1078782 -255.3564776
## 2021 872.9690241 0.3238317 -199.9542593 -78.1078782 -255.3564776
## Jun Jul Aug Sep Oct
## 2011 87.0027243 86.0411832 -36.5302514 58.8700441 -107.0878307
## 2012 87.0027243 86.0411832 -36.5302514 58.8700441 -107.0878307
## 2013 87.0027243 86.0411832 -36.5302514 58.8700441 -107.0878307
## 2014 87.0027243 86.0411832 -36.5302514 58.8700441 -107.0878307
## 2015 87.0027243 86.0411832 -36.5302514 58.8700441 -107.0878307
## 2016 87.0027243 86.0411832 -36.5302514 58.8700441 -107.0878307
## 2017 87.0027243 86.0411832 -36.5302514 58.8700441 -107.0878307
## 2018 87.0027243 86.0411832 -36.5302514 58.8700441 -107.0878307
## 2019 87.0027243 86.0411832 -36.5302514 58.8700441 -107.0878307
## 2020 87.0027243 86.0411832 -36.5302514 58.8700441 -107.0878307
## 2021 87.0027243 86.0411832 -36.5302514
## Nov Dec
## 2011 36.4726582 -464.6427685
## 2012 36.4726582 -464.6427685
## 2013 36.4726582 -464.6427685
## 2014 36.4726582 -464.6427685
## 2015 36.4726582 -464.6427685
## 2016 36.4726582 -464.6427685
## 2017 36.4726582 -464.6427685
## 2018 36.4726582 -464.6427685
## 2019 36.4726582 -464.6427685
## 2020 36.4726582 -464.6427685
## 2021
Baliouttimeseriescomponents <- decompose(Balioutflowtimeseries)
Baliouttimeseriescomponents$seasonal
## Jan Feb Mar Apr May Jun
## 2011 -774.20251 -355.93538 90.15465 -299.71599 318.76860 255.21133
## 2012 -774.20251 -355.93538 90.15465 -299.71599 318.76860 255.21133
## 2013 -774.20251 -355.93538 90.15465 -299.71599 318.76860 255.21133
## 2014 -774.20251 -355.93538 90.15465 -299.71599 318.76860 255.21133
## 2015 -774.20251 -355.93538 90.15465 -299.71599 318.76860 255.21133
## 2016 -774.20251 -355.93538 90.15465 -299.71599 318.76860 255.21133
## 2017 -774.20251 -355.93538 90.15465 -299.71599 318.76860 255.21133
## 2018 -774.20251 -355.93538 90.15465 -299.71599 318.76860 255.21133
## 2019 -774.20251 -355.93538 90.15465 -299.71599 318.76860 255.21133
## 2020 -774.20251 -355.93538 90.15465 -299.71599 318.76860 255.21133
## 2021 -774.20251 -355.93538 90.15465 -299.71599 318.76860 255.21133
## Jul Aug Sep Oct Nov Dec
## 2011 243.99203 161.06380 -174.99194 -72.15735 -245.52369 853.33646
## 2012 243.99203 161.06380 -174.99194 -72.15735 -245.52369 853.33646
## 2013 243.99203 161.06380 -174.99194 -72.15735 -245.52369 853.33646
## 2014 243.99203 161.06380 -174.99194 -72.15735 -245.52369 853.33646
## 2015 243.99203 161.06380 -174.99194 -72.15735 -245.52369 853.33646
## 2016 243.99203 161.06380 -174.99194 -72.15735 -245.52369 853.33646
## 2017 243.99203 161.06380 -174.99194 -72.15735 -245.52369 853.33646
## 2018 243.99203 161.06380 -174.99194 -72.15735 -245.52369 853.33646
## 2019 243.99203 161.06380 -174.99194 -72.15735 -245.52369 853.33646
## 2020 243.99203 161.06380 -174.99194 -72.15735 -245.52369 853.33646
## 2021 243.99203 161.06380
plot(Baliintimeseriescomponents$seasonal,type = "l", col = "steelblue")
lines(Baliouttimeseriescomponents$seasonal,col="red")
legend("top",c("Inflow","Outflow"),fill=c("steelblue","red"))
plot(Baliintimeseriescomponents$trend,type = "l", col = "green")
lines(Baliouttimeseriescomponents$trend,col="grey")
legend("top",c("Inflow","Outflow"),fill=c("green","grey"))
plot(Baliintimeseriescomponents$random ,type = "l", col = "green")
lines(Baliouttimeseriescomponents$random,col="grey")
legend("top",c("Inflow","Outflow"),fill=c("green","grey"))
plot(Baliintimeseriescomponents$figure ,type = "l", col = "green")
lines(Baliouttimeseriescomponents$figure,col="grey")
legend("top",c("Inflow","Outflow"),fill=c("green","grey"))