Metodologi penelitian

Pertemuan 1

Prodi PIWAR Politeknik APP Jakarta

Hari ini ☀️

  • Administrasi
  • Refresh OLS

Tentang Metodoologi penelitian

  • Part 1 Melanjutkan math&stats.
    • Regresi multivariat, mencari data perdagangan dan visualisasinya.
  • Part 2 fokus ke metode penulisan laporan penelitian.
    • Menulis TA penelitian.
    • metode-metode lain selain regresi.
  • Sebagian besar materi merupakan pengenalan minimal.
  • Pendalaman bisa dilakukan di luar kelas.

Kenapa metodologi penelitian

  • Meneliti pada hakikatnya adalah skill dasar:
    • memahami bagaimana formulasikan pertanyaan.
    • mencari cara menjawabnya.
  • menggunakan tools data analytics & visualization menjadi semakin mainstream.
    • skill bermain dengan data menjadi nilai penting.
  • Diharapkan mahasiswa minimal ter-ekspose dengan data analytics & visualization yang bisa dikembangkan sendiri ke depan.

Informasi Pengajar

nama ruangan matkul lain
Bayu Prabowo Sutjiatmo Ruang Kaprodi PIWAR -
Theresia Anindita Ruang Pudir II -
I Made Krisna A2004 (Ruang Kerja Sama) LLP

Ekspektasi dari mahasiswa

  • Sudah mahir probabilitas dan regresi sederhana.
    • harusnya aman kalau lulus stats&math.
  • Tidak perlu bisa bahasa inggris, but a good command of english will certainly be helpful
  • Lumayan membantu jika bisa spreadsheet.
  • Punya akses terhadap internet dan alat komputasi seperti laptop.

Beberapa aturan

  • kuliah efektif antara 90 - 100 menit.
  • Kehadiran tidak diwajibkan.
    • Yang hadir wajib untuk tertib dan tidak boleh berisik.
  • Mahasiswa dipersilakan meninggalkan kelas untuk alasan apapun.
    • Tidak perlu ijin dulu.
  • Silakan tanya kapan saja jika bingung.

Tools

Struktur kuliah

minggu konten
1 intro & regresi multivariat
2 Instalasi software yang diperlukan
3 Prinsip dasar OLS
4 Karakteristik umum data
5 Data serial waktu
6 Mencari dan melakukan visualisasi data
7 Visualisasi di R dengan ggplot
8 UTS

Struktur kuliah

minggu konten
9 Proses membuat laporan yang baik
10 Melakukan review literatur
11 Metode lain di luar regresi
12 Metode kualitatif
13 Membuat diagram alir dan gap analysis
14 Menulis dokumen di RStudio
15 Menggunakan Zotero
16 UAS

Nilai ✍🏾

evaluation covers %
Tugas individu semua 30
UTS 7 minggu pertama 30
UAS semua 40
  • Slides saja mestinya cukup untuk dapat 100 di UTS dan UAS.

  • Tugas individu berupa membuat laporan dalam 3 format: pdf, html dan docx.

    • contohnya begini.
    • webpage ini dapat jadi portofolio anda.

Questions?

via GIPHY

Question!

Ada yang bisa menjelaskan apa materi regresi di Math&Stats?

Apakah seperti ini?

\[ Y_i=\beta_0+\beta_1 X_i+\mu_i \]

Regresi

  • Disebut juga dengan Ordinary Least Square (OLS).
  • Digunakan untuk mencari parameter yang menghubungkan dua variabel.
  • Metode OLS sangat sering digunakan untuk penelitian karena dia simpel namun powerful.
  • Namun, bisa regresi saja tidak cukup!
    • kita tau cara menyampaikan hasilnya dengan tepat.

Regresi univariat

\[ Y_i=\beta_0+\beta_1 X_i+\mu_i \]

  • Y disebut juga variabel dependen
  • X disebut juga variabel independen
  • nilai Y dan X kita dapatkan dari data
  • \(\beta_0\) dan \(\beta_1\) disebut parameter. Nilainya kita dapat dari hasil estimasi komputer.
  • \(\mu\) disebut juga error term / residual. Dia bersifat independen

Regresi dengan R

  • Melakukan itu semua dengan R dan RStudio, termasuk visualisasi data dan membuat laporan penelitiannya.
  • Kelas ini akan fokus menggunakan data-data perdagangan dari berbagai sumber.
  • Kenapa R dan RStudio?
    • Gratis.
    • Mature, intuitive dan mudah kalau mau pindah bahasa.
    • Digunakan banyak profesional juga.
    • Gratis!!!!

Contoh regresi dengan R

Menarik data World Development Indicators punya World Bank:

#| echo: true
library(WDI)
library(tidyverse)

indi<-c(            # membuat dictionary
  "PDB"="NY.GDP.MKTP.CD",
  "import"="NE.IMP.GNFS.CD"
)

dat<-WDI(           # Menarik data World Bank
  country="all",
  indicator=indi,
  start=2019,end=2019,
)

dat$LPDB<-log(dat$PDB) # menambahkan transformasi log
dat$Limport<-log(dat$import)
country iso2c iso3c year PDB import LPDB Limport
Afghanistan AF AFG 2019 1.879944e+10 NA 23.65709 NA
Africa Eastern and Southern ZH AFE 2019 1.006527e+12 2.693757e+11 27.63753 26.31937
Africa Western and Central ZI AFW 2019 8.239336e+11 NA 27.43736 NA
Albania AL ALB 2019 1.540183e+10 6.926960e+09 23.45775 22.65869
Algeria DZ DZA 2019 1.934597e+11 5.049085e+10 25.98833 24.64506
American Samoa AS ASM 2019 6.470000e+08 6.140000e+08 20.28786 20.23551
Andorra AD AND 2019 3.155149e+09 NA 21.87230 NA
Angola AO AGO 2019 7.089796e+10 1.208015e+10 24.98451 23.21483
Antigua and Barbuda AG ATG 2019 1.725352e+09 1.180426e+09 21.26870 20.88914
Arab World 1A ARB 2019 2.898669e+12 1.095860e+12 28.69527 27.72256
Argentina AR ARG 2019 4.477547e+11 6.584562e+10 26.82751 24.91058
Armenia AM ARM 2019 1.361929e+10 7.458380e+09 23.33475 22.73260
Aruba AW ABW 2019 3.395799e+09 2.448676e+09 21.94580 21.61881
Australia AU AUS 2019 1.394671e+12 3.017675e+11 27.96368 26.43292
Austria AT AUT 2019 4.445962e+11 2.317757e+11 26.82043 26.16904
Azerbaijan AZ AZE 2019 4.817424e+10 1.771247e+10 24.59809 23.59753
Bahamas, The BS BHS 2019 1.301620e+10 4.813800e+09 23.28946 22.29475
Bahrain BH BHR 2019 3.865332e+10 2.520771e+10 24.37790 23.95042
Bangladesh BD BGD 2019 3.512317e+11 6.491919e+10 26.58471 24.89641
Barbados BB BRB 2019 5.367139e+09 2.076309e+09 22.40356 21.45386
Belarus BY BLR 2019 6.441012e+10 4.235334e+10 24.88854 24.46931
Belgium BE BEL 2019 5.358658e+11 4.381723e+11 27.00715 26.80588
Belize BZ BLZ 2019 2.386792e+09 1.200665e+09 21.59322 20.90614
Benin BJ BEN 2019 1.439071e+10 4.900152e+09 23.38985 22.31253
Bermuda BM BMU 2019 7.423465e+09 1.916492e+09 22.72791 21.37376
Bhutan BT BTN 2019 2.735683e+09 1.221921e+09 21.72965 20.92369
Bolivia BO BOL 2019 4.089532e+10 1.285342e+10 24.43428 23.27688
Bosnia and Herzegovina BA BIH 2019 2.048261e+10 1.115812e+10 23.74284 23.13543
Botswana BW BWA 2019 1.672591e+10 7.694781e+09 23.54022 22.76381
Brazil BR BRA 2019 1.873288e+12 2.766348e+11 28.25872 26.34596
British Virgin Islands VG VGB 2019 NA NA NA NA
Brunei Darussalam BN BRN 2019 1.346924e+10 6.810533e+09 23.32367 22.64174
Bulgaria BG BGR 2019 6.888101e+10 4.184055e+10 24.95565 24.45713
Burkina Faso BF BFA 2019 1.603281e+10 4.994381e+09 23.49790 22.33158
Burundi BI BDI 2019 2.576519e+09 6.146072e+08 21.66971 20.23649
Cabo Verde CV CPV 2019 2.252177e+09 1.281435e+09 21.53516 20.97125
Cambodia KH KHM 2019 2.708939e+10 1.692145e+10 24.02241 23.55185
Cameroon CM CMR 2019 3.966776e+10 9.333198e+09 24.40380 22.95684
Canada CA CAN 2019 1.743725e+12 5.897067e+11 28.18704 27.10289
Caribbean small states S3 CSS 2019 3.762101e+10 NA 24.35083 NA
Cayman Islands KY CYM 2019 5.941897e+09 2.695691e+09 22.50529 21.71492
Central African Republic CF CAF 2019 2.221301e+09 7.621378e+08 21.52136 20.45164
Central Europe and the Baltics B8 CEB 2019 1.674816e+12 1.000248e+12 28.14672 27.63127
Chad TD TCD 2019 1.131495e+10 4.280250e+09 23.14939 22.17728
Channel Islands JG CHI 2019 9.921387e+09 NA 23.01796 NA
Chile CL CHL 2019 2.782851e+11 8.275387e+10 26.35191 25.13914
China CN CHN 2019 1.427997e+13 2.496153e+12 30.28988 28.54577
Colombia CO COL 2019 3.230317e+11 7.006718e+10 26.50102 24.97272
Comoros KM COM 2019 1.195020e+09 3.524664e+08 20.90143 19.68047
Congo, Dem. Rep. CD COD 2019 5.177583e+10 1.520526e+10 24.67019 23.44491
Congo, Rep. CG COG 2019 1.397664e+10 4.944507e+09 23.36065 22.32154
Costa Rica CR CRI 2019 6.441767e+10 2.024983e+10 24.88865 23.73141
Cote d'Ivoire CI CIV 2019 6.038289e+10 1.328419e+10 24.82397 23.30984
Croatia HR HRV 2019 6.186716e+10 3.128256e+10 24.84826 24.16633
Cuba CU CUB 2019 1.034276e+11 1.097100e+10 25.36214 23.11852
Curacao CW CUW 2019 3.026124e+09 NA 21.83055 NA
Cyprus CY CYP 2019 2.594702e+10 1.957878e+10 23.97932 23.69771
Czechia CZ CZE 2019 2.525482e+11 1.714581e+11 26.25487 25.86760
Denmark DK DNK 2019 3.464987e+11 1.787159e+11 26.57115 25.90906
Djibouti DJ DJI 2019 3.088854e+09 4.763669e+09 21.85107 22.28428
Dominica DM DMA 2019 6.115370e+08 NA 20.23149 NA
Dominican Republic DO DOM 2019 8.894137e+10 2.485188e+10 25.21124 23.93620
Early-demographic dividend V2 EAR 2019 1.176766e+13 3.098301e+12 30.09638 28.76187
East Asia & Pacific (excluding high income) 4E EAP 2019 1.721322e+13 3.689049e+12 30.47670 28.93639
East Asia & Pacific (IDA & IBRD countries) T4 TEA 2019 1.719202e+13 3.682249e+12 30.47547 28.93454
East Asia & Pacific Z4 EAS 2019 2.703249e+13 7.111765e+12 30.92806 29.59277
Ecuador EC ECU 2019 1.075958e+11 2.585981e+10 25.40165 23.97596
Egypt, Arab Rep. EG EGY 2019 3.186788e+11 7.801253e+10 26.48745 25.08014
El Salvador SV SLV 2019 2.688114e+10 1.238847e+10 24.01469 23.24003
Equatorial Guinea GQ GNQ 2019 1.136413e+10 4.971586e+09 23.15373 22.32700
Eritrea ER ERI 2019 NA NA NA NA
Estonia EE EST 2019 3.129045e+10 2.168307e+10 24.16658 23.79980
Eswatini SZ SWZ 2019 4.495267e+09 1.931360e+09 22.22629 21.38149
Ethiopia ET ETH 2019 9.591261e+10 2.002207e+10 25.28670 23.72010
Euro area XC EMU 2019 1.348115e+13 6.045597e+12 30.23231 29.43035
Europe & Central Asia (excluding high income) 7E ECA 2019 1.488770e+12 5.537850e+11 28.02897 27.04004
Europe & Central Asia (IDA & IBRD countries) T7 TEC 2019 4.159710e+12 1.385214e+12 29.05647 27.95688
Europe & Central Asia Z7 ECS 2019 2.290822e+13 9.606836e+12 30.76252 29.89350
European Union EU EUU 2019 1.569405e+13 7.206672e+12 30.38430 29.60603
Faroe Islands FO FRO 2019 3.266433e+09 1.726425e+09 21.90696 21.26932
Fiji FJ FJI 2019 5.444407e+09 3.209509e+09 22.41785 21.88938
Finland FI FIN 2019 2.685149e+11 1.066669e+11 26.31617 25.39298
Fragile and conflict affected situations F1 FCS 2019 1.842155e+12 4.870788e+11 28.24196 26.91169
France FR FRA 2019 2.728870e+12 8.882314e+11 28.63491 27.51250
French Polynesia PF PYF 2019 6.022276e+09 2.572340e+09 22.51873 21.66808
Gabon GA GAB 2019 1.687441e+10 3.711866e+09 23.54906 22.03480
Gambia, The GM GMB 2019 1.813610e+09 6.243942e+08 21.31858 20.25229
Georgia GE GEO 2019 1.763834e+10 1.120136e+10 23.59334 23.13930
Germany DE DEU 2019 3.889178e+12 1.601984e+12 28.98922 28.10226
Ghana GH GHA 2019 6.833797e+10 2.690821e+10 24.94773 24.01570
Gibraltar GI GIB 2019 NA NA NA NA
Greece GR GRC 2019 2.052528e+11 8.574467e+10 26.04751 25.17464
Greenland GL GRL 2019 2.997310e+09 1.533066e+09 21.82098 21.15054
Grenada GD GRD 2019 1.213485e+09 NA 20.91676 NA
Guam GU GUM 2019 6.355000e+09 3.547000e+09 22.57251 21.98937
Guatemala GT GTM 2019 7.717232e+10 2.153476e+10 25.06931 23.79293
Guinea-Bissau GW GNB 2019 1.486477e+09 4.453663e+08 21.11967 19.91441
Guinea GN GIN 2019 1.344286e+10 5.830608e+09 23.32171 22.48639
Guyana GY GUY 2019 5.173760e+09 NA 22.36687 NA
Haiti HT HTI 2019 1.501609e+10 5.107129e+09 23.43239 22.35390
Heavily indebted poor countries (HIPC) XE HPC 2019 8.033559e+11 2.542256e+11 27.41206 26.26149
High income XD 2019 5.721830e+13 1.723238e+13 31.67789 30.47781
Honduras HN HND 2019 2.488223e+10 1.474048e+10 23.93742 23.41386
Hong Kong SAR, China HK HKG 2019 3.630745e+11 6.393460e+11 26.61787 27.18371
Hungary HU HUN 2019 1.640205e+11 1.299396e+11 25.82326 25.59034
IBRD only XF IBD 2019 3.124659e+13 7.443807e+12 31.07293 29.63840
Iceland IS ISL 2019 2.468134e+10 9.662622e+09 23.92931 22.99153
IDA & IBRD total ZT IBT 2019 3.372236e+13 8.083661e+12 31.14918 29.72087
IDA blend XH IDB 2019 1.077750e+12 2.065463e+11 27.70590 26.05379
IDA only XI IDX 2019 1.397671e+12 4.315091e+11 27.96583 26.79055
IDA total XG IDA 2019 2.475421e+12 6.394805e+11 28.53743 27.18392
India IN IND 2019 2.835606e+12 6.023151e+11 28.67328 27.12405
Indonesia ID IDN 2019 1.119100e+12 2.130346e+11 27.74355 26.08472
Iran, Islamic Rep. IR IRN 2019 2.836495e+11 7.735255e+10 26.37101 25.07164
Iraq IQ IRQ 2019 2.336361e+11 7.228250e+10 26.17703 25.00385
Ireland IE IRL 2019 3.989330e+11 4.966358e+11 26.71206 26.93112
Isle of Man IM IMN 2019 7.314968e+09 NA 22.71319 NA
Israel IL ISR 2019 4.024705e+11 1.095532e+11 26.72089 25.41968
Italy IT ITA 2019 2.011302e+12 5.687271e+11 28.32980 27.06667
Jamaica JM JAM 2019 1.583077e+10 8.243797e+09 23.48522 22.83273
Japan JP JPN 2019 5.117994e+12 9.085919e+11 29.26378 27.53516
Jordan JO JOR 2019 4.450282e+10 2.187324e+10 24.51882 23.80853
Kazakhstan KZ KAZ 2019 1.816672e+11 5.162914e+10 25.92544 24.66735
Kenya KE KEN 2019 1.003784e+11 2.040841e+10 25.33221 23.73921
Kiribati KI KIR 2019 2.168915e+08 1.770832e+08 19.19491 18.99213
Korea, Dem. People's Rep. KP PRK 2019 NA NA NA NA
Korea, Rep. KR KOR 2019 1.651423e+12 6.024602e+11 28.13266 27.12429
Kosovo XK XKX 2019 7.899738e+09 4.458675e+09 22.79010 22.21812
Kuwait KW KWT 2019 1.386963e+11 6.113585e+10 25.65555 24.83636
Kyrgyz Republic KG KGZ 2019 9.371275e+09 5.712150e+09 22.96091 22.46586
Lao PDR LA LAO 2019 1.874056e+10 NA 23.65396 NA
Late-demographic dividend V3 LTE 2019 2.305021e+13 5.997968e+12 30.76870 29.42244
Latin America & Caribbean (excluding high income) XJ LAC 2019 4.804547e+12 1.154893e+12 29.20058 27.77503
Latin America & Caribbean ZJ LCN 2019 5.659966e+12 1.408779e+12 29.36444 27.97374
Latin America & the Caribbean (IDA & IBRD countries) T2 TLA 2019 5.413987e+12 1.329786e+12 29.32001 27.91604
Latvia LV LVA 2019 3.422555e+10 2.078247e+10 24.25624 23.75738
Least developed countries: UN classification XL LDC 2019 1.150501e+12 3.291171e+11 27.77122 26.51968
Lebanon LB LBN 2019 5.160596e+10 2.182063e+10 24.66690 23.80612
Lesotho LS LSO 2019 2.390702e+09 2.254607e+09 21.59485 21.53624
Liberia LR LBR 2019 3.319597e+09 NA 21.92311 NA
Libya LY LBY 2019 7.208196e+10 2.495205e+10 25.00107 23.94022
Liechtenstein LI LIE 2019 6.436467e+09 NA 22.58525 NA
Lithuania LT LTU 2019 5.480853e+10 3.942493e+10 24.72711 24.39766
Low & middle income XO LMY 2019 3.042453e+13 7.084425e+12 31.04627 29.58892
Low income XM 2019 4.452784e+11 1.464719e+11 26.82197 25.71010
Lower middle income XN 2019 6.278115e+12 1.741505e+12 29.46809 28.18577
Luxembourg LU LUX 2019 6.989051e+10 1.229631e+11 24.97020 25.53515
Macao SAR, China MO MAC 2019 5.508229e+10 1.762450e+10 24.73209 23.59256
Madagascar MG MDG 2019 1.410466e+10 4.820540e+09 23.36977 22.29615
Malawi MW MWI 2019 1.107731e+10 NA 23.12816 NA
Malaysia MY MYS 2019 3.651777e+11 2.108930e+11 26.62365 26.07462
Maldives MV MDV 2019 5.726095e+09 NA 22.46830 NA
Mali ML MLI 2019 1.728025e+10 6.558445e+09 23.57283 22.60402
Malta MT MLT 2019 1.600456e+10 2.326293e+10 23.49614 23.87013
Marshall Islands MH MHL 2019 2.319967e+08 2.700258e+08 19.26223 19.41403
Mauritania MR MRT 2019 7.894765e+09 4.033370e+09 22.78947 22.11787
Mauritius MU MUS 2019 1.443635e+10 7.481609e+09 23.39301 22.73571
Mexico MX MEX 2019 1.305211e+12 5.077188e+11 27.89739 26.95319
Micronesia, Fed. Sts. FM FSM 2019 3.940000e+08 2.720777e+08 19.79186 19.42160
Middle East & North Africa (excluding high income) XQ MNA 2019 1.433134e+12 4.574683e+11 27.99088 26.84897
Middle East & North Africa (IDA & IBRD countries) T3 TMN 2019 1.416000e+12 4.483066e+11 27.97886 26.82874
Middle East & North Africa ZQ MEA 2019 3.549945e+12 1.290507e+12 28.89795 27.88606
Middle income XP MIC 2019 2.997848e+13 6.938196e+12 31.03150 29.56806
Moldova MD MDA 2019 1.173680e+10 6.624383e+09 23.18599 22.61402
Monaco MC MCO 2019 7.383944e+09 NA 22.72257 NA
Mongolia MN MNG 2019 1.420636e+10 9.259603e+09 23.37696 22.94893
Montenegro ME MNE 2019 5.542054e+09 3.602221e+09 22.43563 22.00482
Morocco MA MAR 2019 1.289203e+11 5.402411e+10 25.58246 24.71270
Mozambique MZ MOZ 2019 1.551276e+10 1.061835e+10 23.46493 23.08585
Myanmar MM MMR 2019 7.506511e+10 NA 25.04162 NA
Namibia NA NAM 2019 1.254193e+10 5.832030e+09 23.25234 22.48663
Nauru NR NRU 2019 1.251601e+08 1.194385e+08 18.64510 18.59831
Nepal NP NPL 2019 3.418618e+10 1.417687e+10 24.25509 23.37488
Netherlands NL NLD 2019 9.101943e+11 6.620113e+11 27.53692 27.21855
New Caledonia NC NCL 2019 9.475655e+09 NA 22.97199 NA
New Zealand NZ NZL 2019 2.128469e+11 5.771160e+10 26.08384 24.77872
Nicaragua NI NIC 2019 1.269905e+10 6.252729e+09 23.26479 22.55628
Niger NE NER 2019 1.288956e+10 3.395520e+09 23.27968 21.94572
Nigeria NG NGA 2019 4.745175e+11 NA 26.88556 NA
North America XU NAC 2019 2.327254e+13 3.708577e+12 30.77830 28.94167
North Macedonia MK MKD 2019 1.260634e+10 9.602018e+09 23.25747 22.98524
Northern Mariana Islands MP MNP 2019 1.181000e+09 7.350000e+08 20.88963 20.41538
Norway NO NOR 2019 4.087428e+11 1.400144e+11 26.73635 25.66501
Not classified XY 2019 NA NA NA NA
OECD members OE OED 2019 5.405301e+13 1.508010e+13 31.62099 30.34440
Oman OM OMN 2019 8.806086e+10 3.256853e+10 25.20129 24.20661
Other small states S4 OSS 2019 1.954423e+11 1.360433e+11 25.99853 25.63624
Pacific island small states S2 PSS 2019 1.072909e+10 6.308733e+09 23.09622 22.56520
Pakistan PK PAK 2019 3.209095e+11 6.262456e+10 26.49442 24.86042
Palau PW PLW 2019 2.818287e+08 2.175054e+08 19.45681 19.19773
Panama PA PAN 2019 6.972179e+10 2.803187e+10 24.96778 24.05661
Papua New Guinea PG PNG 2019 2.475107e+10 NA 23.93213 NA
Paraguay PY PRY 2019 3.792534e+10 1.332502e+10 24.35889 23.31291
Peru PE PER 2019 2.283460e+11 5.230132e+10 26.15413 24.68029
Philippines PH PHL 2019 3.768234e+11 1.524587e+11 26.65504 25.75016
Poland PL POL 2019 5.960585e+11 2.950095e+11 27.11360 26.41027
Portugal PT PRT 2019 2.399869e+11 1.033295e+11 26.20385 25.36119
Post-demographic dividend V4 PST 2019 5.101880e+13 1.457007e+13 31.56322 30.30999
Pre-demographic dividend V1 PRE 2019 1.427163e+12 3.296295e+11 27.98671 26.52124
Puerto Rico PR PRI 2019 1.051264e+11 4.940160e+10 25.37843 24.62325
Qatar QA QAT 2019 1.763713e+11 6.676978e+10 25.89586 24.92452
Romania RO ROU 2019 2.510178e+11 1.112081e+11 26.24879 25.43467
Russian Federation RU RUS 2019 1.693115e+12 3.520887e+11 28.15759 26.58715
Rwanda RW RWA 2019 1.034930e+10 3.741294e+09 23.06018 22.04270
Samoa WS WSM 2019 9.129505e+08 4.409345e+08 20.63219 19.90441
San Marino SM SMR 2019 1.616189e+09 2.315474e+09 21.20334 21.56288
Sao Tome and Principe ST STP 2019 4.129761e+08 NA 19.83890 NA
Saudi Arabia SA SAU 2019 8.385648e+11 2.189408e+11 27.45496 26.11207
Senegal SN SEN 2019 2.340400e+10 9.186798e+09 23.87617 22.94103
Serbia RS SRB 2019 5.151424e+10 3.139467e+10 24.66512 24.16990
Seychelles SC SYC 2019 1.868690e+09 1.701472e+09 21.34850 21.25476
Sierra Leone SL SLE 2019 4.076579e+09 1.546805e+09 22.12852 21.15946
Singapore SG SGP 2019 3.769016e+11 5.531798e+11 26.65525 27.03895
Sint Maarten (Dutch part) SX SXM 2019 1.407880e+09 NA 21.06535 NA
Slovak Republic SK SVK 2019 1.057117e+11 9.681579e+10 25.38398 25.29608
Slovenia SI SVN 2019 5.438665e+10 4.080292e+10 24.71938 24.43202
Small states S1 SST 2019 2.437924e+11 1.620174e+11 26.21958 25.81097
Solomon Islands SB SLB 2019 1.619155e+09 7.529303e+08 21.20517 20.43948
Somalia SO SOM 2019 9.420431e+09 5.423000e+09 22.96615 22.41391
South Africa ZA ZAF 2019 3.893300e+11 1.039350e+11 26.68769 25.36703
South Asia (IDA & IBRD) T5 TSA 2019 3.658210e+12 7.844331e+11 28.92799 27.38823
South Asia 8S SAS 2019 3.658210e+12 7.844331e+11 28.92799 27.38823
South Sudan SS SSD 2019 NA NA NA NA
Spain ES ESP 2019 1.394320e+12 4.457221e+11 27.96343 26.82296
Sri Lanka LK LKA 2019 8.901498e+10 2.456991e+10 25.21207 23.92479
St. Kitts and Nevis KN KNA 2019 1.107856e+09 NA 20.82569 NA
St. Lucia LC LCA 2019 2.092082e+09 NA 21.46143 NA
St. Martin (French part) MF MAF 2019 6.522060e+08 NA 20.29587 NA
St. Vincent and the Grenadines VC VCT 2019 9.107667e+08 NA 20.62980 NA
Sub-Saharan Africa (excluding high income) ZF SSA 2019 1.828592e+12 4.352895e+11 28.23457 26.79928
Sub-Saharan Africa (IDA & IBRD countries) T6 TSS 2019 1.830461e+12 4.370749e+11 28.23559 26.80337
Sub-Saharan Africa ZG SSF 2019 1.830461e+12 4.370749e+11 28.23559 26.80337
Sudan SD SDN 2019 3.233808e+10 5.713051e+09 24.19951 22.46602
Suriname SR SUR 2019 4.016041e+09 NA 22.11356 NA
Sweden SE SWE 2019 5.338795e+11 2.329029e+11 27.00344 26.17389
Switzerland CH CHE 2019 7.213691e+11 4.123506e+11 27.30442 26.74514
Syrian Arab Republic SY SYR 2019 2.258305e+10 6.546690e+09 23.84047 22.60223
Tajikistan TJ TJK 2019 8.300814e+09 3.408735e+09 22.83962 21.94961
Tanzania TZ TZA 2019 6.102673e+10 1.036346e+10 24.83458 23.06155
Thailand TH THA 2019 5.439767e+11 2.729165e+11 27.02217 26.33243
Timor-Leste TL TLS 2019 2.027034e+09 1.004078e+09 21.42984 20.72734
Togo TG TGO 2019 6.992700e+09 2.260736e+09 22.66813 21.53896
Tonga TO TON 2019 5.120537e+08 3.338263e+08 20.05394 19.62613
Trinidad and Tobago TT TTO 2019 2.377575e+10 NA 23.89193 NA
Tunisia TN TUN 2019 4.190554e+10 2.362736e+10 24.45868 23.88567
Turkiye TR TUR 2019 7.610059e+11 2.292080e+11 27.35791 26.15790
Turkmenistan TM TKM 2019 4.523286e+10 8.844000e+09 24.53509 22.90301
Turks and Caicos Islands TC TCA 2019 1.177285e+09 NA 20.88648 NA
Tuvalu TV TUV 2019 5.412320e+07 NA 17.80677 NA
Uganda UG UGA 2019 3.534816e+10 7.865670e+09 24.28851 22.78577
Ukraine UA UKR 2019 1.538830e+11 7.583286e+10 25.75946 25.05180
United Arab Emirates AE ARE 2019 4.179897e+11 2.955998e+11 26.75872 26.41227
United Kingdom GB GBR 2019 2.851407e+12 9.418299e+11 28.67883 27.57109
United States US USA 2019 2.152140e+13 3.116954e+12 30.70007 28.76788
Upper middle income XT 2019 2.370037e+13 5.201663e+12 30.79651 29.28000
Uruguay UY URY 2019 6.222239e+10 1.349366e+10 24.85398 23.32549
Uzbekistan UZ UZB 2019 6.028350e+10 2.665756e+10 24.82232 24.00634
Vanuatu VU VUT 2019 9.365263e+08 4.592509e+08 20.65769 19.94511
Venezuela, RB VE VEN 2019 NA NA NA NA
Viet Nam VN VNM 2019 3.343653e+11 2.659763e+11 26.53550 26.30667
Virgin Islands (U.S.) VI VIR 2019 4.121000e+09 4.139000e+09 22.13936 22.14372
West Bank and Gaza PS PSE 2019 1.713350e+10 9.161700e+09 23.56430 22.93830
World 1W WLD 2019 8.794557e+13 2.436815e+13 32.10774 30.82430
Yemen, Rep. YE YEM 2019 NA NA NA NA
Zambia ZM ZMB 2019 2.330867e+10 7.961078e+09 23.87209 22.79783
Zimbabwe ZW ZWE 2019 2.183223e+10 6.165817e+09 23.80665 22.54229

Menggambar grafik

library(ggrepel)
weleh<-subset(dat,iso2c%in%c("ID","KR","CN","US","GB","EU","SG",
                             "TL","BN","KH","MY","TH","JP"))
www<-dat %>% ggplot(aes(x=Limport,y=LPDB)) + geom_point() + geom_smooth(method="lm")
www+geom_label_repel(data=weleh,box.padding   = 0.35, point.padding = 0.5, segment.color = 'grey50',label=weleh$country,min.segment.length = 0,nudge_y = -4) + theme_classic()

Figure 1: Hubungan impor dan PDB, 2019

Melakukan regresi

model<-lm(data=dat,formula=LPDB~Limport)
summary(model)

Call:
lm(formula = LPDB ~ Limport, data = dat)

Residuals:
     Min       1Q   Median       3Q      Max 
-1.67150 -0.25452  0.02952  0.30827  1.39515 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -0.6142     0.2905  -2.114   0.0356 *  
Limport       1.0633     0.0118  90.126   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.4774 on 226 degrees of freedom
  (38 observations deleted due to missingness)
Multiple R-squared:  0.9729,    Adjusted R-squared:  0.9728 
F-statistic:  8123 on 1 and 226 DF,  p-value: < 2.2e-16

R dan Regresi

  • Kita perkuat landasan teori dulu
    • Kita belajar karakteristik dan asumsi OLS
  • Kita juga akan melakukan teknik-teknik regresi yang lebih maju:
    • Regresi multivariat: \(Y_i=\beta_0+\sum_j^N \beta_j X_{i,j}+\mu_i\).
    • Regresi dengan variabel kategori / Dummy.
    • Regresi serial waktu.
  • Anda akan menulis penelitian dengan regresi yang lebih kompleks.

Minggu depan

  • Bawa laptop karena kita mau install-install software.
  • Kalau sudah bisa install sendiri, ga perlu masuk gpp.
  • Speknya ga perlu sakti-sakti. Ram 1Gb udah sangat cukup.