Ovaj dokument se sastoji od nekoliko mdoela za transport iz HBS baze i pobjednik je p4. p4 model ima 41 sign opstinu i uzela sam Age_2 a ne Age_1. Koefiijenti su spaseni u fileu sa datumom 1.8. Postoje dva sheeta model1 i model2. U sheetu model 1 su koeficijenti iz modela p4. Jos trebam sa Ismirom da potvdim da li je ok koristiit godien drugog clana domac.milsim da je.
According to email from ismir 06.01.2024. I will include transport costs only fro hh where someone works so variable Activ_01,….Acitiv_09 ==1 or 2
##subset df
library (dplyr)
hbs.transport <- hbs_shorter %>% select(contains(c("SifraDom","Entity","Canton","naziv_Opcine","RurUrb","ncomp","finweight", "poor","Relat","Sex","Age", "Educ","Activ", "HH_Monthly","S6", "COICOP_07", "_DA", "E07_a", "E07_b", "E07_c", "E07_d","E07_e", "E07_f")))
“mj_Q02_01_AM_S6” = Mj.Godisnja registracija vozila (obavezno osiguranje, tehnički pregled i ostali izdaci vezani za registraciju vozila) “mj_Q02_02_AM_S6” = Mj. Kasko osiguranje godisnje “mj_Q02_03_AM_S6” = Gume, sve vrste “mj_Q02_04_AM_S6” = Ostali rezervni dijelovi i pribor (svjećice, akumulatori itd.) “mj_Q02_05_AM_S6” = Pribor za osobna vozila (prva pomoć, trokut, uže za vuču, signalni prsluci i sl.) “mj_Q02_06_AM_S6” = Ulja, maziva, antifriz, tečnost za brisače itd “mj_Q02_07_AM_S6” = Popravak i pranje vozila “mj_Q02_08_AM_S6” = Zakup privatne garaže ili parking mjesta “mj_Q02_09_AM_S6” = Unajmljivanje vozila bez vozača (rent-a-car) “mj_Q02_10_AM_S6” = Putarina “mj_Q04_02_AM_S6” = Koliki je bio iznos_Skolski autobus “mj_Q04_03_AM_S6” = Koliki je bio iznos_Mjesecne ili sezonske karte za gradski prevoz “mj_Q04_04_AM_S6” = Koliki je bio iznos_Karte za prevoz vozom “mj_DA_S_04” = Pojedinačne karte za gradski prevoz tramvajem “mj_DA_S_05” = Pojedinačne karte za gradski prevoz autobusom, trolejbusom i minibusom “mj_DA_S_06” = Taksi “mj_DA_S_07” = Parking na dnevnoj osnovi
Napravi varijablu broj clanova u domacinstvu koji rade tj. Active = 1 (puno.r.v)i/ili 2 (pola r.v.) !
#sta Active sadrzi
str(hbs.transport$Activ_1)
## num [1:7702] 8 8 8 8 2 7 8 3 8 8 ...
## - attr(*, "label")= chr "Status tekuce aktivnost (1-puno r.v.; 2-pola r.v.; 3-neyaposlen; 4-trazi prvo zaposlenje; 5-Domacica; 6-Student"| __truncated__
## - attr(*, "format.spss")= chr "F1.0"
## - attr(*, "display_width")= int 9
hbs.transport <- hbs.transport %>% dplyr::filter(amr.br.cl.radi == 1 |amr.br.cl.radi == 2 | amr.br.cl.radi == 3 | amr.br.cl.radi == 4 | amr.br.cl.radi == 5 | amr.br.cl.radi == 6 )
table (hbs.transport$amr.br.cl.radi) # nema vise domacinstava u kojima niko ne radi
##
## 1 2 3 4 5 6
## 2572 1410 261 54 8 2
library(dplyr)
hbs.transport <- hbs.transport %>% mutate(n.employ = case_when(amr.br.cl.radi == 1 ~"one",amr.br.cl.radi ==2 ~ "two", amr.br.cl.radi %in% c(3,4,5,6) ~ "three and more"))
table(hbs.transport$n.employ)
##
## one three and more two
## 2572 325 1410
hbs.transport$n.employ <- factor (hbs.transport$n.employ)
round(prop.table(table(hbs.transport$n.employ)),3)*100
##
## one three and more two
## 59.7 7.5 32.7
This will be one of the independent
library(labelled)
var_label(hbs.transport$Q01_03_NW_OT_YN_S6) <- labelled_spss("Koju vrstu vozila vase domacinstvo posjeduje? Iskljucujuci vozila koja se koriste u poslovne svrhe")
var_label(hbs.transport$Q01_01_NW_DS_YN_S6) <- labelled_spss("Koju vrstu vozila vase domacinstvo posjeduje? Iskljucujuci vozila koja se koriste u poslovne svrhe")
var_label(hbs.transport$Q01_02_NW_BZ_YN_S6) <- labelled_spss("Koju vrstu vozila vase domacinstvo posjeduje? Iskljucujuci vozila koja se koriste u poslovne svrhe")
Note Analizu pojedinacnih varijabli imam u Rmardownu HBS2015
transport
## Mutate Educ_1
Steceno obrazovanje: 1 - bez skole; 2- nepotpuna osnovna 8.g.skola 3 - nepotpuna osnovna 9.g. skola; 4-osnovna skola, 5-srednja skola, 6-specijalizacia poslije s.s; 7 - Visa skola; 8 - Fakultet; 9 - Master; 10 - Doktorat
prop.table(table(hbs.transport$Educ_1))
##
## 1 2 3 4 5 6
## 0.0253076387 0.0390062689 0.0006965405 0.1827257952 0.6073833295 0.0085906664
## 7 8 9 10
## 0.0394706292 0.0870675644 0.0069654052 0.0027861621
Mislim da je bolje napraviti, radi strukture slijedecu podjelu: 1 - bez skole, 2 i 3 nepotpuna osnovna, 4 osnovna, 5 i 6 srednja , 7 visa i 8,9 10 visoka, master i doktorat. ovo se razlikuje od prethodnog koji je koristen u slucaju wage i koji je bio slijdeci: bez osnovne skole (1,2,3), osnovna skola (4), srednja skola (5,6), fakultet (7,8,9,10).
#Relevel Educ
hbs.transport$Educ.1 <- forcats::fct_relevel (hbs.transport$Educ.1, "no education","no elementary", "elementary", "high schl","college", "university")
table(hbs.transport$Educ.1)
##
## no education no elementary elementary high schl college
## 109 171 787 2653 170
## university
## 417
str(hbs.transport$Educ.1)
## Factor w/ 6 levels "no education",..: 4 4 4 4 4 3 3 4 4 5 ...
Ovo vec nema smisla zato sto ne uzimam Activity of hh vec imam da su oni koji rade. Probala sam sa varijabntom da uzmem Activ.1 za prva dva clana ali mislim da to nije u redu jer se citavo vrijeme fokusirma na prvog clana domacinstva i po obrazovanju i po spolu i po godinama. ne uyimam druge radi visoke korelacije. recimo Age_1 i Age_2 imaju korelaciju 65 a spol 90
table (hbs.transport$Activ_1) #mislim da je ovdje bolje staviti dummy prvog clana
##
## 1 2 3 4 5 6 7 8 9
## 2707 374 250 29 179 1 60 685 22
hbs.transport <- hbs.transport %>% mutate(Activ.1 = case_when(Activ_1 == 1 ~"1", Activ_1!=1 ~
"0"))
table (hbs.transport$Activ.1) #Mislim da mi je ova varijabla puno bolja, dakle imam oni koji su full time bilo prvi ili drugi clan je 1 ostali su 0
##
## 0 1
## 1600 2707
#Relevel Activ.1
hbs.transport$Activ.1 <- forcats::fct_relevel (hbs.transport$Activ.1, "1", "0")
table(hbs.transport$Activ.1)
##
## 1 0
## 2707 1600
Napravicu i drugu opciju Active_1 i staviti da je jeda za one koji rade i ful time i part time i ostalo
hbs.transport <- hbs.transport %>% mutate(Activ.1a = case_when(Activ_1 == 1 ~"1", Activ_1 ==2 ~ "1", Activ_1!=1|2 ~ "0"))
table (hbs.transport$Activ.1a) #Mislim da mi je ova varijabla puno bolja, dakle imam oni koji su full time bilo prvi ili drugi clan je 1 ostali su 0
##
## 0 1
## 1226 3081
#Relevel Activ.1a
hbs.transport$Activ.1a <- forcats::fct_relevel (hbs.transport$Activ.1a, "1", "0")
table(hbs.transport$Activ.1a)
##
## 1 0
## 3081 1226
11 + clanova staviti u jednu varijabli
table (hbs.transport$ncomp) #mislim da je ovdje bolje staviti dummy prvog clana
##
## 1 2 3 4 5 6 7 8 9 10 11 13
## 223 707 1020 1315 620 283 88 31 10 4 5 1
hbs.transport <- hbs.transport %>% mutate(ncomp1 = case_when(ncomp %in% c(11,13) ~"11+", ncomp == 1 ~ "one", ncomp == 2 ~ "two", ncomp == 3 ~ "three", ncomp==4 ~ "four", ncomp ==5 ~ "five", ncomp==6 ~ "six", ncomp == 7 ~ "seven", ncomp == 8 ~ "eight", ncomp == 9 ~ "nine", ncomp == 10 ~ "ten"))
table (hbs.transport$ncomp1) #Mislim da mi je ova varijabla puno bolja, dakle imam oni koji su full time bilo prvi ili drugi clan je 1 ostali su 0
##
## 11+ eight five four nine one seven six ten three two
## 6 31 620 1315 10 223 88 283 4 1020 707
#Relevel ncomp1
hbs.transport$ncomp1 <- forcats::fct_relevel (hbs.transport$ncomp1, "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "11+")
table(hbs.transport$ncomp1)
##
## one two three four five six seven eight nine ten 11+
## 223 707 1020 1315 620 283 88 31 10 4 6
Kad sam uporedila regresije sa ncomp1 i ncomp dobila sam da je ipak bolje da imaju ncomp bude vise tih varijabli sign kao i opstinskih varijabli pa cu uraditi relevel za to
#Relevel ncomp
hbs.transport$ncomp <- forcats::fct_relevel (as.factor(hbs.transport$ncomp), "1", "2", "3", "4", "5", "6", "7", "8", "9","10","11","13")
table(hbs.transport$ncomp)
##
## 1 2 3 4 5 6 7 8 9 10 11 13
## 223 707 1020 1315 620 283 88 31 10 4 5 1
summary(hbs.transport$mj.trans.AM)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.00 31.67 47.98 102.05 113.27 2509.05
summary (hbs.transport$mj.trans.AM/hbs.transport$amr.br.cl.radi) #ispada da ovaj koji trosi 2,509 KM mjesecno ima samo 1 clana zaposlenog tako da cu brisati samo upper percentiles.
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.00 18.75 37.50 74.97 81.67 2509.05
table(hbs.transport$mj.trans.AM==0) #imamo 581 domacinstva koja nisu trosila na transport a imaju zaposlenog clana familije.
##
## FALSE TRUE
## 3717 590
plot(density(hbs.transport$mj.trans.AM))
# Top 1% is removed
hbs.transport.drop <- hbs.transport %>% dplyr::filter(mj.trans.AM < quantile (hbs.transport$mj.trans.AM, 0.99, na.rm = T) )
summary(hbs.transport.drop$mj.trans.AM)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.00 31.67 46.67 91.19 110.24 745.50
summary(hbs.transport.drop$mj.trans.AM/hbs.transport.drop$amr.br.cl.radi) #i ovdje ispada da domacinstva u koijma 1 clan rad potrosi se na transport 745KM.. ali ovo je vec realnije.. pa cu ostaviti
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.00 18.75 37.50 67.91 79.17 745.50
plot(density(hbs.transport.drop$mj.trans.AM))
#7551
low.freq.1 <- hbs.transport.drop %>%
select(c(naziv_Opcine, mj.trans.AM)) %>%
group_by(naziv_Opcine) %>%
summarise (n = n()) %>%
arrange (desc(n))%>%
dplyr::filter(n<10)
low.freq.1$naziv_Opcine #21 opstina je low.frequency
## [1] "Cajnice" "Hadzici" "Kostajnica" "Kupres" "Mrkonjic"
## [6] "Bileca" "Srebrenica" "D-Samac" "Doboj-Jug" "Milici"
## [11] "Odzak" "Teocak" "Pelagicevo" "Vares" "B.Grahovo"
## [16] "Han Pijesak" "Vukosavlje" "Jablanica" "Olovo" "Ostra Luka"
## [21] "Sekovici" "Trnovo" "Usora" "Berkovici" "Donji Zabar"
## [26] "Kalinovik" "Osmaci" "Petrovo" "Sapna" "Sipovo"
## [31] "Jezero" "Krupa na Uni" "Neum" "Ravno"
## attr(,"label")
## [1] "Naziv opcine"
## attr(,"format.spss")
## [1] "A12"
dim(hbs.transport.drop) #4234 obs i
## [1] 4263 209
unique (hbs.transport.drop$naziv_Opcine) #131 opstina dakle sa brisanjem trebalo bi biti 97
## [1] "B.Grahovo" "B.Krupa" "B.Petrovac" "Banovici" "Banja Luka"
## [6] "Berkovici" "Bihac" "Bijeljina" "Bileca" "Bratunac"
## [11] "Brcko" "Breza" "Brod" "Bugojno" "Busovaca"
## [16] "Buzim" "C.Sarajevo" "Cajnice" "Capljina" "Cazin"
## [21] "Celic" "Celinac" "Citluk" "D-Samac" "D.Vakuf"
## [26] "Derventa" "Doboj" "Doboj-Istok" "Doboj-Jug" "Donji Zabar"
## [31] "Drvar" "Foca - RS" "Fojnica" "G.Vakuf" "Gacko"
## [36] "Glamoc" "Gorazde" "Gracanica" "Grad Mostar" "Gradacac"
## [41] "Gradiska" "Grude" "Hadzici" "Han Pijesak" "I.Ilidza"
## [46] "Ilidza" "Ilijas" "Jablanica" "Jajce" "Jezero"
## [51] "K.Dubica" "Kakanj" "Kalesija" "Kalinovik" "Kiseljak"
## [56] "Kladanj" "Kljuc" "Knezevo" "Konjic" "Kostajnica"
## [61] "Kotor Varos" "Kresevo" "Krupa na Uni" "Kupres" "Laktasi"
## [66] "Livno" "Lopare" "Lukavac" "Ljubuski" "Maglaj"
## [71] "Milici" "Modrica" "Mrkonjic" "N.G.Sarajevo" "N.Gorazde"
## [76] "N.Sarajevo" "N.Travnik" "Neum" "Nevesinje" "Novi Grad"
## [81] "Odzak" "Olovo" "Orasje" "Osmaci" "Ostra Luka"
## [86] "Pale" "Pelagicevo" "Petrovo" "Posusje" "Prijedor"
## [91] "Prnjavor" "Prozor" "Ravno" "Ribnik" "Rogatica"
## [96] "Rudo" "S.Brijeg" "S.G.Sarajevo" "Samac" "Sanski Most"
## [101] "Sapna" "Sekovici" "Sipovo" "Sokolac" "Srbac"
## [106] "Srebrenica" "Srebrenik" "Stolac" "Teocak" "Tesanj"
## [111] "Teslic" "Tomislavgrad" "Travnik" "Trebinje" "Trnovo"
## [116] "Tuzla" "Ugljevik" "Usora" "V.Kladusa" "Vares"
## [121] "Visegrad" "Visoko" "Vitez" "Vlasenica" "Vogosca"
## [126] "Vukosavlje" "Zavidovici" "Zenica" "Zepce" "Zivinice"
## [131] "Zvornik"
library(ggplot2)
table (hbs.transport.drop.1$naziv_Opcine)
##
## B.Krupa B.Petrovac Banovici Banja Luka Bihac Bijeljina
## 28 11 23 215 69 180
## Bratunac Brcko Breza Brod Bugojno Busovaca
## 11 246 13 22 56 25
## Buzim C.Sarajevo Capljina Cazin Celic Celinac
## 11 55 21 56 11 11
## Citluk D.Vakuf Derventa Doboj Doboj-Istok Drvar
## 23 34 29 55 12 13
## Foca - RS Fojnica G.Vakuf Gacko Glamoc Gorazde
## 21 16 25 19 10 31
## Gracanica Grad Mostar Gradacac Gradiska Grude I.Ilidza
## 77 168 35 30 20 13
## Ilidza Ilijas Jajce K.Dubica Kakanj Kalesija
## 49 15 21 37 72 28
## Kiseljak Kladanj Kljuc Knezevo Konjic Kotor Varos
## 36 13 21 14 47 16
## Kresevo Laktasi Livno Lopare Lukavac Ljubuski
## 15 42 22 27 44 26
## Maglaj Modrica N.G.Sarajevo N.Gorazde N.Sarajevo N.Travnik
## 40 34 160 10 49 49
## Nevesinje Novi Grad Orasje Pale Posusje Prijedor
## 11 47 25 20 13 82
## Prnjavor Prozor Ribnik Rogatica Rudo S.Brijeg
## 37 11 14 14 16 37
## S.G.Sarajevo Samac Sanski Most Sokolac Srbac Srebrenik
## 36 51 73 11 19 68
## Stolac Tesanj Teslic Tomislavgrad Travnik Trebinje
## 11 59 30 19 97 33
## Tuzla Ugljevik V.Kladusa Visegrad Visoko Vitez
## 112 17 47 12 50 46
## Vlasenica Vogosca Zavidovici Zenica Zepce Zivinice
## 16 20 55 163 10 78
## Zvornik
## 54
summary (hbs.transport.drop.1$mj.trans.AM)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.00 31.67 47.50 91.24 110.00 745.50
sd (hbs.transport.drop.1$mj.trans.AM)
## [1] 113.6885
ggplot(data=hbs.transport.drop.1, mapping = aes(mj.trans.AM)) + geom_density() + xlab("Monthly household expenditure on transport (BAM)")
dim(hbs.transport.drop.1)
## [1] 4096 209
round(prop.table(table(hbs.transport.drop.1$ncomp)),3)*100
##
## 1 2 3 4 5 6 7 8 9 10 11 13
## 5.2 16.5 23.9 30.4 14.4 6.5 2.0 0.7 0.2 0.1 0.1 0.0
round(prop.table(table(hbs.transport.drop.1$Educ_1)),3)*100
##
## 1 2 3 4 5 6 7 8 9 10
## 2.5 3.9 0.1 18.2 60.9 0.9 3.8 8.8 0.7 0.3
table(hbs.transport.drop.1$ncomp1) #no Nas
##
## one two three four five six seven eight nine ten 11+
## 212 674 979 1247 588 267 82 29 9 4 5
table (hbs.transport.drop.1$ncomp)
##
## 1 2 3 4 5 6 7 8 9 10 11 13
## 212 674 979 1247 588 267 82 29 9 4 4 1
summary (hbs.transport.drop.1$n.employ) #no Nas.
## one two three and more
## 2448 1341 307
str(hbs.transport.drop.1$n.employ)
## Factor w/ 3 levels "one","two","three and more": 1 1 1 1 1 2 2 2 2 1 ...
table (hbs.transport.drop.1$Activ.1) #probacu bez ovoga mozda mi se sudara sa drugim..
##
## 1 0
## 2575 1521
summary (hbs.transport.drop.1$Age_1)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 21.00 43.75 52.00 51.62 59.00 95.00
#check for Nas
table (is.na (hbs.transport.drop.1$Age_1))
##
## FALSE
## 4096
table (is.na (hbs.transport.drop.1$Activ.1)) #only this is true for 1165
##
## FALSE
## 4096
table (is.na (hbs.transport.drop.1$ncomp))
##
## FALSE
## 4096
table (is.na (hbs.transport.drop.1$Sex_1))
##
## FALSE
## 4096
table (is.na (hbs.transport.drop.1$n.employ))
##
## FALSE
## 4096
table (is.na (hbs.transport.drop.1$Educ.1))
##
## FALSE
## 4096
prop.table(table(hbs.transport.drop.1$Educ.1))
##
## no education no elementary elementary high schl college
## 0.02514648 0.03979492 0.18164062 0.61791992 0.03833008
## university
## 0.09716797
prop.table(table(hbs.transport.drop.1$Activ.1))
##
## 1 0
## 0.6286621 0.3713379
prop.table(table(hbs.transport.drop.1$n.employ))
##
## one two three and more
## 0.59765625 0.32739258 0.07495117
prop.table(table(hbs.transport.drop.1$ncomp1))
##
## one two three four five six
## 0.0517578125 0.1645507812 0.2390136719 0.3044433594 0.1435546875 0.0651855469
## seven eight nine ten 11+
## 0.0200195312 0.0070800781 0.0021972656 0.0009765625 0.0012207031
sd (hbs.transport.drop.1$Age_1)
## [1] 11.90181
prop.table (table (hbs.transport.drop.1$Sex_1))
##
## 1 2
## 0.8479004 0.1520996
Ovaj model se razlikuje od prethodnog jer ne ukljucuje varijablu Activ.1. Kada stavim u model Activ.1 dobijem mnogo deleted variables preko 1,000 ali veci Rsquere.. ipak cu ici sa ovom varijantom bez Activ.1
trans.fit.drop.empl <- lm (log(mj.trans.AM + 0.0001) ~ factor (n.employ) + factor(Educ.1) + as.numeric(Age_1) + as.numeric(Age_1^2) + factor (ncomp) + factor (naziv_Opcine), data = hbs.transport.drop.1) #dodala sam 0.0001 da bi mi uvazilo normalnu cinjenicu da ljudi mogu ne trositi na prevoz i raditi
summary(trans.fit.drop.empl)
##
## Call:
## lm(formula = log(mj.trans.AM + 1e-04) ~ factor(n.employ) + factor(Educ.1) +
## as.numeric(Age_1) + as.numeric(Age_1^2) + factor(ncomp) +
## factor(naziv_Opcine), data = hbs.transport.drop.1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -13.9045 -0.3349 1.1090 2.4235 9.5649
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -4.4671847 1.3622252 -3.279 0.001049 **
## factor(n.employ)two 0.8286624 0.1589929 5.212 1.96e-07 ***
## factor(n.employ)three and more 1.1631985 0.2889280 4.026 5.78e-05 ***
## factor(Educ.1)no elementary -0.1370970 0.5885604 -0.233 0.815823
## factor(Educ.1)elementary 0.3253926 0.5137383 0.633 0.526521
## factor(Educ.1)high schl 1.4245362 0.5138117 2.772 0.005589 **
## factor(Educ.1)college 2.0239859 0.6157677 3.287 0.001022 **
## factor(Educ.1)university 2.2589115 0.5582529 4.046 5.30e-05 ***
## as.numeric(Age_1) 0.0227663 0.0402235 0.566 0.571430
## as.numeric(Age_1^2) -0.0002138 0.0003842 -0.556 0.577916
## factor(ncomp)2 2.0679315 0.3572980 5.788 7.69e-09 ***
## factor(ncomp)3 3.2070054 0.3501408 9.159 < 2e-16 ***
## factor(ncomp)4 4.0581024 0.3456475 11.741 < 2e-16 ***
## factor(ncomp)5 4.0764195 0.3738109 10.905 < 2e-16 ***
## factor(ncomp)6 4.4122409 0.4275281 10.320 < 2e-16 ***
## factor(ncomp)7 4.8746241 0.5982273 8.148 4.89e-16 ***
## factor(ncomp)8 2.3452397 0.9009034 2.603 0.009270 **
## factor(ncomp)9 5.2786149 1.5342019 3.441 0.000586 ***
## factor(ncomp)10 7.1454179 2.2719189 3.145 0.001673 **
## factor(ncomp)11 6.3118641 2.2654667 2.786 0.005360 **
## factor(ncomp)13 2.9470097 4.4529008 0.662 0.508126
## factor(naziv_Opcine)B.Petrovac -2.2305520 1.5777106 -1.414 0.157502
## factor(naziv_Opcine)Banovici 2.5354284 1.2531654 2.023 0.043117 *
## factor(naziv_Opcine)Banja Luka 1.7594469 0.9047799 1.945 0.051892 .
## factor(naziv_Opcine)Bihac 2.4249895 1.0011815 2.422 0.015474 *
## factor(naziv_Opcine)Bijeljina 0.2126446 0.9137670 0.233 0.815997
## factor(naziv_Opcine)Bratunac 2.0444613 1.5770051 1.296 0.194906
## factor(naziv_Opcine)Brcko 1.9590910 0.8937961 2.192 0.028446 *
## factor(naziv_Opcine)Breza -0.8063610 1.4899706 -0.541 0.588405
## factor(naziv_Opcine)Brod 0.5854416 1.2702890 0.461 0.644915
## factor(naziv_Opcine)Bugojno 0.3368162 1.0335599 0.326 0.744532
## factor(naziv_Opcine)Busovaca 2.8140681 1.2227155 2.301 0.021415 *
## factor(naziv_Opcine)Buzim 0.7269318 1.5743255 0.462 0.644292
## factor(naziv_Opcine)C.Sarajevo 0.6706023 1.0438118 0.642 0.520615
## factor(naziv_Opcine)Capljina 3.0405053 1.2777335 2.380 0.017378 *
## factor(naziv_Opcine)Cazin 1.2250233 1.0231803 1.197 0.231273
## factor(naziv_Opcine)Celic 0.6354852 1.5780128 0.403 0.687182
## factor(naziv_Opcine)Celinac 1.9362713 1.5774061 1.228 0.219706
## factor(naziv_Opcine)Citluk 3.1985538 1.2573358 2.544 0.010999 *
## factor(naziv_Opcine)D.Vakuf 1.3036124 1.1372783 1.146 0.251758
## factor(naziv_Opcine)Derventa 1.1033314 1.1887286 0.928 0.353380
## factor(naziv_Opcine)Doboj 1.4825534 1.0377832 1.429 0.153204
## factor(naziv_Opcine)Doboj-Istok 2.8519333 1.5269247 1.868 0.061869 .
## factor(naziv_Opcine)Drvar -0.6820059 1.4917204 -0.457 0.647556
## factor(naziv_Opcine)Foca - RS 1.3969046 1.2853189 1.087 0.277184
## factor(naziv_Opcine)Fojnica 2.6181274 1.3921588 1.881 0.060096 .
## factor(naziv_Opcine)G.Vakuf 1.8804346 1.2224870 1.538 0.124078
## factor(naziv_Opcine)Gacko -0.1479040 1.3221107 -0.112 0.910932
## factor(naziv_Opcine)Glamoc -1.6796643 1.6373856 -1.026 0.305038
## factor(naziv_Opcine)Gorazde 0.0015935 1.1614350 0.001 0.998905
## factor(naziv_Opcine)Gracanica 2.0450350 0.9850136 2.076 0.037944 *
## factor(naziv_Opcine)Grad Mostar 2.2341049 0.9181910 2.433 0.015011 *
## factor(naziv_Opcine)Gradacac 2.3515573 1.1288151 2.083 0.037296 *
## factor(naziv_Opcine)Gradiska 2.6388122 1.1727557 2.250 0.024497 *
## factor(naziv_Opcine)Grude 2.3445542 1.3015411 1.801 0.071721 .
## factor(naziv_Opcine)I.Ilidza -1.1183819 1.4923246 -0.749 0.453647
## factor(naziv_Opcine)Ilidza 1.3224862 1.0570589 1.251 0.210972
## factor(naziv_Opcine)Ilijas -0.1113344 1.4198877 -0.078 0.937505
## factor(naziv_Opcine)Jajce 1.0699867 1.2849869 0.833 0.405074
## factor(naziv_Opcine)K.Dubica 1.9069067 1.1161326 1.708 0.087623 .
## factor(naziv_Opcine)Kakanj 0.6210636 0.9942969 0.625 0.532252
## factor(naziv_Opcine)Kalesija 2.1688366 1.1922562 1.819 0.068971 .
## factor(naziv_Opcine)Kiseljak 2.5610159 1.1232287 2.280 0.022657 *
## factor(naziv_Opcine)Kladanj 1.7890376 1.4889809 1.202 0.229622
## factor(naziv_Opcine)Kljuc 0.3938509 1.2836799 0.307 0.759001
## factor(naziv_Opcine)Knezevo 1.2079207 1.4535347 0.831 0.406011
## factor(naziv_Opcine)Konjic 0.3448940 1.0664296 0.323 0.746402
## factor(naziv_Opcine)Kotor Varos 1.4188179 1.3902621 1.021 0.307535
## factor(naziv_Opcine)Kresevo 2.2808373 1.4267818 1.599 0.109991
## factor(naziv_Opcine)Laktasi 2.5866163 1.0888294 2.376 0.017568 *
## factor(naziv_Opcine)Livno 0.5201868 1.2657953 0.411 0.681127
## factor(naziv_Opcine)Lopare 2.2924223 1.1982650 1.913 0.055805 .
## factor(naziv_Opcine)Lukavac 2.3005171 1.0772678 2.136 0.032780 *
## factor(naziv_Opcine)Ljubuski 3.4284704 1.2189041 2.813 0.004936 **
## factor(naziv_Opcine)Maglaj 0.4750288 1.0970659 0.433 0.665039
## factor(naziv_Opcine)Modrica 1.2462666 1.1349184 1.098 0.272222
## factor(naziv_Opcine)N.G.Sarajevo 1.3790051 0.9219832 1.496 0.134813
## factor(naziv_Opcine)N.Gorazde 3.4889069 1.6342056 2.135 0.032828 *
## factor(naziv_Opcine)N.Sarajevo -0.0011995 1.0627532 -0.001 0.999100
## factor(naziv_Opcine)N.Travnik 0.4478608 1.0581746 0.423 0.672144
## factor(naziv_Opcine)Nevesinje 1.2430903 1.5826123 0.785 0.432226
## factor(naziv_Opcine)Novi Grad -0.7489409 1.0647671 -0.703 0.481857
## factor(naziv_Opcine)Orasje 2.5169598 1.2276676 2.050 0.040411 *
## factor(naziv_Opcine)Pale -0.9703708 1.3042027 -0.744 0.456900
## factor(naziv_Opcine)Posusje 2.3270904 1.4877399 1.564 0.117855
## factor(naziv_Opcine)Prijedor 1.7636379 0.9824622 1.795 0.072710 .
## factor(naziv_Opcine)Prnjavor 2.2442139 1.1197573 2.004 0.045117 *
## factor(naziv_Opcine)Prozor -0.2844668 1.5907595 -0.179 0.858085
## factor(naziv_Opcine)Ribnik 0.0997398 1.4579419 0.068 0.945462
## factor(naziv_Opcine)Rogatica -1.2514835 1.4543868 -0.860 0.389572
## factor(naziv_Opcine)Rudo 1.3913395 1.3938768 0.998 0.318253
## factor(naziv_Opcine)S.Brijeg 2.9709036 1.1223792 2.647 0.008154 **
## factor(naziv_Opcine)S.G.Sarajevo 1.5410571 1.1251841 1.370 0.170888
## factor(naziv_Opcine)Samac 1.3948388 1.0518278 1.326 0.184880
## factor(naziv_Opcine)Sanski Most 1.9652881 0.9941105 1.977 0.048118 *
## factor(naziv_Opcine)Sokolac -1.0855168 1.5821773 -0.686 0.492696
## factor(naziv_Opcine)Srbac 2.2763920 1.3209234 1.723 0.084906 .
## factor(naziv_Opcine)Srebrenik 0.2692335 1.0032846 0.268 0.788442
## factor(naziv_Opcine)Stolac 2.9820953 1.5775364 1.890 0.058784 .
## factor(naziv_Opcine)Tesanj 1.4966708 1.0256224 1.459 0.144567
## factor(naziv_Opcine)Teslic 0.8173838 1.1720547 0.697 0.485597
## factor(naziv_Opcine)Tomislavgrad 2.7878164 1.3255082 2.103 0.035510 *
## factor(naziv_Opcine)Travnik 2.2391334 0.9581216 2.337 0.019488 *
## factor(naziv_Opcine)Trebinje 0.2875894 1.1477389 0.251 0.802159
## factor(naziv_Opcine)Tuzla 1.3395042 0.9486195 1.412 0.158012
## factor(naziv_Opcine)Ugljevik 1.9105919 1.3626919 1.402 0.160972
## factor(naziv_Opcine)V.Kladusa 1.6292295 1.0613643 1.535 0.124855
## factor(naziv_Opcine)Visegrad -2.4244318 1.5330364 -1.581 0.113853
## factor(naziv_Opcine)Visoko 1.4946064 1.0530279 1.419 0.155878
## factor(naziv_Opcine)Vitez 1.3778560 1.0712191 1.286 0.198431
## factor(naziv_Opcine)Vlasenica 0.7174271 1.3919040 0.515 0.606282
## factor(naziv_Opcine)Vogosca 2.0373085 1.3025073 1.564 0.117863
## factor(naziv_Opcine)Zavidovici -0.4784494 1.0389110 -0.461 0.645161
## factor(naziv_Opcine)Zenica 0.0070139 0.9192454 0.008 0.993913
## factor(naziv_Opcine)Zepce 1.2468975 1.6418915 0.759 0.447642
## factor(naziv_Opcine)Zivinice 2.5370170 0.9851752 2.575 0.010054 *
## factor(naziv_Opcine)Zvornik 1.2951115 1.0391965 1.246 0.212741
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.402 on 3979 degrees of freedom
## Multiple R-squared: 0.1507, Adjusted R-squared: 0.1259
## F-statistic: 6.087 on 116 and 3979 DF, p-value: < 2.2e-16
#32 je sign opstina sa 15.06 r2 level 90%
model koji je kao prvi ali bez ncomp1 jer je autocorelacija sa broj onih koji rade tako da bih uzela ili jedan ili drugi
ali prvo uradti corelation of identp vari.
library(polycor)
## Warning: package 'polycor' was built under R version 4.3.3
polychor(hbs.transport.drop.1$Sex_1, hbs.transport.drop.1$Sex_2) #0.9
## [1] -0.9296735
cor.test(hbs.transport.drop.1$Age_1, hbs.transport.drop.1$Age_2) #0.6
##
## Pearson's product-moment correlation
##
## data: hbs.transport.drop.1$Age_1 and hbs.transport.drop.1$Age_2
## t = 52.081, df = 3882, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.6224508 0.6594946
## sample estimates:
## cor
## 0.6413463
#IPAK Age_2 i Sex_2 ne stavljam radi high correlation
library(polycor)
polychor (hbs.transport.drop.1$ncomp, hbs.transport.drop.1$n.employ)
## [1] 0.3791869
#0.379 nije visoka i stavicu ih u model
#dodala sam samo Sex u odnosu na gornji
p1 <- lm (log(mj.trans.AM + 0.0001) ~ factor(Sex_1) + factor(Activ.1) + factor(Educ.1) + as.numeric(Age_1) + as.numeric(Age_1^2) + factor(n.employ) + factor(ncomp) +factor (naziv_Opcine), data = hbs.transport.drop.1)
summary(p1)
##
## Call:
## lm(formula = log(mj.trans.AM + 1e-04) ~ factor(Sex_1) + factor(Activ.1) +
## factor(Educ.1) + as.numeric(Age_1) + as.numeric(Age_1^2) +
## factor(n.employ) + factor(ncomp) + factor(naziv_Opcine),
## data = hbs.transport.drop.1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -14.0968 -0.3842 1.1009 2.4205 9.0271
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -3.911e+00 1.369e+00 -2.857 0.004303 **
## factor(Sex_1)2 -6.321e-01 2.114e-01 -2.989 0.002813 **
## factor(Activ.1)0 -5.876e-01 1.751e-01 -3.357 0.000796 ***
## factor(Educ.1)no elementary -2.109e-01 5.875e-01 -0.359 0.719610
## factor(Educ.1)elementary 1.680e-01 5.160e-01 0.326 0.744715
## factor(Educ.1)high schl 1.131e+00 5.191e-01 2.178 0.029440 *
## factor(Educ.1)college 1.685e+00 6.197e-01 2.719 0.006578 **
## factor(Educ.1)university 1.898e+00 5.627e-01 3.372 0.000753 ***
## as.numeric(Age_1) 1.074e-02 4.021e-02 0.267 0.789425
## as.numeric(Age_1^2) 2.502e-06 3.868e-04 0.006 0.994840
## factor(n.employ)two 7.222e-01 1.607e-01 4.495 7.14e-06 ***
## factor(n.employ)three and more 9.932e-01 2.919e-01 3.403 0.000673 ***
## factor(ncomp)2 2.070e+00 3.588e-01 5.769 8.56e-09 ***
## factor(ncomp)3 3.180e+00 3.561e-01 8.930 < 2e-16 ***
## factor(ncomp)4 3.986e+00 3.531e-01 11.289 < 2e-16 ***
## factor(ncomp)5 4.050e+00 3.813e-01 10.622 < 2e-16 ***
## factor(ncomp)6 4.385e+00 4.377e-01 10.018 < 2e-16 ***
## factor(ncomp)7 4.846e+00 6.041e-01 8.022 1.35e-15 ***
## factor(ncomp)8 2.369e+00 9.059e-01 2.615 0.008961 **
## factor(ncomp)9 5.163e+00 1.532e+00 3.370 0.000759 ***
## factor(ncomp)10 7.048e+00 2.270e+00 3.105 0.001919 **
## factor(ncomp)11 6.229e+00 2.263e+00 2.752 0.005951 **
## factor(ncomp)13 2.860e+00 4.443e+00 0.644 0.519758
## factor(naziv_Opcine)B.Petrovac -2.344e+00 1.574e+00 -1.490 0.136384
## factor(naziv_Opcine)Banovici 2.595e+00 1.250e+00 2.076 0.037941 *
## factor(naziv_Opcine)Banja Luka 1.930e+00 9.031e-01 2.137 0.032633 *
## factor(naziv_Opcine)Bihac 2.610e+00 9.993e-01 2.612 0.009031 **
## factor(naziv_Opcine)Bijeljina 1.874e-01 9.114e-01 0.206 0.837139
## factor(naziv_Opcine)Bratunac 1.871e+00 1.573e+00 1.189 0.234543
## factor(naziv_Opcine)Brcko 2.073e+00 8.919e-01 2.324 0.020174 *
## factor(naziv_Opcine)Breza -7.793e-01 1.486e+00 -0.524 0.600041
## factor(naziv_Opcine)Brod 6.663e-01 1.268e+00 0.526 0.599255
## factor(naziv_Opcine)Bugojno 5.486e-01 1.032e+00 0.531 0.595161
## factor(naziv_Opcine)Busovaca 2.885e+00 1.220e+00 2.366 0.018035 *
## factor(naziv_Opcine)Buzim 1.056e+00 1.572e+00 0.672 0.501816
## factor(naziv_Opcine)C.Sarajevo 8.736e-01 1.042e+00 0.838 0.401820
## factor(naziv_Opcine)Capljina 3.199e+00 1.275e+00 2.509 0.012145 *
## factor(naziv_Opcine)Cazin 1.267e+00 1.021e+00 1.242 0.214425
## factor(naziv_Opcine)Celic 5.165e-01 1.574e+00 0.328 0.742819
## factor(naziv_Opcine)Celinac 2.035e+00 1.573e+00 1.293 0.195940
## factor(naziv_Opcine)Citluk 3.322e+00 1.254e+00 2.649 0.008110 **
## factor(naziv_Opcine)D.Vakuf 1.551e+00 1.136e+00 1.365 0.172392
## factor(naziv_Opcine)Derventa 1.037e+00 1.186e+00 0.875 0.381877
## factor(naziv_Opcine)Doboj 1.558e+00 1.035e+00 1.505 0.132444
## factor(naziv_Opcine)Doboj-Istok 3.070e+00 1.524e+00 2.015 0.043997 *
## factor(naziv_Opcine)Drvar -4.833e-01 1.488e+00 -0.325 0.745450
## factor(naziv_Opcine)Foca - RS 1.559e+00 1.282e+00 1.216 0.224175
## factor(naziv_Opcine)Fojnica 2.785e+00 1.389e+00 2.005 0.045060 *
## factor(naziv_Opcine)G.Vakuf 2.098e+00 1.221e+00 1.719 0.085651 .
## factor(naziv_Opcine)Gacko -1.755e-01 1.319e+00 -0.133 0.894122
## factor(naziv_Opcine)Glamoc -1.317e+00 1.635e+00 -0.806 0.420571
## factor(naziv_Opcine)Gorazde 2.304e-01 1.159e+00 0.199 0.842481
## factor(naziv_Opcine)Gracanica 2.224e+00 9.833e-01 2.262 0.023776 *
## factor(naziv_Opcine)Grad Mostar 2.366e+00 9.163e-01 2.582 0.009859 **
## factor(naziv_Opcine)Gradacac 2.393e+00 1.126e+00 2.125 0.033644 *
## factor(naziv_Opcine)Gradiska 2.785e+00 1.170e+00 2.380 0.017368 *
## factor(naziv_Opcine)Grude 2.389e+00 1.298e+00 1.840 0.065771 .
## factor(naziv_Opcine)I.Ilidza -8.935e-01 1.489e+00 -0.600 0.548591
## factor(naziv_Opcine)Ilidza 1.534e+00 1.055e+00 1.453 0.146231
## factor(naziv_Opcine)Ilijas 4.214e-02 1.417e+00 0.030 0.976269
## factor(naziv_Opcine)Jajce 1.230e+00 1.282e+00 0.959 0.337426
## factor(naziv_Opcine)K.Dubica 2.030e+00 1.114e+00 1.823 0.068424 .
## factor(naziv_Opcine)Kakanj 6.993e-01 9.918e-01 0.705 0.480820
## factor(naziv_Opcine)Kalesija 2.356e+00 1.190e+00 1.980 0.047798 *
## factor(naziv_Opcine)Kiseljak 2.731e+00 1.121e+00 2.437 0.014866 *
## factor(naziv_Opcine)Kladanj 1.916e+00 1.485e+00 1.290 0.197092
## factor(naziv_Opcine)Kljuc 6.396e-01 1.281e+00 0.499 0.617732
## factor(naziv_Opcine)Knezevo 1.212e+00 1.450e+00 0.836 0.403268
## factor(naziv_Opcine)Konjic 4.785e-01 1.064e+00 0.450 0.652953
## factor(naziv_Opcine)Kotor Varos 1.447e+00 1.387e+00 1.044 0.296728
## factor(naziv_Opcine)Kresevo 2.245e+00 1.423e+00 1.578 0.114744
## factor(naziv_Opcine)Laktasi 2.486e+00 1.086e+00 2.289 0.022129 *
## factor(naziv_Opcine)Livno 4.975e-01 1.262e+00 0.394 0.693586
## factor(naziv_Opcine)Lopare 2.564e+00 1.198e+00 2.140 0.032382 *
## factor(naziv_Opcine)Lukavac 2.400e+00 1.075e+00 2.233 0.025584 *
## factor(naziv_Opcine)Ljubuski 3.489e+00 1.216e+00 2.870 0.004129 **
## factor(naziv_Opcine)Maglaj 5.638e-01 1.095e+00 0.515 0.606516
## factor(naziv_Opcine)Modrica 1.494e+00 1.133e+00 1.318 0.187463
## factor(naziv_Opcine)N.G.Sarajevo 1.543e+00 9.202e-01 1.677 0.093623 .
## factor(naziv_Opcine)N.Gorazde 3.871e+00 1.632e+00 2.372 0.017755 *
## factor(naziv_Opcine)N.Sarajevo 1.493e-01 1.061e+00 0.141 0.888067
## factor(naziv_Opcine)N.Travnik 6.603e-01 1.056e+00 0.625 0.532023
## factor(naziv_Opcine)Nevesinje 1.429e+00 1.579e+00 0.905 0.365505
## factor(naziv_Opcine)Novi Grad -6.506e-01 1.062e+00 -0.613 0.540212
## factor(naziv_Opcine)Orasje 2.715e+00 1.225e+00 2.216 0.026723 *
## factor(naziv_Opcine)Pale -8.615e-01 1.301e+00 -0.662 0.507922
## factor(naziv_Opcine)Posusje 2.371e+00 1.484e+00 1.598 0.110131
## factor(naziv_Opcine)Prijedor 1.911e+00 9.804e-01 1.949 0.051377 .
## factor(naziv_Opcine)Prnjavor 2.271e+00 1.117e+00 2.033 0.042100 *
## factor(naziv_Opcine)Prozor -1.118e-01 1.587e+00 -0.070 0.943857
## factor(naziv_Opcine)Ribnik 3.147e-01 1.455e+00 0.216 0.828765
## factor(naziv_Opcine)Rogatica -1.134e+00 1.451e+00 -0.782 0.434487
## factor(naziv_Opcine)Rudo 1.474e+00 1.390e+00 1.060 0.289111
## factor(naziv_Opcine)S.Brijeg 3.146e+00 1.120e+00 2.809 0.004996 **
## factor(naziv_Opcine)S.G.Sarajevo 1.706e+00 1.123e+00 1.520 0.128695
## factor(naziv_Opcine)Samac 1.458e+00 1.049e+00 1.390 0.164613
## factor(naziv_Opcine)Sanski Most 2.063e+00 9.921e-01 2.079 0.037670 *
## factor(naziv_Opcine)Sokolac -7.673e-01 1.580e+00 -0.486 0.627165
## factor(naziv_Opcine)Srbac 2.184e+00 1.318e+00 1.658 0.097470 .
## factor(naziv_Opcine)Srebrenik 2.289e-01 1.001e+00 0.229 0.819076
## factor(naziv_Opcine)Stolac 3.214e+00 1.574e+00 2.042 0.041236 *
## factor(naziv_Opcine)Tesanj 1.502e+00 1.023e+00 1.468 0.142173
## factor(naziv_Opcine)Teslic 9.106e-01 1.169e+00 0.779 0.436147
## factor(naziv_Opcine)Tomislavgrad 2.768e+00 1.322e+00 2.094 0.036316 *
## factor(naziv_Opcine)Travnik 2.267e+00 9.556e-01 2.372 0.017723 *
## factor(naziv_Opcine)Trebinje 4.747e-01 1.145e+00 0.414 0.678553
## factor(naziv_Opcine)Tuzla 1.523e+00 9.470e-01 1.608 0.107890
## factor(naziv_Opcine)Ugljevik 1.932e+00 1.360e+00 1.421 0.155522
## factor(naziv_Opcine)V.Kladusa 1.659e+00 1.059e+00 1.568 0.117073
## factor(naziv_Opcine)Visegrad -2.115e+00 1.531e+00 -1.382 0.167053
## factor(naziv_Opcine)Visoko 1.681e+00 1.051e+00 1.600 0.109781
## factor(naziv_Opcine)Vitez 1.551e+00 1.069e+00 1.451 0.146855
## factor(naziv_Opcine)Vlasenica 7.641e-01 1.388e+00 0.550 0.582109
## factor(naziv_Opcine)Vogosca 2.157e+00 1.299e+00 1.660 0.096996 .
## factor(naziv_Opcine)Zavidovici -3.540e-01 1.037e+00 -0.341 0.732755
## factor(naziv_Opcine)Zenica 1.403e-01 9.173e-01 0.153 0.878424
## factor(naziv_Opcine)Zepce 1.391e+00 1.638e+00 0.849 0.395911
## factor(naziv_Opcine)Zivinice 2.679e+00 9.831e-01 2.726 0.006447 **
## factor(naziv_Opcine)Zvornik 1.303e+00 1.037e+00 1.257 0.208946
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.391 on 3977 degrees of freedom
## Multiple R-squared: 0.1556, Adjusted R-squared: 0.1305
## F-statistic: 6.209 on 118 and 3977 DF, p-value: < 2.2e-16
#ovaj model ima 32 sign munici for level 90 a r2 je 15,5
#do sad najvise
#prethodni bez Active
p3 <- lm (log(mj.trans.AM + 0.0001) ~ factor(Sex_1) + factor(Educ.1) + as.numeric(Age_1) + as.numeric(Age_1^2) + n.employ + factor (ncomp) +factor (naziv_Opcine), data = hbs.transport.drop.1)
summary(p3)
##
## Call:
## lm(formula = log(mj.trans.AM + 1e-04) ~ factor(Sex_1) + factor(Educ.1) +
## as.numeric(Age_1) + as.numeric(Age_1^2) + n.employ + factor(ncomp) +
## factor(naziv_Opcine), data = hbs.transport.drop.1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -14.0028 -0.3495 1.1168 2.4356 9.2279
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -3.8954052 1.3707592 -2.842 0.004509 **
## factor(Sex_1)2 -0.7153553 0.2102541 -3.402 0.000675 ***
## factor(Educ.1)no elementary -0.2157814 0.5882345 -0.367 0.713766
## factor(Educ.1)elementary 0.1226570 0.5165056 0.237 0.812301
## factor(Educ.1)high schl 1.1431621 0.5197518 2.199 0.027904 *
## factor(Educ.1)college 1.7517759 0.6201337 2.825 0.004754 **
## factor(Educ.1)university 2.0015860 0.5626192 3.558 0.000379 ***
## as.numeric(Age_1) 0.0187362 0.0401876 0.466 0.641084
## as.numeric(Age_1^2) -0.0001659 0.0003840 -0.432 0.665757
## n.employtwo 0.8055313 0.1589275 5.069 4.19e-07 ***
## n.employthree and more 1.1479807 0.2885794 3.978 7.07e-05 ***
## factor(ncomp)2 1.9698059 0.3579878 5.502 3.98e-08 ***
## factor(ncomp)3 3.0272983 0.3536430 8.560 < 2e-16 ***
## factor(ncomp)4 3.8427804 0.3509425 10.950 < 2e-16 ***
## factor(ncomp)5 3.8727749 0.3780829 10.243 < 2e-16 ***
## factor(ncomp)6 4.1626616 0.4332168 9.609 < 2e-16 ***
## factor(ncomp)7 4.6347793 0.6015785 7.704 1.65e-14 ***
## factor(ncomp)8 2.0819172 0.9030312 2.305 0.021191 *
## factor(ncomp)9 5.0479734 1.5336659 3.291 0.001005 **
## factor(ncomp)10 6.7716265 2.2715639 2.981 0.002890 **
## factor(ncomp)11 5.9604844 2.2648179 2.632 0.008527 **
## factor(ncomp)13 2.6381252 4.4479214 0.593 0.553138
## factor(naziv_Opcine)B.Petrovac -2.2841383 1.5756968 -1.450 0.147247
## factor(naziv_Opcine)Banovici 2.5639664 1.2515314 2.049 0.040561 *
## factor(naziv_Opcine)Banja Luka 1.8331743 0.9038397 2.028 0.042606 *
## factor(naziv_Opcine)Bihac 2.5181170 1.0002282 2.518 0.011857 *
## factor(naziv_Opcine)Bijeljina 0.1842410 0.9125933 0.202 0.840015
## factor(naziv_Opcine)Bratunac 1.9663815 1.5750807 1.248 0.211946
## factor(naziv_Opcine)Brcko 1.9818226 0.8926357 2.220 0.026462 *
## factor(naziv_Opcine)Breza -0.7466327 1.4880979 -0.502 0.615881
## factor(naziv_Opcine)Brod 0.7292550 1.2693082 0.575 0.565642
## factor(naziv_Opcine)Bugojno 0.3682394 1.0322304 0.357 0.721304
## factor(naziv_Opcine)Busovaca 2.8495927 1.2211384 2.334 0.019669 *
## factor(naziv_Opcine)Buzim 1.0044741 1.5743522 0.638 0.523495
## factor(naziv_Opcine)C.Sarajevo 0.7669969 1.0428123 0.736 0.462073
## factor(naziv_Opcine)Capljina 3.0718403 1.2760720 2.407 0.016118 *
## factor(naziv_Opcine)Cazin 1.2440195 1.0218385 1.217 0.223512
## factor(naziv_Opcine)Celic 0.5763739 1.5760157 0.366 0.714597
## factor(naziv_Opcine)Celinac 2.0076634 1.5754537 1.274 0.202617
## factor(naziv_Opcine)Citluk 3.2539847 1.2557739 2.591 0.009599 **
## factor(naziv_Opcine)D.Vakuf 1.3147792 1.1357747 1.158 0.247094
## factor(naziv_Opcine)Derventa 1.0861985 1.1871626 0.915 0.360272
## factor(naziv_Opcine)Doboj 1.4752349 1.0364090 1.423 0.154696
## factor(naziv_Opcine)Doboj-Istok 2.9104456 1.5249964 1.908 0.056399 .
## factor(naziv_Opcine)Drvar -0.5441866 1.4902925 -0.365 0.715016
## factor(naziv_Opcine)Foca - RS 1.4504957 1.2837108 1.130 0.258576
## factor(naziv_Opcine)Fojnica 2.6243272 1.3903136 1.888 0.059155 .
## factor(naziv_Opcine)G.Vakuf 1.9178077 1.2209150 1.571 0.116310
## factor(naziv_Opcine)Gacko -0.1128471 1.3203974 -0.085 0.931896
## factor(naziv_Opcine)Glamoc -1.5495627 1.6356610 -0.947 0.343512
## factor(naziv_Opcine)Gorazde 0.1343960 1.1605512 0.116 0.907814
## factor(naziv_Opcine)Gracanica 2.0890642 0.9837922 2.123 0.033775 *
## factor(naziv_Opcine)Grad Mostar 2.3247605 0.9173602 2.534 0.011309 *
## factor(naziv_Opcine)Gradacac 2.3014182 1.1274142 2.041 0.041284 *
## factor(naziv_Opcine)Gradiska 2.6578881 1.1712136 2.269 0.023301 *
## factor(naziv_Opcine)Grude 2.3699088 1.2998362 1.823 0.068343 .
## factor(naziv_Opcine)I.Ilidza -1.0720645 1.4904075 -0.719 0.471992
## factor(naziv_Opcine)Ilidza 1.4130455 1.0559924 1.338 0.180934
## factor(naziv_Opcine)Ilijas 0.0026093 1.4183999 0.002 0.998532
## factor(naziv_Opcine)Jajce 1.1006039 1.2833142 0.858 0.391151
## factor(naziv_Opcine)K.Dubica 1.9871340 1.1149016 1.782 0.074770 .
## factor(naziv_Opcine)Kakanj 0.6543844 0.9930264 0.659 0.509947
## factor(naziv_Opcine)Kalesija 2.1885279 1.1906889 1.838 0.066132 .
## factor(naziv_Opcine)Kiseljak 2.6231503 1.1218876 2.338 0.019428 *
## factor(naziv_Opcine)Kladanj 1.8601669 1.4871530 1.251 0.211072
## factor(naziv_Opcine)Kljuc 0.5541974 1.2828433 0.432 0.665760
## factor(naziv_Opcine)Knezevo 1.1896983 1.4516167 0.820 0.412512
## factor(naziv_Opcine)Konjic 0.3831562 1.0650745 0.360 0.719056
## factor(naziv_Opcine)Kotor Varos 1.4130934 1.3884192 1.018 0.308848
## factor(naziv_Opcine)Kresevo 2.2474188 1.4249233 1.577 0.114824
## factor(naziv_Opcine)Laktasi 2.5319208 1.0875041 2.328 0.019952 *
## factor(naziv_Opcine)Livno 0.5144384 1.2641176 0.407 0.684063
## factor(naziv_Opcine)Lopare 2.2990177 1.1966773 1.921 0.054782 .
## factor(naziv_Opcine)Lukavac 2.3503414 1.0759387 2.184 0.028987 *
## factor(naziv_Opcine)Ljubuski 3.4973887 1.2174560 2.873 0.004091 **
## factor(naziv_Opcine)Maglaj 0.4614424 1.0956181 0.421 0.673653
## factor(naziv_Opcine)Modrica 1.3420003 1.1337623 1.184 0.236614
## factor(naziv_Opcine)N.G.Sarajevo 1.4723037 0.9211686 1.598 0.110056
## factor(naziv_Opcine)N.Gorazde 3.6187069 1.6324840 2.217 0.026701 *
## factor(naziv_Opcine)N.Sarajevo 0.1184439 1.0619260 0.112 0.911196
## factor(naziv_Opcine)N.Travnik 0.5159557 1.0569606 0.488 0.625470
## factor(naziv_Opcine)Nevesinje 1.2616899 1.5805227 0.798 0.424759
## factor(naziv_Opcine)Novi Grad -0.7033111 1.0634394 -0.661 0.508423
## factor(naziv_Opcine)Orasje 2.6108711 1.2263500 2.129 0.033317 *
## factor(naziv_Opcine)Pale -0.8946577 1.3026630 -0.687 0.492254
## factor(naziv_Opcine)Posusje 2.3410481 1.4857723 1.576 0.115187
## factor(naziv_Opcine)Prijedor 1.8407802 0.9814211 1.876 0.060780 .
## factor(naziv_Opcine)Prnjavor 2.2472098 1.1182724 2.010 0.044548 *
## factor(naziv_Opcine)Prozor -0.2411571 1.5887007 -0.152 0.879356
## factor(naziv_Opcine)Ribnik 0.1874003 1.4562362 0.129 0.897611
## factor(naziv_Opcine)Rogatica -1.1364997 1.4528510 -0.782 0.434111
## factor(naziv_Opcine)Rudo 1.4487043 1.3921302 1.041 0.298107
## factor(naziv_Opcine)S.Brijeg 3.0645697 1.1212286 2.733 0.006299 **
## factor(naziv_Opcine)S.G.Sarajevo 1.6548032 1.1241890 1.472 0.141101
## factor(naziv_Opcine)Samac 1.4152199 1.0504499 1.347 0.177976
## factor(naziv_Opcine)Sanski Most 2.0832708 0.9933974 2.097 0.036046 *
## factor(naziv_Opcine)Sokolac -0.8881460 1.5811433 -0.562 0.574344
## factor(naziv_Opcine)Srbac 2.2403095 1.3192141 1.698 0.089545 .
## factor(naziv_Opcine)Srebrenik 0.2610489 1.0019568 0.261 0.794461
## factor(naziv_Opcine)Stolac 3.1243251 1.5759986 1.982 0.047499 *
## factor(naziv_Opcine)Tesanj 1.4711862 1.0242895 1.436 0.150996
## factor(naziv_Opcine)Teslic 0.8237900 1.1705017 0.704 0.481603
## factor(naziv_Opcine)Tomislavgrad 2.7688214 1.3237620 2.092 0.036535 *
## factor(naziv_Opcine)Travnik 2.2484257 0.9568547 2.350 0.018832 *
## factor(naziv_Opcine)Trebinje 0.3756379 1.1465087 0.328 0.743204
## factor(naziv_Opcine)Tuzla 1.3988222 0.9475217 1.476 0.139944
## factor(naziv_Opcine)Ugljevik 1.8214330 1.3611368 1.338 0.180917
## factor(naziv_Opcine)V.Kladusa 1.6293368 1.0599566 1.537 0.124330
## factor(naziv_Opcine)Visegrad -2.1995082 1.5324297 -1.435 0.151278
## factor(naziv_Opcine)Visoko 1.5600325 1.0518071 1.483 0.138102
## factor(naziv_Opcine)Vitez 1.4216063 1.0698756 1.329 0.184004
## factor(naziv_Opcine)Vlasenica 0.7929226 1.3902350 0.570 0.568472
## factor(naziv_Opcine)Vogosca 2.0552578 1.3007905 1.580 0.114185
## factor(naziv_Opcine)Zavidovici -0.4410271 1.0375914 -0.425 0.670824
## factor(naziv_Opcine)Zenica 0.0837421 0.9183032 0.091 0.927344
## factor(naziv_Opcine)Zepce 1.2505237 1.6397142 0.763 0.445719
## factor(naziv_Opcine)Zivinice 2.6034920 0.9840625 2.646 0.008185 **
## factor(naziv_Opcine)Zvornik 1.2723267 1.0378398 1.226 0.220295
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.396 on 3978 degrees of freedom
## Multiple R-squared: 0.1532, Adjusted R-squared: 0.1283
## F-statistic: 6.15 on 117 and 3978 DF, p-value: < 2.2e-16
#ovaj ima 32 sign munici ali 15,3 r2 for 90 ali je manji broj opcina
#prethodni sa Active bez Age jer je Age non sig
p2 <- lm (log(mj.trans.AM + 0.0001) ~ factor (Sex_1)+ factor(Educ.1) + factor (Activ.1) + n.employ + factor (ncomp) +factor (naziv_Opcine), data = hbs.transport.drop.1)
summary(p2)
##
## Call:
## lm(formula = log(mj.trans.AM + 1e-04) ~ factor(Sex_1) + factor(Educ.1) +
## factor(Activ.1) + n.employ + factor(ncomp) + factor(naziv_Opcine),
## data = hbs.transport.drop.1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -14.0126 -0.3861 1.1226 2.4137 9.0558
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -3.27990 0.96872 -3.386 0.000717 ***
## factor(Sex_1)2 -0.63504 0.21140 -3.004 0.002681 **
## factor(Educ.1)no elementary -0.23136 0.58421 -0.396 0.692117
## factor(Educ.1)elementary 0.03278 0.49049 0.067 0.946714
## factor(Educ.1)high schl 0.95736 0.48481 1.975 0.048371 *
## factor(Educ.1)college 1.54963 0.59766 2.593 0.009553 **
## factor(Educ.1)university 1.72031 0.53542 3.213 0.001324 **
## factor(Activ.1)0 -0.48786 0.16055 -3.039 0.002392 **
## n.employtwo 0.73477 0.16029 4.584 4.70e-06 ***
## n.employthree and more 1.04832 0.28856 3.633 0.000284 ***
## factor(ncomp)2 2.11762 0.35737 5.926 3.37e-09 ***
## factor(ncomp)3 3.20186 0.35576 9.000 < 2e-16 ***
## factor(ncomp)4 3.97763 0.35278 11.275 < 2e-16 ***
## factor(ncomp)5 4.05005 0.38098 10.631 < 2e-16 ***
## factor(ncomp)6 4.39520 0.43762 10.043 < 2e-16 ***
## factor(ncomp)7 4.88347 0.60360 8.091 7.82e-16 ***
## factor(ncomp)8 2.39672 0.90554 2.647 0.008160 **
## factor(ncomp)9 5.23364 1.53107 3.418 0.000637 ***
## factor(ncomp)10 7.14030 2.26881 3.147 0.001661 **
## factor(ncomp)11 6.17388 2.26299 2.728 0.006396 **
## factor(ncomp)13 2.78441 4.44255 0.627 0.530854
## factor(naziv_Opcine)B.Petrovac -2.28933 1.57323 -1.455 0.145701
## factor(naziv_Opcine)Banovici 2.59664 1.24920 2.079 0.037715 *
## factor(naziv_Opcine)Banja Luka 1.95396 0.90066 2.169 0.030106 *
## factor(naziv_Opcine)Bihac 2.64195 0.99816 2.647 0.008157 **
## factor(naziv_Opcine)Bijeljina 0.23776 0.90897 0.262 0.793670
## factor(naziv_Opcine)Bratunac 1.90581 1.57304 1.212 0.225759
## factor(naziv_Opcine)Brcko 2.09072 0.89052 2.348 0.018935 *
## factor(naziv_Opcine)Breza -0.72278 1.48534 -0.487 0.626563
## factor(naziv_Opcine)Brod 0.69952 1.26585 0.553 0.580564
## factor(naziv_Opcine)Bugojno 0.55043 1.02992 0.534 0.593069
## factor(naziv_Opcine)Busovaca 2.89355 1.21918 2.373 0.017675 *
## factor(naziv_Opcine)Buzim 0.99890 1.57196 0.635 0.525171
## factor(naziv_Opcine)C.Sarajevo 0.93881 1.03919 0.903 0.366364
## factor(naziv_Opcine)Capljina 3.21469 1.27491 2.522 0.011724 *
## factor(naziv_Opcine)Cazin 1.26398 1.02056 1.239 0.215598
## factor(naziv_Opcine)Celic 0.56411 1.57203 0.359 0.719736
## factor(naziv_Opcine)Celinac 2.09228 1.57218 1.331 0.183327
## factor(naziv_Opcine)Citluk 3.35507 1.25254 2.679 0.007423 **
## factor(naziv_Opcine)D.Vakuf 1.53278 1.13565 1.350 0.177190
## factor(naziv_Opcine)Derventa 1.12887 1.17999 0.957 0.338788
## factor(naziv_Opcine)Doboj 1.57630 1.03441 1.524 0.127622
## factor(naziv_Opcine)Doboj-Istok 3.07494 1.52331 2.019 0.043596 *
## factor(naziv_Opcine)Drvar -0.39626 1.48646 -0.267 0.789804
## factor(naziv_Opcine)Foca - RS 1.59382 1.28129 1.244 0.213602
## factor(naziv_Opcine)Fojnica 2.76709 1.38845 1.993 0.046337 *
## factor(naziv_Opcine)G.Vakuf 2.10330 1.21903 1.725 0.084536 .
## factor(naziv_Opcine)Gacko -0.06710 1.31512 -0.051 0.959309
## factor(naziv_Opcine)Glamoc -1.29297 1.63427 -0.791 0.428896
## factor(naziv_Opcine)Gorazde 0.21054 1.15777 0.182 0.855707
## factor(naziv_Opcine)Gracanica 2.23753 0.98241 2.278 0.022804 *
## factor(naziv_Opcine)Grad Mostar 2.42525 0.91280 2.657 0.007917 **
## factor(naziv_Opcine)Gradacac 2.39007 1.12545 2.124 0.033760 *
## factor(naziv_Opcine)Gradiska 2.84286 1.16876 2.432 0.015044 *
## factor(naziv_Opcine)Grude 2.41217 1.29667 1.860 0.062920 .
## factor(naziv_Opcine)I.Ilidza -0.82901 1.48848 -0.557 0.577590
## factor(naziv_Opcine)Ilidza 1.56380 1.05387 1.484 0.137924
## factor(naziv_Opcine)Ilijas 0.03523 1.41558 0.025 0.980144
## factor(naziv_Opcine)Jajce 1.22854 1.28191 0.958 0.337934
## factor(naziv_Opcine)K.Dubica 2.08118 1.11141 1.873 0.061203 .
## factor(naziv_Opcine)Kakanj 0.71194 0.99093 0.718 0.472516
## factor(naziv_Opcine)Kalesija 2.32587 1.18956 1.955 0.050624 .
## factor(naziv_Opcine)Kiseljak 2.76942 1.11930 2.474 0.013393 *
## factor(naziv_Opcine)Kladanj 1.93125 1.48433 1.301 0.193301
## factor(naziv_Opcine)Kljuc 0.64105 1.28090 0.500 0.616769
## factor(naziv_Opcine)Knezevo 1.26609 1.44884 0.874 0.382246
## factor(naziv_Opcine)Konjic 0.50379 1.06242 0.474 0.635392
## factor(naziv_Opcine)Kotor Varos 1.47399 1.38623 1.063 0.287709
## factor(naziv_Opcine)Kresevo 2.26443 1.42161 1.593 0.111271
## factor(naziv_Opcine)Laktasi 2.58175 1.08271 2.385 0.017148 *
## factor(naziv_Opcine)Livno 0.56720 1.26125 0.450 0.652944
## factor(naziv_Opcine)Lopare 2.57356 1.19634 2.151 0.031521 *
## factor(naziv_Opcine)Lukavac 2.41888 1.07399 2.252 0.024362 *
## factor(naziv_Opcine)Ljubuski 3.59209 1.21060 2.967 0.003023 **
## factor(naziv_Opcine)Maglaj 0.56479 1.09434 0.516 0.605814
## factor(naziv_Opcine)Modrica 1.52760 1.13220 1.349 0.177341
## factor(naziv_Opcine)N.G.Sarajevo 1.56675 0.91767 1.707 0.087844 .
## factor(naziv_Opcine)N.Gorazde 3.82933 1.63070 2.348 0.018909 *
## factor(naziv_Opcine)N.Sarajevo 0.22348 1.05731 0.211 0.832616
## factor(naziv_Opcine)N.Travnik 0.67928 1.05552 0.644 0.519908
## factor(naziv_Opcine)Nevesinje 1.53253 1.57592 0.972 0.330877
## factor(naziv_Opcine)Novi Grad -0.64233 1.05738 -0.607 0.543567
## factor(naziv_Opcine)Orasje 2.72791 1.22396 2.229 0.025886 *
## factor(naziv_Opcine)Pale -0.80212 1.29790 -0.618 0.536601
## factor(naziv_Opcine)Posusje 2.40663 1.48261 1.623 0.104618
## factor(naziv_Opcine)Prijedor 1.90442 0.97820 1.947 0.051620 .
## factor(naziv_Opcine)Prnjavor 2.29271 1.11578 2.055 0.039964 *
## factor(naziv_Opcine)Prozor -0.10177 1.58647 -0.064 0.948856
## factor(naziv_Opcine)Ribnik 0.39453 1.45291 0.272 0.785987
## factor(naziv_Opcine)Rogatica -1.10462 1.44996 -0.762 0.446207
## factor(naziv_Opcine)Rudo 1.53217 1.38835 1.104 0.269835
## factor(naziv_Opcine)S.Brijeg 3.22438 1.11663 2.888 0.003903 **
## factor(naziv_Opcine)S.G.Sarajevo 1.74108 1.12156 1.552 0.120654
## factor(naziv_Opcine)Samac 1.52376 1.04708 1.455 0.145681
## factor(naziv_Opcine)Sanski Most 2.11416 0.99032 2.135 0.032837 *
## factor(naziv_Opcine)Sokolac -0.70119 1.57805 -0.444 0.656820
## factor(naziv_Opcine)Srbac 2.24444 1.31473 1.707 0.087872 .
## factor(naziv_Opcine)Srebrenik 0.24415 0.99921 0.244 0.806980
## factor(naziv_Opcine)Stolac 3.32577 1.57066 2.117 0.034285 *
## factor(naziv_Opcine)Tesanj 1.51480 1.02194 1.482 0.138344
## factor(naziv_Opcine)Teslic 0.91484 1.16845 0.783 0.433701
## factor(naziv_Opcine)Tomislavgrad 2.81667 1.32104 2.132 0.033055 *
## factor(naziv_Opcine)Travnik 2.29869 0.95433 2.409 0.016054 *
## factor(naziv_Opcine)Trebinje 0.53480 1.14407 0.467 0.640199
## factor(naziv_Opcine)Tuzla 1.53085 0.94536 1.619 0.105457
## factor(naziv_Opcine)Ugljevik 1.95820 1.35951 1.440 0.149842
## factor(naziv_Opcine)V.Kladusa 1.63186 1.05741 1.543 0.122846
## factor(naziv_Opcine)Visegrad -2.09194 1.52940 -1.368 0.171446
## factor(naziv_Opcine)Visoko 1.70880 1.04980 1.628 0.103659
## factor(naziv_Opcine)Vitez 1.55543 1.06670 1.458 0.144872
## factor(naziv_Opcine)Vlasenica 0.77557 1.38731 0.559 0.576164
## factor(naziv_Opcine)Vogosca 2.20510 1.29855 1.698 0.089561 .
## factor(naziv_Opcine)Zavidovici -0.33526 1.03504 -0.324 0.746024
## factor(naziv_Opcine)Zenica 0.17133 0.91583 0.187 0.851613
## factor(naziv_Opcine)Zepce 1.38358 1.63722 0.845 0.398120
## factor(naziv_Opcine)Zivinice 2.68227 0.98207 2.731 0.006337 **
## factor(naziv_Opcine)Zvornik 1.34830 1.03528 1.302 0.192871
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.391 on 3979 degrees of freedom
## Multiple R-squared: 0.1551, Adjusted R-squared: 0.1304
## F-statistic: 6.296 on 116 and 3979 DF, p-value: < 2.2e-16
#ovaj ima 35 sign munici ali 15.5 r2 for 90
#prethodni sa ncomp1
p2.n <- lm (log(mj.trans.AM + 0.0001) ~ factor (Sex_1)+ factor(Educ.1) + factor (Activ.1) + n.employ + factor (ncomp1) +factor (naziv_Opcine), data = hbs.transport.drop.1)
summary(p2.n)
##
## Call:
## lm(formula = log(mj.trans.AM + 1e-04) ~ factor(Sex_1) + factor(Educ.1) +
## factor(Activ.1) + n.employ + factor(ncomp1) + factor(naziv_Opcine),
## data = hbs.transport.drop.1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -14.0162 -0.3858 1.1246 2.4120 9.0566
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -3.27996 0.96866 -3.386 0.000716 ***
## factor(Sex_1)2 -0.63547 0.21138 -3.006 0.002661 **
## factor(Educ.1)no elementary -0.22798 0.58415 -0.390 0.696361
## factor(Educ.1)elementary 0.03410 0.49045 0.070 0.944569
## factor(Educ.1)high schl 0.95589 0.48478 1.972 0.048700 *
## factor(Educ.1)college 1.54869 0.59761 2.591 0.009592 **
## factor(Educ.1)university 1.71860 0.53538 3.210 0.001338 **
## factor(Activ.1)0 -0.48745 0.16054 -3.036 0.002410 **
## n.employtwo 0.73435 0.16028 4.582 4.75e-06 ***
## n.employthree and more 1.04632 0.28852 3.626 0.000291 ***
## factor(ncomp1)two 2.11754 0.35734 5.926 3.37e-09 ***
## factor(ncomp1)three 3.20240 0.35573 9.002 < 2e-16 ***
## factor(ncomp1)four 3.97817 0.35276 11.277 < 2e-16 ***
## factor(ncomp1)five 4.05053 0.38096 10.633 < 2e-16 ***
## factor(ncomp1)six 4.39611 0.43759 10.046 < 2e-16 ***
## factor(ncomp1)seven 4.88352 0.60356 8.091 7.78e-16 ***
## factor(ncomp1)eight 2.39927 0.90548 2.650 0.008087 **
## factor(ncomp1)nine 5.23373 1.53097 3.419 0.000636 ***
## factor(ncomp1)ten 7.14002 2.26866 3.147 0.001660 **
## factor(ncomp1)11+ 5.48914 2.02971 2.704 0.006872 **
## factor(naziv_Opcine)B.Petrovac -2.28843 1.57313 -1.455 0.145831
## factor(naziv_Opcine)Banovici 2.59722 1.24912 2.079 0.037659 *
## factor(naziv_Opcine)Banja Luka 1.95838 0.90058 2.175 0.029720 *
## factor(naziv_Opcine)Bihac 2.64225 0.99809 2.647 0.008146 **
## factor(naziv_Opcine)Bijeljina 0.23795 0.90891 0.262 0.793495
## factor(naziv_Opcine)Bratunac 1.90533 1.57294 1.211 0.225844
## factor(naziv_Opcine)Brcko 2.09090 0.89046 2.348 0.018917 *
## factor(naziv_Opcine)Breza -0.72151 1.48524 -0.486 0.627144
## factor(naziv_Opcine)Brod 0.70003 1.26576 0.553 0.580259
## factor(naziv_Opcine)Bugojno 0.55063 1.02985 0.535 0.592908
## factor(naziv_Opcine)Busovaca 2.89431 1.21910 2.374 0.017637 *
## factor(naziv_Opcine)Buzim 0.99868 1.57186 0.635 0.525237
## factor(naziv_Opcine)C.Sarajevo 0.94000 1.03912 0.905 0.365724
## factor(naziv_Opcine)Capljina 3.21520 1.27482 2.522 0.011705 *
## factor(naziv_Opcine)Cazin 1.26399 1.02049 1.239 0.215564
## factor(naziv_Opcine)Celic 0.56372 1.57193 0.359 0.719902
## factor(naziv_Opcine)Celinac 2.09277 1.57208 1.331 0.183196
## factor(naziv_Opcine)Citluk 3.35579 1.25245 2.679 0.007406 **
## factor(naziv_Opcine)D.Vakuf 1.53243 1.13557 1.349 0.177260
## factor(naziv_Opcine)Derventa 1.12852 1.17991 0.956 0.338907
## factor(naziv_Opcine)Doboj 1.57723 1.03434 1.525 0.127372
## factor(naziv_Opcine)Doboj-Istok 3.07496 1.52320 2.019 0.043581 *
## factor(naziv_Opcine)Drvar -0.39563 1.48636 -0.266 0.790116
## factor(naziv_Opcine)Foca - RS 1.59488 1.28120 1.245 0.213267
## factor(naziv_Opcine)Fojnica 2.76712 1.38836 1.993 0.046320 *
## factor(naziv_Opcine)G.Vakuf 2.10405 1.21895 1.726 0.084404 .
## factor(naziv_Opcine)Gacko -0.06639 1.31504 -0.050 0.959739
## factor(naziv_Opcine)Glamoc -1.29228 1.63416 -0.791 0.429112
## factor(naziv_Opcine)Gorazde 0.21132 1.15769 0.183 0.855169
## factor(naziv_Opcine)Gracanica 2.23805 0.98235 2.278 0.022763 *
## factor(naziv_Opcine)Grad Mostar 2.43045 0.91270 2.663 0.007778 **
## factor(naziv_Opcine)Gradacac 2.39006 1.12538 2.124 0.033750 *
## factor(naziv_Opcine)Gradiska 2.84324 1.16868 2.433 0.015024 *
## factor(naziv_Opcine)Grude 2.41300 1.29658 1.861 0.062812 .
## factor(naziv_Opcine)I.Ilidza -0.82911 1.48838 -0.557 0.577521
## factor(naziv_Opcine)Ilidza 1.56412 1.05380 1.484 0.137816
## factor(naziv_Opcine)Ilijas 0.03547 1.41549 0.025 0.980007
## factor(naziv_Opcine)Jajce 1.22843 1.28182 0.958 0.337947
## factor(naziv_Opcine)K.Dubica 2.08218 1.11134 1.874 0.061061 .
## factor(naziv_Opcine)Kakanj 0.71241 0.99086 0.719 0.472199
## factor(naziv_Opcine)Kalesija 2.32582 1.18948 1.955 0.050614 .
## factor(naziv_Opcine)Kiseljak 2.77048 1.11922 2.475 0.013352 *
## factor(naziv_Opcine)Kladanj 1.93213 1.48423 1.302 0.193068
## factor(naziv_Opcine)Kljuc 0.64149 1.28081 0.501 0.616507
## factor(naziv_Opcine)Knezevo 1.26667 1.44875 0.874 0.381997
## factor(naziv_Opcine)Konjic 0.50395 1.06235 0.474 0.635262
## factor(naziv_Opcine)Kotor Varos 1.47418 1.38614 1.064 0.287612
## factor(naziv_Opcine)Kresevo 2.26622 1.42152 1.594 0.110965
## factor(naziv_Opcine)Laktasi 2.58196 1.08264 2.385 0.017131 *
## factor(naziv_Opcine)Livno 0.56763 1.26117 0.450 0.652676
## factor(naziv_Opcine)Lopare 2.57380 1.19626 2.152 0.031494 *
## factor(naziv_Opcine)Lukavac 2.41960 1.07392 2.253 0.024310 *
## factor(naziv_Opcine)Ljubuski 3.59211 1.21052 2.967 0.003021 **
## factor(naziv_Opcine)Maglaj 0.56527 1.09427 0.517 0.605480
## factor(naziv_Opcine)Modrica 1.52800 1.13213 1.350 0.177198
## factor(naziv_Opcine)N.G.Sarajevo 1.57202 0.91758 1.713 0.086750 .
## factor(naziv_Opcine)N.Gorazde 3.82921 1.63059 2.348 0.018905 *
## factor(naziv_Opcine)N.Sarajevo 0.22491 1.05724 0.213 0.831547
## factor(naziv_Opcine)N.Travnik 0.67983 1.05545 0.644 0.519539
## factor(naziv_Opcine)Nevesinje 1.53252 1.57582 0.973 0.330847
## factor(naziv_Opcine)Novi Grad -0.64168 1.05731 -0.607 0.543950
## factor(naziv_Opcine)Orasje 2.72898 1.22388 2.230 0.025818 *
## factor(naziv_Opcine)Pale -0.80115 1.29781 -0.617 0.537069
## factor(naziv_Opcine)Posusje 2.40745 1.48251 1.624 0.104477
## factor(naziv_Opcine)Prijedor 1.90536 0.97813 1.948 0.051490 .
## factor(naziv_Opcine)Prnjavor 2.29383 1.11571 2.056 0.039853 *
## factor(naziv_Opcine)Prozor -0.03864 1.58369 -0.024 0.980534
## factor(naziv_Opcine)Ribnik 0.39560 1.45281 0.272 0.785408
## factor(naziv_Opcine)Rogatica -1.10354 1.44986 -0.761 0.446622
## factor(naziv_Opcine)Rudo 1.53235 1.38826 1.104 0.269747
## factor(naziv_Opcine)S.Brijeg 3.22493 1.11655 2.888 0.003894 **
## factor(naziv_Opcine)S.G.Sarajevo 1.74242 1.12149 1.554 0.120342
## factor(naziv_Opcine)Samac 1.52461 1.04701 1.456 0.145430
## factor(naziv_Opcine)Sanski Most 2.07755 0.98881 2.101 0.035699 *
## factor(naziv_Opcine)Sokolac -0.70060 1.57794 -0.444 0.657070
## factor(naziv_Opcine)Srbac 2.24423 1.31464 1.707 0.087881 .
## factor(naziv_Opcine)Srebrenik 0.24407 0.99914 0.244 0.807025
## factor(naziv_Opcine)Stolac 3.32623 1.57055 2.118 0.034248 *
## factor(naziv_Opcine)Tesanj 1.51531 1.02187 1.483 0.138184
## factor(naziv_Opcine)Teslic 0.91515 1.16837 0.783 0.433517
## factor(naziv_Opcine)Tomislavgrad 2.81714 1.32095 2.133 0.033014 *
## factor(naziv_Opcine)Travnik 2.29887 0.95426 2.409 0.016039 *
## factor(naziv_Opcine)Trebinje 0.53592 1.14399 0.468 0.639480
## factor(naziv_Opcine)Tuzla 1.53149 0.94530 1.620 0.105289
## factor(naziv_Opcine)Ugljevik 1.95838 1.35942 1.441 0.149776
## factor(naziv_Opcine)V.Kladusa 1.63152 1.05733 1.543 0.122897
## factor(naziv_Opcine)Visegrad -2.09040 1.52929 -1.367 0.171732
## factor(naziv_Opcine)Visoko 1.70953 1.04973 1.629 0.103489
## factor(naziv_Opcine)Vitez 1.55599 1.06663 1.459 0.144701
## factor(naziv_Opcine)Vlasenica 0.77552 1.38722 0.559 0.576160
## factor(naziv_Opcine)Vogosca 2.20608 1.29846 1.699 0.089397 .
## factor(naziv_Opcine)Zavidovici -0.33457 1.03497 -0.323 0.746509
## factor(naziv_Opcine)Zenica 0.17208 0.91577 0.188 0.850958
## factor(naziv_Opcine)Zepce 1.38398 1.63711 0.845 0.397952
## factor(naziv_Opcine)Zivinice 2.68300 0.98200 2.732 0.006320 **
## factor(naziv_Opcine)Zvornik 1.34845 1.03521 1.303 0.192792
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.39 on 3980 degrees of freedom
## Multiple R-squared: 0.155, Adjusted R-squared: 0.1306
## F-statistic: 6.347 on 115 and 3980 DF, p-value: < 2.2e-16
#ovaj ima 35 sign munici ali 15.5 r2 for 90
#model kao gornji samo sa novim Activiom
p2.n.a <- lm (log(mj.trans.AM + 0.0001) ~ factor (Sex_1)+ factor(Educ.1) + factor (Activ.1a) + n.employ + factor (ncomp1) +factor (naziv_Opcine), data = hbs.transport.drop.1)
summary(p2.n.a)
##
## Call:
## lm(formula = log(mj.trans.AM + 1e-04) ~ factor(Sex_1) + factor(Educ.1) +
## factor(Activ.1a) + n.employ + factor(ncomp1) + factor(naziv_Opcine),
## data = hbs.transport.drop.1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -13.9741 -0.3287 1.1239 2.4327 9.2209
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -3.43051 0.96881 -3.541 0.000403 ***
## factor(Sex_1)2 -0.74696 0.21363 -3.496 0.000477 ***
## factor(Educ.1)no elementary -0.19213 0.58466 -0.329 0.742458
## factor(Educ.1)elementary 0.19172 0.49137 0.390 0.696436
## factor(Educ.1)high schl 1.22468 0.48476 2.526 0.011564 *
## factor(Educ.1)college 1.83571 0.59702 3.075 0.002121 **
## factor(Educ.1)university 2.08840 0.53389 3.912 9.32e-05 ***
## factor(Activ.1a)0 0.13172 0.17512 0.752 0.451989
## n.employtwo 0.83265 0.16160 5.153 2.69e-07 ***
## n.employthree and more 1.20037 0.29034 4.134 3.63e-05 ***
## factor(ncomp1)two 1.93296 0.36048 5.362 8.69e-08 ***
## factor(ncomp1)three 2.97809 0.36049 8.261 < 2e-16 ***
## factor(ncomp1)four 3.79834 0.35714 10.635 < 2e-16 ***
## factor(ncomp1)five 3.81911 0.38649 9.882 < 2e-16 ***
## factor(ncomp1)six 4.09130 0.44444 9.205 < 2e-16 ***
## factor(ncomp1)seven 4.56090 0.60883 7.491 8.35e-14 ***
## factor(ncomp1)eight 2.00226 0.91070 2.199 0.027964 *
## factor(ncomp1)nine 4.97381 1.53459 3.241 0.001200 **
## factor(ncomp1)ten 6.63881 2.27448 2.919 0.003533 **
## factor(ncomp1)11+ 5.21348 2.03345 2.564 0.010388 *
## factor(naziv_Opcine)B.Petrovac -2.27519 1.57488 -1.445 0.148628
## factor(naziv_Opcine)Banovici 2.53807 1.25041 2.030 0.042445 *
## factor(naziv_Opcine)Banja Luka 1.77983 0.90154 1.974 0.048428 *
## factor(naziv_Opcine)Bihac 2.47424 0.99908 2.477 0.013309 *
## factor(naziv_Opcine)Bijeljina 0.15451 0.90980 0.170 0.865150
## factor(naziv_Opcine)Bratunac 1.98269 1.57479 1.259 0.208097
## factor(naziv_Opcine)Brcko 1.95296 0.89063 2.193 0.028380 *
## factor(naziv_Opcine)Breza -0.76234 1.48689 -0.513 0.608185
## factor(naziv_Opcine)Brod 0.70530 1.26714 0.557 0.577824
## factor(naziv_Opcine)Bugojno 0.31985 1.02906 0.311 0.755956
## factor(naziv_Opcine)Busovaca 2.83058 1.22032 2.320 0.020417 *
## factor(naziv_Opcine)Buzim 0.99781 1.57359 0.634 0.526052
## factor(naziv_Opcine)C.Sarajevo 0.71704 1.03961 0.690 0.490409
## factor(naziv_Opcine)Capljina 3.02718 1.27662 2.371 0.017775 *
## factor(naziv_Opcine)Cazin 1.23444 1.02161 1.208 0.226993
## factor(naziv_Opcine)Celic 0.54319 1.57367 0.345 0.729983
## factor(naziv_Opcine)Celinac 1.96813 1.57391 1.250 0.211200
## factor(naziv_Opcine)Citluk 3.20506 1.25376 2.556 0.010614 *
## factor(naziv_Opcine)D.Vakuf 1.26043 1.13513 1.110 0.266902
## factor(naziv_Opcine)Derventa 1.04469 1.18112 0.884 0.376484
## factor(naziv_Opcine)Doboj 1.43613 1.03533 1.387 0.165482
## factor(naziv_Opcine)Doboj-Istok 2.88028 1.52388 1.890 0.058817 .
## factor(naziv_Opcine)Drvar -0.58564 1.48783 -0.394 0.693883
## factor(naziv_Opcine)Foca - RS 1.39457 1.28280 1.087 0.277045
## factor(naziv_Opcine)Fojnica 2.57834 1.38917 1.856 0.063523 .
## factor(naziv_Opcine)G.Vakuf 1.88342 1.21846 1.546 0.122247
## factor(naziv_Opcine)Gacko -0.14221 1.31656 -0.108 0.913988
## factor(naziv_Opcine)Glamoc -1.57486 1.63359 -0.964 0.335080
## factor(naziv_Opcine)Gorazde 0.09105 1.15864 0.079 0.937367
## factor(naziv_Opcine)Gracanica 2.05881 0.98221 2.096 0.036137 *
## factor(naziv_Opcine)Grad Mostar 2.28037 0.91376 2.496 0.012615 *
## factor(naziv_Opcine)Gradacac 2.26610 1.12628 2.012 0.044284 *
## factor(naziv_Opcine)Gradiska 2.60066 1.17003 2.223 0.026290 *
## factor(naziv_Opcine)Grude 2.33006 1.29806 1.795 0.072724 .
## factor(naziv_Opcine)I.Ilidza -1.13374 1.48999 -0.761 0.446760
## factor(naziv_Opcine)Ilidza 1.36549 1.05446 1.295 0.195408
## factor(naziv_Opcine)Ilijas -0.03300 1.41699 -0.023 0.981420
## factor(naziv_Opcine)Jajce 1.06747 1.28270 0.832 0.405341
## factor(naziv_Opcine)K.Dubica 1.93921 1.11280 1.743 0.081474 .
## factor(naziv_Opcine)Kakanj 0.62987 0.99173 0.635 0.525389
## factor(naziv_Opcine)Kalesija 2.16879 1.18967 1.823 0.068375 .
## factor(naziv_Opcine)Kiseljak 2.57035 1.12034 2.294 0.021827 *
## factor(naziv_Opcine)Kladanj 1.83626 1.48555 1.236 0.216501
## factor(naziv_Opcine)Kljuc 0.52392 1.28193 0.409 0.682784
## factor(naziv_Opcine)Knezevo 1.16149 1.45035 0.801 0.423275
## factor(naziv_Opcine)Konjic 0.33362 1.06331 0.314 0.753723
## factor(naziv_Opcine)Kotor Varos 1.38065 1.38783 0.995 0.319881
## factor(naziv_Opcine)Kresevo 2.20951 1.42315 1.553 0.120609
## factor(naziv_Opcine)Laktasi 2.50001 1.08404 2.306 0.021151 *
## factor(naziv_Opcine)Livno 0.49416 1.26264 0.391 0.695542
## factor(naziv_Opcine)Lopare 2.26910 1.19372 1.901 0.057391 .
## factor(naziv_Opcine)Lukavac 2.32916 1.07485 2.167 0.030296 *
## factor(naziv_Opcine)Ljubuski 3.45017 1.21174 2.847 0.004432 **
## factor(naziv_Opcine)Maglaj 0.43579 1.09503 0.398 0.690671
## factor(naziv_Opcine)Modrica 1.31144 1.13184 1.159 0.246657
## factor(naziv_Opcine)N.G.Sarajevo 1.42332 0.91866 1.549 0.121378
## factor(naziv_Opcine)N.Gorazde 3.53327 1.63204 2.165 0.030451 *
## factor(naziv_Opcine)N.Sarajevo 0.07403 1.05840 0.070 0.944243
## factor(naziv_Opcine)N.Travnik 0.46843 1.05600 0.444 0.657363
## factor(naziv_Opcine)Nevesinje 1.17272 1.57798 0.743 0.457418
## factor(naziv_Opcine)Novi Grad -0.77029 1.05852 -0.728 0.466837
## factor(naziv_Opcine)Orasje 2.56594 1.22488 2.095 0.036248 *
## factor(naziv_Opcine)Pale -0.95122 1.29941 -0.732 0.464186
## factor(naziv_Opcine)Posusje 2.29952 1.48421 1.549 0.121384
## factor(naziv_Opcine)Prijedor 1.79413 0.97907 1.832 0.066955 .
## factor(naziv_Opcine)Prnjavor 2.20963 1.11714 1.978 0.048005 *
## factor(naziv_Opcine)Prozor -0.22655 1.58510 -0.143 0.886358
## factor(naziv_Opcine)Ribnik 0.12772 1.45436 0.088 0.930027
## factor(naziv_Opcine)Rogatica -1.16510 1.45145 -0.803 0.422188
## factor(naziv_Opcine)Rudo 1.40296 1.38989 1.009 0.312843
## factor(naziv_Opcine)S.Brijeg 3.00189 1.11807 2.685 0.007286 **
## factor(naziv_Opcine)S.G.Sarajevo 1.61903 1.12263 1.442 0.149332
## factor(naziv_Opcine)Samac 1.39356 1.04756 1.330 0.183500
## factor(naziv_Opcine)Sanski Most 2.01950 0.98999 2.040 0.041424 *
## factor(naziv_Opcine)Sokolac -0.94813 1.57976 -0.600 0.548423
## factor(naziv_Opcine)Srbac 2.20269 1.31616 1.674 0.094294 .
## factor(naziv_Opcine)Srebrenik 0.23781 1.00023 0.238 0.812079
## factor(naziv_Opcine)Stolac 3.05380 1.57264 1.942 0.052228 .
## factor(naziv_Opcine)Tesanj 1.44449 1.02287 1.412 0.157971
## factor(naziv_Opcine)Teslic 0.79516 1.16920 0.680 0.496487
## factor(naziv_Opcine)Tomislavgrad 2.74235 1.32245 2.074 0.038172 *
## factor(naziv_Opcine)Travnik 2.21531 0.95541 2.319 0.020462 *
## factor(naziv_Opcine)Trebinje 0.32935 1.14532 0.288 0.773698
## factor(naziv_Opcine)Tuzla 1.35837 0.94537 1.437 0.150833
## factor(naziv_Opcine)Ugljevik 1.78911 1.36064 1.315 0.188619
## factor(naziv_Opcine)V.Kladusa 1.60794 1.05846 1.519 0.128807
## factor(naziv_Opcine)Visegrad -2.25367 1.53106 -1.472 0.141110
## factor(naziv_Opcine)Visoko 1.52089 1.05004 1.448 0.147580
## factor(naziv_Opcine)Vitez 1.36405 1.06715 1.278 0.201249
## factor(naziv_Opcine)Vlasenica 0.77543 1.38875 0.558 0.576626
## factor(naziv_Opcine)Vogosca 2.00513 1.30017 1.542 0.123105
## factor(naziv_Opcine)Zavidovici -0.47978 1.03562 -0.463 0.643191
## factor(naziv_Opcine)Zenica 0.05368 0.91642 0.059 0.953294
## factor(naziv_Opcine)Zepce 1.19658 1.63861 0.730 0.465287
## factor(naziv_Opcine)Zivinice 2.57537 0.98267 2.621 0.008806 **
## factor(naziv_Opcine)Zvornik 1.23949 1.03642 1.196 0.231793
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.395 on 3980 degrees of freedom
## Multiple R-squared: 0.1531, Adjusted R-squared: 0.1287
## F-statistic: 6.258 on 115 and 3980 DF, p-value: < 2.2e-16
#ovaj ima ?? sign munic
#prethodni sa ncomp1 i normal Activ
p2.age <- lm (log(mj.trans.AM + 0.0001) ~ factor (Sex_1)+ factor(Educ.1) + factor (Activ.1) + n.employ + factor (ncomp1) + as.numeric(Age_1) + as.numeric(Age_1^2) +factor (naziv_Opcine), data = hbs.transport.drop.1)
summary(p2.age)
##
## Call:
## lm(formula = log(mj.trans.AM + 1e-04) ~ factor(Sex_1) + factor(Educ.1) +
## factor(Activ.1) + n.employ + factor(ncomp1) + as.numeric(Age_1) +
## as.numeric(Age_1^2) + factor(naziv_Opcine), data = hbs.transport.drop.1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -14.1005 -0.3838 1.1012 2.4210 9.0278
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -3.914e+00 1.369e+00 -2.859 0.004272 **
## factor(Sex_1)2 -6.325e-01 2.114e-01 -2.991 0.002794 **
## factor(Educ.1)no elementary -2.077e-01 5.874e-01 -0.354 0.723715
## factor(Educ.1)elementary 1.692e-01 5.160e-01 0.328 0.742990
## factor(Educ.1)high schl 1.129e+00 5.191e-01 2.175 0.029657 *
## factor(Educ.1)college 1.684e+00 6.196e-01 2.717 0.006609 **
## factor(Educ.1)university 1.896e+00 5.627e-01 3.369 0.000760 ***
## factor(Activ.1)0 -5.873e-01 1.750e-01 -3.355 0.000801 ***
## n.employtwo 7.217e-01 1.606e-01 4.493 7.23e-06 ***
## n.employthree and more 9.911e-01 2.918e-01 3.396 0.000690 ***
## factor(ncomp1)two 2.070e+00 3.587e-01 5.769 8.56e-09 ***
## factor(ncomp1)three 3.181e+00 3.561e-01 8.932 < 2e-16 ***
## factor(ncomp1)four 3.986e+00 3.530e-01 11.291 < 2e-16 ***
## factor(ncomp1)five 4.050e+00 3.812e-01 10.624 < 2e-16 ***
## factor(ncomp1)six 4.386e+00 4.377e-01 10.021 < 2e-16 ***
## factor(ncomp1)seven 4.846e+00 6.041e-01 8.023 1.35e-15 ***
## factor(ncomp1)eight 2.371e+00 9.058e-01 2.618 0.008886 **
## factor(ncomp1)nine 5.163e+00 1.532e+00 3.370 0.000758 ***
## factor(ncomp1)ten 7.047e+00 2.270e+00 3.105 0.001919 **
## factor(ncomp1)11+ 5.548e+00 2.030e+00 2.733 0.006306 **
## as.numeric(Age_1) 1.085e-02 4.020e-02 0.270 0.787338
## as.numeric(Age_1^2) 1.581e-06 3.867e-04 0.004 0.996739
## factor(naziv_Opcine)B.Petrovac -2.344e+00 1.574e+00 -1.489 0.136504
## factor(naziv_Opcine)Banovici 2.596e+00 1.250e+00 2.077 0.037878 *
## factor(naziv_Opcine)Banja Luka 1.935e+00 9.031e-01 2.143 0.032211 *
## factor(naziv_Opcine)Bihac 2.611e+00 9.993e-01 2.613 0.009017 **
## factor(naziv_Opcine)Bijeljina 1.876e-01 9.114e-01 0.206 0.836901
## factor(naziv_Opcine)Bratunac 1.870e+00 1.573e+00 1.189 0.234628
## factor(naziv_Opcine)Brcko 2.073e+00 8.918e-01 2.324 0.020150 *
## factor(naziv_Opcine)Breza -7.781e-01 1.486e+00 -0.524 0.600612
## factor(naziv_Opcine)Brod 6.669e-01 1.268e+00 0.526 0.598884
## factor(naziv_Opcine)Bugojno 5.489e-01 1.032e+00 0.532 0.594889
## factor(naziv_Opcine)Busovaca 2.886e+00 1.220e+00 2.367 0.017994 *
## factor(naziv_Opcine)Buzim 1.056e+00 1.572e+00 0.672 0.501838
## factor(naziv_Opcine)C.Sarajevo 8.749e-01 1.042e+00 0.840 0.401114
## factor(naziv_Opcine)Capljina 3.200e+00 1.275e+00 2.510 0.012125 *
## factor(naziv_Opcine)Cazin 1.267e+00 1.020e+00 1.242 0.214383
## factor(naziv_Opcine)Celic 5.163e-01 1.574e+00 0.328 0.742931
## factor(naziv_Opcine)Celinac 2.036e+00 1.573e+00 1.294 0.195792
## factor(naziv_Opcine)Citluk 3.323e+00 1.254e+00 2.650 0.008090 **
## factor(naziv_Opcine)D.Vakuf 1.551e+00 1.136e+00 1.365 0.172424
## factor(naziv_Opcine)Derventa 1.037e+00 1.186e+00 0.874 0.381949
## factor(naziv_Opcine)Doboj 1.559e+00 1.035e+00 1.506 0.132169
## factor(naziv_Opcine)Doboj-Istok 3.070e+00 1.524e+00 2.015 0.043975 *
## factor(naziv_Opcine)Drvar -4.826e-01 1.488e+00 -0.324 0.745761
## factor(naziv_Opcine)Foca - RS 1.560e+00 1.282e+00 1.217 0.223808
## factor(naziv_Opcine)Fojnica 2.785e+00 1.389e+00 2.005 0.045033 *
## factor(naziv_Opcine)G.Vakuf 2.099e+00 1.220e+00 1.720 0.085497 .
## factor(naziv_Opcine)Gacko -1.748e-01 1.319e+00 -0.133 0.894556
## factor(naziv_Opcine)Glamoc -1.316e+00 1.635e+00 -0.805 0.420812
## factor(naziv_Opcine)Gorazde 2.314e-01 1.159e+00 0.200 0.841833
## factor(naziv_Opcine)Gracanica 2.225e+00 9.833e-01 2.262 0.023728 *
## factor(naziv_Opcine)Grad Mostar 2.371e+00 9.162e-01 2.588 0.009689 **
## factor(naziv_Opcine)Gradacac 2.394e+00 1.126e+00 2.125 0.033625 *
## factor(naziv_Opcine)Gradiska 2.786e+00 1.170e+00 2.380 0.017343 *
## factor(naziv_Opcine)Grude 2.390e+00 1.298e+00 1.841 0.065646 .
## factor(naziv_Opcine)I.Ilidza -8.936e-01 1.489e+00 -0.600 0.548522
## factor(naziv_Opcine)Ilidza 1.534e+00 1.055e+00 1.454 0.146097
## factor(naziv_Opcine)Ilijas 4.252e-02 1.417e+00 0.030 0.976053
## factor(naziv_Opcine)Jajce 1.230e+00 1.282e+00 0.959 0.337408
## factor(naziv_Opcine)K.Dubica 2.031e+00 1.113e+00 1.824 0.068259 .
## factor(naziv_Opcine)Kakanj 6.998e-01 9.918e-01 0.706 0.480449
## factor(naziv_Opcine)Kalesija 2.356e+00 1.190e+00 1.980 0.047776 *
## factor(naziv_Opcine)Kiseljak 2.732e+00 1.121e+00 2.438 0.014818 *
## factor(naziv_Opcine)Kladanj 1.917e+00 1.485e+00 1.291 0.196831
## factor(naziv_Opcine)Kljuc 6.401e-01 1.281e+00 0.500 0.617421
## factor(naziv_Opcine)Knezevo 1.212e+00 1.450e+00 0.836 0.403003
## factor(naziv_Opcine)Konjic 4.788e-01 1.064e+00 0.450 0.652753
## factor(naziv_Opcine)Kotor Varos 1.447e+00 1.387e+00 1.044 0.296616
## factor(naziv_Opcine)Kresevo 2.247e+00 1.423e+00 1.579 0.114411
## factor(naziv_Opcine)Laktasi 2.487e+00 1.086e+00 2.289 0.022107 *
## factor(naziv_Opcine)Livno 4.979e-01 1.262e+00 0.394 0.693321
## factor(naziv_Opcine)Lopare 2.564e+00 1.198e+00 2.141 0.032346 *
## factor(naziv_Opcine)Lukavac 2.401e+00 1.075e+00 2.234 0.025526 *
## factor(naziv_Opcine)Ljubuski 3.489e+00 1.216e+00 2.870 0.004126 **
## factor(naziv_Opcine)Maglaj 5.644e-01 1.095e+00 0.516 0.606144
## factor(naziv_Opcine)Modrica 1.494e+00 1.133e+00 1.319 0.187298
## factor(naziv_Opcine)N.G.Sarajevo 1.549e+00 9.201e-01 1.683 0.092454 .
## factor(naziv_Opcine)N.Gorazde 3.871e+00 1.632e+00 2.372 0.017745 *
## factor(naziv_Opcine)N.Sarajevo 1.508e-01 1.061e+00 0.142 0.886947
## factor(naziv_Opcine)N.Travnik 6.609e-01 1.056e+00 0.626 0.531602
## factor(naziv_Opcine)Nevesinje 1.429e+00 1.579e+00 0.905 0.365457
## factor(naziv_Opcine)Novi Grad -6.498e-01 1.062e+00 -0.612 0.540733
## factor(naziv_Opcine)Orasje 2.717e+00 1.225e+00 2.217 0.026646 *
## factor(naziv_Opcine)Pale -8.604e-01 1.301e+00 -0.661 0.508429
## factor(naziv_Opcine)Posusje 2.372e+00 1.484e+00 1.599 0.109971
## factor(naziv_Opcine)Prijedor 1.912e+00 9.803e-01 1.950 0.051228 .
## factor(naziv_Opcine)Prnjavor 2.272e+00 1.117e+00 2.034 0.041977 *
## factor(naziv_Opcine)Prozor -4.895e-02 1.584e+00 -0.031 0.975356
## factor(naziv_Opcine)Ribnik 3.158e-01 1.455e+00 0.217 0.828170
## factor(naziv_Opcine)Rogatica -1.133e+00 1.451e+00 -0.781 0.434927
## factor(naziv_Opcine)Rudo 1.474e+00 1.390e+00 1.060 0.288993
## factor(naziv_Opcine)S.Brijeg 3.147e+00 1.120e+00 2.810 0.004985 **
## factor(naziv_Opcine)S.G.Sarajevo 1.708e+00 1.123e+00 1.521 0.128354
## factor(naziv_Opcine)Samac 1.459e+00 1.049e+00 1.391 0.164330
## factor(naziv_Opcine)Sanski Most 2.026e+00 9.906e-01 2.046 0.040861 *
## factor(naziv_Opcine)Sokolac -7.666e-01 1.579e+00 -0.485 0.627427
## factor(naziv_Opcine)Srbac 2.184e+00 1.318e+00 1.658 0.097463 .
## factor(naziv_Opcine)Srebrenik 2.289e-01 1.001e+00 0.229 0.819035
## factor(naziv_Opcine)Stolac 3.215e+00 1.574e+00 2.042 0.041191 *
## factor(naziv_Opcine)Tesanj 1.502e+00 1.023e+00 1.469 0.141986
## factor(naziv_Opcine)Teslic 9.110e-01 1.169e+00 0.779 0.435913
## factor(naziv_Opcine)Tomislavgrad 2.769e+00 1.322e+00 2.095 0.036269 *
## factor(naziv_Opcine)Travnik 2.267e+00 9.556e-01 2.373 0.017703 *
## factor(naziv_Opcine)Trebinje 4.759e-01 1.145e+00 0.415 0.677812
## factor(naziv_Opcine)Tuzla 1.524e+00 9.470e-01 1.609 0.107690
## factor(naziv_Opcine)Ugljevik 1.932e+00 1.360e+00 1.421 0.155449
## factor(naziv_Opcine)V.Kladusa 1.659e+00 1.059e+00 1.567 0.117089
## factor(naziv_Opcine)Visegrad -2.114e+00 1.531e+00 -1.381 0.167355
## factor(naziv_Opcine)Visoko 1.682e+00 1.051e+00 1.600 0.109587
## factor(naziv_Opcine)Vitez 1.552e+00 1.069e+00 1.452 0.146639
## factor(naziv_Opcine)Vlasenica 7.642e-01 1.388e+00 0.550 0.582045
## factor(naziv_Opcine)Vogosca 2.158e+00 1.299e+00 1.661 0.096818 .
## factor(naziv_Opcine)Zavidovici -3.532e-01 1.037e+00 -0.341 0.733312
## factor(naziv_Opcine)Zenica 1.411e-01 9.172e-01 0.154 0.877708
## factor(naziv_Opcine)Zepce 1.391e+00 1.638e+00 0.849 0.395694
## factor(naziv_Opcine)Zivinice 2.680e+00 9.830e-01 2.727 0.006427 **
## factor(naziv_Opcine)Zvornik 1.303e+00 1.036e+00 1.257 0.208848
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.39 on 3978 degrees of freedom
## Multiple R-squared: 0.1555, Adjusted R-squared: 0.1306
## F-statistic: 6.259 on 117 and 3978 DF, p-value: < 2.2e-16
#ovaj ima 35 sign munici ali 15.5 r2 for 90
Mail od Ismira 5.8: uzeti ovaj p2.age jer uzima i godine i treba ih ukljuciti.
NE uzimam nista od drugog clana, iako godine drugog clana su znacajne ali mi nekako se cini da nije dobro miksati prvog i drugog.. a mozda i je mogu provjeriti sa Ismirom.
table (hbs.transport.drop.1$Educ_1)
##
## 1 2 3 4 5 6 7 8 9 10
## 103 160 3 744 2496 35 157 359 28 11
prop.table(table(hbs.transport.drop.1$Educ_1)) #5 is the most dominant
##
## 1 2 3 4 5 6
## 0.0251464844 0.0390625000 0.0007324219 0.1816406250 0.6093750000 0.0085449219
## 7 8 9 10
## 0.0383300781 0.0876464844 0.0068359375 0.0026855469
#prethodni ali bez Educ.1 nego originalnom Educ varijablom varijablom
p2a <- lm (log(mj.trans.AM + 0.0001) ~ factor (Sex_1)+ factor(Educ_1) + factor (Activ.1) + n.employ + factor (ncomp) +factor (naziv_Opcine), data = hbs.transport.drop.1)
summary(p2a)
##
## Call:
## lm(formula = log(mj.trans.AM + 1e-04) ~ factor(Sex_1) + factor(Educ_1) +
## factor(Activ.1) + n.employ + factor(ncomp) + factor(naziv_Opcine),
## data = hbs.transport.drop.1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -13.9488 -0.3813 1.1176 2.4105 9.0530
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -3.26449 0.96907 -3.369 0.000763 ***
## factor(Sex_1)2 -0.62868 0.21153 -2.972 0.002975 **
## factor(Educ_1)2 -0.23390 0.58620 -0.399 0.689911
## factor(Educ_1)3 -0.07739 2.62747 -0.029 0.976504
## factor(Educ_1)4 0.03563 0.49059 0.073 0.942108
## factor(Educ_1)5 0.94967 0.48501 1.958 0.050296 .
## factor(Educ_1)6 1.91648 0.89198 2.149 0.031728 *
## factor(Educ_1)7 1.55526 0.59782 2.602 0.009314 **
## factor(Educ_1)8 1.66024 0.53971 3.076 0.002111 **
## factor(Educ_1)9 2.46068 0.97109 2.534 0.011317 *
## factor(Educ_1)10 1.99725 1.43035 1.396 0.162690
## factor(Activ.1)0 -0.48444 0.16063 -3.016 0.002578 **
## n.employtwo 0.73453 0.16036 4.580 4.78e-06 ***
## n.employthree and more 1.03347 0.28877 3.579 0.000349 ***
## factor(ncomp)2 2.10125 0.35790 5.871 4.69e-09 ***
## factor(ncomp)3 3.19017 0.35606 8.960 < 2e-16 ***
## factor(ncomp)4 3.96102 0.35319 11.215 < 2e-16 ***
## factor(ncomp)5 4.04122 0.38130 10.598 < 2e-16 ***
## factor(ncomp)6 4.38621 0.43798 10.015 < 2e-16 ***
## factor(ncomp)7 4.86912 0.60413 8.060 1.00e-15 ***
## factor(ncomp)8 2.39099 0.90584 2.640 0.008335 **
## factor(ncomp)9 5.24018 1.53160 3.421 0.000629 ***
## factor(ncomp)10 7.13420 2.26925 3.144 0.001680 **
## factor(ncomp)11 6.17763 2.26351 2.729 0.006376 **
## factor(ncomp)13 2.79050 4.44340 0.628 0.530033
## factor(naziv_Opcine)B.Petrovac -2.28692 1.57355 -1.453 0.146205
## factor(naziv_Opcine)Banovici 2.56869 1.25009 2.055 0.039964 *
## factor(naziv_Opcine)Banja Luka 1.94149 0.90097 2.155 0.031231 *
## factor(naziv_Opcine)Bihac 2.59962 0.99874 2.603 0.009278 **
## factor(naziv_Opcine)Bijeljina 0.23021 0.90919 0.253 0.800124
## factor(naziv_Opcine)Bratunac 1.90489 1.57335 1.211 0.226073
## factor(naziv_Opcine)Brcko 2.08363 0.89074 2.339 0.019374 *
## factor(naziv_Opcine)Breza -0.71491 1.48563 -0.481 0.630391
## factor(naziv_Opcine)Brod 0.70490 1.26613 0.557 0.577740
## factor(naziv_Opcine)Bugojno 0.55597 1.03013 0.540 0.589430
## factor(naziv_Opcine)Busovaca 2.90108 1.21942 2.379 0.017404 *
## factor(naziv_Opcine)Buzim 0.99276 1.57226 0.631 0.527798
## factor(naziv_Opcine)C.Sarajevo 0.91428 1.04148 0.878 0.380068
## factor(naziv_Opcine)Capljina 3.21952 1.27515 2.525 0.011614 *
## factor(naziv_Opcine)Cazin 1.26279 1.02075 1.237 0.216116
## factor(naziv_Opcine)Celic 0.57418 1.57236 0.365 0.715004
## factor(naziv_Opcine)Celinac 2.09445 1.57250 1.332 0.182961
## factor(naziv_Opcine)Citluk 3.35820 1.25277 2.681 0.007379 **
## factor(naziv_Opcine)D.Vakuf 1.53762 1.13588 1.354 0.175912
## factor(naziv_Opcine)Derventa 1.12502 1.18255 0.951 0.341487
## factor(naziv_Opcine)Doboj 1.56934 1.03466 1.517 0.129406
## factor(naziv_Opcine)Doboj-Istok 3.07755 1.52360 2.020 0.043459 *
## factor(naziv_Opcine)Drvar -0.39492 1.48677 -0.266 0.790545
## factor(naziv_Opcine)Foca - RS 1.61267 1.28165 1.258 0.208365
## factor(naziv_Opcine)Fojnica 2.76676 1.38872 1.992 0.046406 *
## factor(naziv_Opcine)G.Vakuf 2.10675 1.21928 1.728 0.084090 .
## factor(naziv_Opcine)Gacko -0.06748 1.31539 -0.051 0.959090
## factor(naziv_Opcine)Glamoc -1.29791 1.63458 -0.794 0.427227
## factor(naziv_Opcine)Gorazde 0.21961 1.15800 0.190 0.849598
## factor(naziv_Opcine)Gracanica 2.23762 0.98279 2.277 0.022850 *
## factor(naziv_Opcine)Grad Mostar 2.41805 0.91307 2.648 0.008123 **
## factor(naziv_Opcine)Gradacac 2.36652 1.12585 2.102 0.035617 *
## factor(naziv_Opcine)Gradiska 2.84354 1.16902 2.432 0.015042 *
## factor(naziv_Opcine)Grude 2.42002 1.29692 1.866 0.062119 .
## factor(naziv_Opcine)I.Ilidza -0.84378 1.50159 -0.562 0.574199
## factor(naziv_Opcine)Ilidza 1.56699 1.05408 1.487 0.137199
## factor(naziv_Opcine)Ilijas 0.03643 1.41584 0.026 0.979477
## factor(naziv_Opcine)Jajce 1.23278 1.28219 0.961 0.336376
## factor(naziv_Opcine)K.Dubica 2.05777 1.11173 1.851 0.064248 .
## factor(naziv_Opcine)Kakanj 0.70459 0.99114 0.711 0.477197
## factor(naziv_Opcine)Kalesija 2.33052 1.18981 1.959 0.050214 .
## factor(naziv_Opcine)Kiseljak 2.77536 1.11953 2.479 0.013215 *
## factor(naziv_Opcine)Kladanj 1.94131 1.48462 1.308 0.191080
## factor(naziv_Opcine)Kljuc 0.64668 1.28114 0.505 0.613747
## factor(naziv_Opcine)Knezevo 1.27780 1.44914 0.882 0.377957
## factor(naziv_Opcine)Konjic 0.50735 1.06265 0.477 0.633076
## factor(naziv_Opcine)Kotor Varos 1.47499 1.38650 1.064 0.287473
## factor(naziv_Opcine)Kresevo 2.27090 1.42191 1.597 0.110327
## factor(naziv_Opcine)Laktasi 2.58241 1.08292 2.385 0.017141 *
## factor(naziv_Opcine)Livno 0.52435 1.26188 0.416 0.677774
## factor(naziv_Opcine)Lopare 2.57729 1.19657 2.154 0.031308 *
## factor(naziv_Opcine)Lukavac 2.37875 1.07458 2.214 0.026909 *
## factor(naziv_Opcine)Ljubuski 3.59470 1.21085 2.969 0.003008 **
## factor(naziv_Opcine)Maglaj 0.50332 1.09525 0.460 0.645864
## factor(naziv_Opcine)Modrica 1.52770 1.13242 1.349 0.177396
## factor(naziv_Opcine)N.G.Sarajevo 1.55973 0.91787 1.699 0.089345 .
## factor(naziv_Opcine)N.Gorazde 3.83317 1.63101 2.350 0.018813 *
## factor(naziv_Opcine)N.Sarajevo 0.19854 1.05784 0.188 0.851130
## factor(naziv_Opcine)N.Travnik 0.66538 1.05595 0.630 0.528648
## factor(naziv_Opcine)Nevesinje 1.52963 1.57623 0.970 0.331889
## factor(naziv_Opcine)Novi Grad -0.65036 1.05766 -0.615 0.538654
## factor(naziv_Opcine)Orasje 2.70218 1.22467 2.206 0.027409 *
## factor(naziv_Opcine)Pale -0.79756 1.29815 -0.614 0.538999
## factor(naziv_Opcine)Posusje 2.41233 1.48289 1.627 0.103864
## factor(naziv_Opcine)Prijedor 1.86211 0.97894 1.902 0.057220 .
## factor(naziv_Opcine)Prnjavor 2.29731 1.11601 2.058 0.039608 *
## factor(naziv_Opcine)Prozor -0.09894 1.58680 -0.062 0.950288
## factor(naziv_Opcine)Ribnik 0.32927 1.45405 0.226 0.820864
## factor(naziv_Opcine)Rogatica -1.08869 1.45030 -0.751 0.452898
## factor(naziv_Opcine)Rudo 1.53472 1.38861 1.105 0.269132
## factor(naziv_Opcine)S.Brijeg 3.22036 1.11751 2.882 0.003976 **
## factor(naziv_Opcine)S.G.Sarajevo 1.75857 1.12185 1.568 0.117062
## factor(naziv_Opcine)Samac 1.53280 1.04730 1.464 0.143391
## factor(naziv_Opcine)Sanski Most 2.11520 0.99052 2.135 0.032786 *
## factor(naziv_Opcine)Sokolac -0.69157 1.57840 -0.438 0.661304
## factor(naziv_Opcine)Srbac 2.24308 1.31500 1.706 0.088129 .
## factor(naziv_Opcine)Srebrenik 0.24509 0.99941 0.245 0.806288
## factor(naziv_Opcine)Stolac 3.32793 1.57095 2.118 0.034202 *
## factor(naziv_Opcine)Tesanj 1.50305 1.02216 1.470 0.141517
## factor(naziv_Opcine)Teslic 0.91615 1.16870 0.784 0.433143
## factor(naziv_Opcine)Tomislavgrad 2.81643 1.32130 2.132 0.033104 *
## factor(naziv_Opcine)Travnik 2.28000 0.95459 2.388 0.016966 *
## factor(naziv_Opcine)Trebinje 0.50345 1.14509 0.440 0.660210
## factor(naziv_Opcine)Tuzla 1.52783 0.94555 1.616 0.106214
## factor(naziv_Opcine)Ugljevik 1.91313 1.36077 1.406 0.159825
## factor(naziv_Opcine)V.Kladusa 1.61441 1.05774 1.526 0.127020
## factor(naziv_Opcine)Visegrad -2.07245 1.52980 -1.355 0.175582
## factor(naziv_Opcine)Visoko 1.65442 1.05077 1.574 0.115454
## factor(naziv_Opcine)Vitez 1.53947 1.06697 1.443 0.149143
## factor(naziv_Opcine)Vlasenica 0.78132 1.38758 0.563 0.573410
## factor(naziv_Opcine)Vogosca 2.21756 1.29882 1.707 0.087832 .
## factor(naziv_Opcine)Zavidovici -0.32717 1.03525 -0.316 0.751999
## factor(naziv_Opcine)Zenica 0.15362 0.91619 0.168 0.866850
## factor(naziv_Opcine)Zepce 1.38459 1.63754 0.846 0.397867
## factor(naziv_Opcine)Zivinice 2.68557 0.98229 2.734 0.006285 **
## factor(naziv_Opcine)Zvornik 1.32208 1.03584 1.276 0.201913
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.392 on 3975 degrees of freedom
## Multiple R-squared: 0.1556, Adjusted R-squared: 0.1301
## F-statistic: 6.105 on 120 and 3975 DF, p-value: < 2.2e-16
#ovaj ima 33 sign munici ali 16.5 r2 (povecao se za 1%)for 90 . ali active_1 je skoro ne signifikanta.
#Kada stavim active.1 ali Edu_1 onda imam 35 signif
Iako p2a ima isto 35 sing. opstina lakske je prikayivati manje nivoa obrz. i cl.domacinstaa
#buduci da nam je cilj imati sign at munic level uzecu ovaj modeli probati staviti Age_2 umjesto Age_1 jer u prethodnom Age_1 nije sign a oba ne mogu radi visoke korelacije
p3a <- lm (log(mj.trans.AM + 0.0001) ~ factor(Sex_1) + factor(Educ.1) + as.numeric(Age_2) + as.numeric(Age_2^2)+ n.employ + factor (ncomp)+factor (naziv_Opcine), data = hbs.transport.drop.1)
summary(p3a)
##
## Call:
## lm(formula = log(mj.trans.AM + 1e-04) ~ factor(Sex_1) + factor(Educ.1) +
## as.numeric(Age_2) + as.numeric(Age_2^2) + n.employ + factor(ncomp) +
## factor(naziv_Opcine), data = hbs.transport.drop.1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -13.8438 -0.2461 1.0862 2.3226 7.9407
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2.8949252 1.1461989 -2.526 0.01159 *
## factor(Sex_1)2 -0.3850604 0.2388707 -1.612 0.10704
## factor(Educ.1)no elementary -0.2266177 0.5829572 -0.389 0.69749
## factor(Educ.1)elementary 0.0130202 0.4903507 0.027 0.97882
## factor(Educ.1)high schl 0.9904584 0.4849362 2.042 0.04118 *
## factor(Educ.1)college 1.7181421 0.5961190 2.882 0.00397 **
## factor(Educ.1)university 1.7307445 0.5352053 3.234 0.00123 **
## as.numeric(Age_2) 0.0695676 0.0302243 2.302 0.02141 *
## as.numeric(Age_2^2) -0.0007160 0.0003199 -2.239 0.02525 *
## n.employtwo 0.7936345 0.1548851 5.124 3.14e-07 ***
## n.employthree and more 1.1115411 0.2803901 3.964 7.50e-05 ***
## factor(ncomp)3 1.0405664 0.2210909 4.707 2.61e-06 ***
## factor(ncomp)4 1.8598287 0.2210995 8.412 < 2e-16 ***
## factor(ncomp)5 1.8398956 0.2593247 7.095 1.54e-12 ***
## factor(ncomp)6 2.1513364 0.3253860 6.612 4.34e-11 ***
## factor(ncomp)7 2.6352048 0.5203427 5.064 4.29e-07 ***
## factor(ncomp)8 0.0240078 0.8340099 0.029 0.97704
## factor(ncomp)9 3.2442595 1.4653253 2.214 0.02689 *
## factor(ncomp)10 4.7279630 2.1928718 2.156 0.03114 *
## factor(ncomp)11 3.9362517 2.1815362 1.804 0.07126 .
## factor(ncomp)13 0.5549946 4.3086509 0.129 0.89752
## factor(naziv_Opcine)B.Petrovac -1.7105936 1.5819671 -1.081 0.27963
## factor(naziv_Opcine)Banovici 2.5924276 1.2141579 2.135 0.03281 *
## factor(naziv_Opcine)Banja Luka 1.8944713 0.8770323 2.160 0.03083 *
## factor(naziv_Opcine)Bihac 2.3003185 0.9763761 2.356 0.01853 *
## factor(naziv_Opcine)Bijeljina 0.2360035 0.8912295 0.265 0.79117
## factor(naziv_Opcine)Bratunac 1.5785358 1.5819065 0.998 0.31841
## factor(naziv_Opcine)Brcko 2.0205638 0.8669013 2.331 0.01982 *
## factor(naziv_Opcine)Breza -0.7569981 1.4441347 -0.524 0.60018
## factor(naziv_Opcine)Brod 0.6949063 1.2627089 0.550 0.58213
## factor(naziv_Opcine)Bugojno 0.4062865 0.9988535 0.407 0.68421
## factor(naziv_Opcine)Busovaca 2.6694659 1.1977414 2.229 0.02589 *
## factor(naziv_Opcine)Buzim 0.8113524 1.5278013 0.531 0.59541
## factor(naziv_Opcine)C.Sarajevo 0.5010553 1.0198559 0.491 0.62324
## factor(naziv_Opcine)Capljina 2.8380657 1.2552373 2.261 0.02382 *
## factor(naziv_Opcine)Cazin 1.3232575 0.9946325 1.330 0.18347
## factor(naziv_Opcine)Celic 0.7283592 1.5290806 0.476 0.63386
## factor(naziv_Opcine)Celinac 1.9425761 1.5283279 1.271 0.20379
## factor(naziv_Opcine)Citluk 3.2778870 1.2171230 2.693 0.00711 **
## factor(naziv_Opcine)D.Vakuf 1.3095698 1.1015228 1.189 0.23456
## factor(naziv_Opcine)Derventa 1.6881207 1.1887682 1.420 0.15567
## factor(naziv_Opcine)Doboj 1.7964141 1.0212263 1.759 0.07865 .
## factor(naziv_Opcine)Doboj-Istok 2.8751872 1.4794336 1.943 0.05204 .
## factor(naziv_Opcine)Drvar -0.1238706 1.4847634 -0.083 0.93352
## factor(naziv_Opcine)Foca - RS 1.3621582 1.2630275 1.078 0.28089
## factor(naziv_Opcine)Fojnica 2.6832090 1.3484875 1.990 0.04669 *
## factor(naziv_Opcine)G.Vakuf 1.9374737 1.1829081 1.638 0.10153
## factor(naziv_Opcine)Gacko 0.0175437 1.3229273 0.013 0.98942
## factor(naziv_Opcine)Glamoc -1.5570567 1.8180163 -0.856 0.39180
## factor(naziv_Opcine)Gorazde 0.2035339 1.1251270 0.181 0.85646
## factor(naziv_Opcine)Gracanica 2.2081584 0.9554505 2.311 0.02088 *
## factor(naziv_Opcine)Grad Mostar 2.2778069 0.8902949 2.558 0.01055 *
## factor(naziv_Opcine)Gradacac 2.4731446 1.1313276 2.186 0.02887 *
## factor(naziv_Opcine)Gradiska 2.6843040 1.1352522 2.365 0.01810 *
## factor(naziv_Opcine)Grude 2.3957286 1.2602887 1.901 0.05739 .
## factor(naziv_Opcine)I.Ilidza -2.1185572 1.5852098 -1.336 0.18148
## factor(naziv_Opcine)Ilidza 1.3950613 1.0237534 1.363 0.17306
## factor(naziv_Opcine)Ilijas 0.8901464 1.4411763 0.618 0.53684
## factor(naziv_Opcine)Jajce 1.9166668 1.2814551 1.496 0.13482
## factor(naziv_Opcine)K.Dubica 1.9731122 1.0802665 1.827 0.06785 .
## factor(naziv_Opcine)Kakanj 0.6909932 0.9666756 0.715 0.47477
## factor(naziv_Opcine)Kalesija 2.0609644 1.1658593 1.768 0.07718 .
## factor(naziv_Opcine)Kiseljak 2.3726000 1.1008201 2.155 0.03120 *
## factor(naziv_Opcine)Kladanj 1.9802907 1.4426805 1.373 0.16994
## factor(naziv_Opcine)Kljuc 0.5275861 1.2450517 0.424 0.67178
## factor(naziv_Opcine)Knezevo 1.2303898 1.4080116 0.874 0.38226
## factor(naziv_Opcine)Konjic 0.2344670 1.0360967 0.226 0.82098
## factor(naziv_Opcine)Kotor Varos 1.4416233 1.3471845 1.070 0.28464
## factor(naziv_Opcine)Kresevo 1.9999575 1.4132306 1.415 0.15710
## factor(naziv_Opcine)Laktasi 2.6574796 1.0625918 2.501 0.01243 *
## factor(naziv_Opcine)Livno 0.5613213 1.2271732 0.457 0.64740
## factor(naziv_Opcine)Lopare 2.3556366 1.1821475 1.993 0.04637 *
## factor(naziv_Opcine)Lukavac 2.1752648 1.0488157 2.074 0.03815 *
## factor(naziv_Opcine)Ljubuski 3.3676836 1.1896627 2.831 0.00467 **
## factor(naziv_Opcine)Maglaj 0.4740456 1.0633882 0.446 0.65578
## factor(naziv_Opcine)Modrica 1.4542176 1.1309640 1.286 0.19858
## factor(naziv_Opcine)N.G.Sarajevo 1.5739547 0.8961327 1.756 0.07910 .
## factor(naziv_Opcine)N.Gorazde 3.5380679 1.6456548 2.150 0.03162 *
## factor(naziv_Opcine)N.Sarajevo 0.0213315 1.0316563 0.021 0.98350
## factor(naziv_Opcine)N.Travnik 0.3813615 1.0371020 0.368 0.71310
## factor(naziv_Opcine)Nevesinje 1.2510816 1.5308189 0.817 0.41383
## factor(naziv_Opcine)Novi Grad 0.0529613 1.0489560 0.050 0.95973
## factor(naziv_Opcine)Orasje 2.4449366 1.2015923 2.035 0.04195 *
## factor(naziv_Opcine)Pale -1.6624001 1.3016937 -1.277 0.20164
## factor(naziv_Opcine)Posusje 2.3467635 1.4407669 1.629 0.10343
## factor(naziv_Opcine)Prijedor 1.7718482 0.9742431 1.819 0.06904 .
## factor(naziv_Opcine)Prnjavor 1.6879702 1.1350434 1.487 0.13706
## factor(naziv_Opcine)Prozor -0.1781254 1.5413924 -0.116 0.90801
## factor(naziv_Opcine)Ribnik -0.7641601 1.4899597 -0.513 0.60807
## factor(naziv_Opcine)Rogatica -1.6714483 1.4438369 -1.158 0.24708
## factor(naziv_Opcine)Rudo 1.1702085 1.3771865 0.850 0.39554
## factor(naziv_Opcine)S.Brijeg 3.0514796 1.0853965 2.811 0.00496 **
## factor(naziv_Opcine)S.G.Sarajevo 1.7276746 1.0913519 1.583 0.11349
## factor(naziv_Opcine)Samac 1.8193701 1.0461762 1.739 0.08210 .
## factor(naziv_Opcine)Sanski Most 2.2034732 0.9649024 2.284 0.02245 *
## factor(naziv_Opcine)Sokolac -0.2554957 1.5866682 -0.161 0.87208
## factor(naziv_Opcine)Srbac 3.2198880 1.3214265 2.437 0.01487 *
## factor(naziv_Opcine)Srebrenik 0.2835740 0.9754541 0.291 0.77129
## factor(naziv_Opcine)Stolac 3.0585522 1.5264598 2.004 0.04517 *
## factor(naziv_Opcine)Tesanj 1.4396773 0.9958635 1.446 0.14836
## factor(naziv_Opcine)Teslic 1.3806468 1.1543162 1.196 0.23174
## factor(naziv_Opcine)Tomislavgrad 2.6368401 1.3050156 2.021 0.04340 *
## factor(naziv_Opcine)Travnik 2.1467696 0.9309927 2.306 0.02117 *
## factor(naziv_Opcine)Trebinje 0.1725168 1.1555550 0.149 0.88133
## factor(naziv_Opcine)Tuzla 1.1838125 0.9239565 1.281 0.20019
## factor(naziv_Opcine)Ugljevik 1.2180288 1.3736687 0.887 0.37530
## factor(naziv_Opcine)V.Kladusa 1.7776801 1.0461578 1.699 0.08936 .
## factor(naziv_Opcine)Visegrad -2.5955075 1.5840000 -1.639 0.10138
## factor(naziv_Opcine)Visoko 1.6261107 1.0277036 1.582 0.11367
## factor(naziv_Opcine)Vitez 1.6482181 1.0399129 1.585 0.11306
## factor(naziv_Opcine)Vlasenica 0.9672212 1.3498563 0.717 0.47370
## factor(naziv_Opcine)Vogosca 2.5202538 1.2809522 1.967 0.04920 *
## factor(naziv_Opcine)Zavidovici -0.3011142 1.0085522 -0.299 0.76529
## factor(naziv_Opcine)Zenica 0.1047721 0.8960183 0.117 0.90692
## factor(naziv_Opcine)Zepce 1.3143763 1.5904042 0.826 0.40861
## factor(naziv_Opcine)Zivinice 2.6330734 0.9541807 2.760 0.00582 **
## factor(naziv_Opcine)Zvornik 1.7372604 1.0191802 1.705 0.08836 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.266 on 3767 degrees of freedom
## (212 observations deleted due to missingness)
## Multiple R-squared: 0.125, Adjusted R-squared: 0.09803
## F-statistic: 4.638 on 116 and 3767 DF, p-value: < 2.2e-16
#ovaj ima 32 sing munic ali
summary (hbs.transport.drop.1$Age_2)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 2.00 37.00 46.00 45.53 54.00 97.00 212
#buduci da nam je cilj imati sign at munic level uzecu ovaj modeli probati dodati jos +ukljuciti i Activ.1
p4 <- lm (log(mj.trans.AM + 0.0001) ~ factor(Sex_1) + factor(Educ.1) + as.numeric(Age_2) + as.numeric(Age_2^2)+ n.employ + factor (ncomp) + factor(Activ.1) +factor (naziv_Opcine), data = hbs.transport.drop.1)
summary(p4)
##
## Call:
## lm(formula = log(mj.trans.AM + 1e-04) ~ factor(Sex_1) + factor(Educ.1) +
## as.numeric(Age_2) + as.numeric(Age_2^2) + n.employ + factor(ncomp) +
## factor(Activ.1) + factor(naziv_Opcine), data = hbs.transport.drop.1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -13.9191 -0.2834 1.1002 2.3109 7.7472
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -3.0174128 1.1447979 -2.636 0.008429 **
## factor(Sex_1)2 -0.1615025 0.2461482 -0.656 0.511788
## factor(Educ.1)no elementary -0.2488217 0.5820282 -0.428 0.669034
## factor(Educ.1)elementary -0.0790639 0.4901866 -0.161 0.871871
## factor(Educ.1)high schl 0.8103211 0.4866236 1.665 0.095958 .
## factor(Educ.1)college 1.5065191 0.5979290 2.520 0.011791 *
## factor(Educ.1)university 1.4446648 0.5399901 2.675 0.007497 **
## as.numeric(Age_2) 0.0795559 0.0302972 2.626 0.008678 **
## as.numeric(Age_2^2) -0.0007497 0.0003195 -2.347 0.018995 *
## n.employtwo 0.7005610 0.1566997 4.471 8.03e-06 ***
## n.employthree and more 0.9384075 0.2838828 3.306 0.000957 ***
## factor(ncomp)3 1.0917783 0.2211681 4.936 8.30e-07 ***
## factor(ncomp)4 1.8863828 0.2208540 8.541 < 2e-16 ***
## factor(ncomp)5 1.9123185 0.2596498 7.365 2.17e-13 ***
## factor(ncomp)6 2.2762228 0.3266307 6.969 3.76e-12 ***
## factor(ncomp)7 2.7576943 0.5205584 5.298 1.24e-07 ***
## factor(ncomp)8 0.2238281 0.8344174 0.268 0.788526
## factor(ncomp)9 3.2771764 1.4629386 2.240 0.025140 *
## factor(ncomp)10 4.9551699 2.1901356 2.262 0.023724 *
## factor(ncomp)11 4.0667522 2.1782327 1.867 0.061980 .
## factor(ncomp)13 0.6518843 4.3016331 0.152 0.879555
## factor(Activ.1)0 -0.6093123 0.1661802 -3.667 0.000249 ***
## factor(naziv_Opcine)B.Petrovac -1.7141815 1.5793609 -1.085 0.277830
## factor(naziv_Opcine)Banovici 2.6649811 1.2123190 2.198 0.027992 *
## factor(naziv_Opcine)Banja Luka 2.0370183 0.8764500 2.324 0.020169 *
## factor(naziv_Opcine)Bihac 2.4249503 0.9753599 2.486 0.012954 *
## factor(naziv_Opcine)Bijeljina 0.2722747 0.8898161 0.306 0.759629
## factor(naziv_Opcine)Bratunac 1.4289396 1.5798271 0.904 0.365793
## factor(naziv_Opcine)Brcko 2.1381051 0.8660665 2.469 0.013603 *
## factor(naziv_Opcine)Breza -0.7619246 1.4417559 -0.528 0.597204
## factor(naziv_Opcine)Brod 0.6859410 1.2606308 0.544 0.586388
## factor(naziv_Opcine)Bugojno 0.6616487 0.9996369 0.662 0.508083
## factor(naziv_Opcine)Busovaca 2.6816705 1.1957726 2.243 0.024979 *
## factor(naziv_Opcine)Buzim 0.8112335 1.5252841 0.532 0.594856
## factor(naziv_Opcine)C.Sarajevo 0.6762804 1.0192966 0.663 0.507065
## factor(naziv_Opcine)Capljina 3.0168618 1.2541176 2.406 0.016195 *
## factor(naziv_Opcine)Cazin 1.3439131 0.9930097 1.353 0.176018
## factor(naziv_Opcine)Celic 0.7094312 1.5265700 0.465 0.642157
## factor(naziv_Opcine)Celinac 2.0139025 1.5259338 1.320 0.186987
## factor(naziv_Opcine)Citluk 3.4004569 1.2155774 2.797 0.005178 **
## factor(naziv_Opcine)D.Vakuf 1.5769449 1.1021231 1.431 0.152563
## factor(naziv_Opcine)Derventa 1.7081345 1.1868222 1.439 0.150163
## factor(naziv_Opcine)Doboj 1.9136288 1.0200448 1.876 0.060729 .
## factor(naziv_Opcine)Doboj-Istok 3.0735256 1.4779863 2.080 0.037636 *
## factor(naziv_Opcine)Drvar 0.0111929 1.4827747 0.008 0.993978
## factor(naziv_Opcine)Foca - RS 1.5371119 1.2618490 1.218 0.223246
## factor(naziv_Opcine)Fojnica 2.8734159 1.3472648 2.133 0.033007 *
## factor(naziv_Opcine)G.Vakuf 2.1795917 1.1828038 1.843 0.065447 .
## factor(naziv_Opcine)Gacko 0.0336946 1.3207550 0.026 0.979648
## factor(naziv_Opcine)Glamoc -1.2658794 1.8167575 -0.697 0.485984
## factor(naziv_Opcine)Gorazde 0.3277326 1.1237839 0.292 0.770583
## factor(naziv_Opcine)Gracanica 2.3853592 0.9550999 2.497 0.012550 *
## factor(naziv_Opcine)Grad Mostar 2.3817004 0.8892796 2.678 0.007433 **
## factor(naziv_Opcine)Gradacac 2.6160826 1.1301362 2.315 0.020675 *
## factor(naziv_Opcine)Gradiska 2.8749715 1.1345741 2.534 0.011318 *
## factor(naziv_Opcine)Grude 2.4562151 1.2583204 1.952 0.051015 .
## factor(naziv_Opcine)I.Ilidza -1.8112177 1.5848162 -1.143 0.253171
## factor(naziv_Opcine)Ilidza 1.5577179 1.0230290 1.523 0.127930
## factor(naziv_Opcine)Ilijas 0.9601710 1.4389286 0.667 0.504633
## factor(naziv_Opcine)Jajce 2.0559868 1.2799079 1.606 0.108280
## factor(naziv_Opcine)K.Dubica 2.0693958 1.0788063 1.918 0.055158 .
## factor(naziv_Opcine)Kakanj 0.7724097 0.9653383 0.800 0.423678
## factor(naziv_Opcine)Kalesija 2.2397759 1.1649596 1.923 0.054603 .
## factor(naziv_Opcine)Kiseljak 2.5374701 1.0999259 2.307 0.021112 *
## factor(naziv_Opcine)Kladanj 2.0866653 1.4405957 1.448 0.147568
## factor(naziv_Opcine)Kljuc 0.6189446 1.2432501 0.498 0.618623
## factor(naziv_Opcine)Knezevo 1.3126050 1.4058706 0.934 0.350539
## factor(naziv_Opcine)Konjic 0.3830700 1.0351833 0.370 0.711366
## factor(naziv_Opcine)Kotor Varos 1.5058002 1.3450788 1.119 0.263003
## factor(naziv_Opcine)Kresevo 2.0259008 1.4109199 1.436 0.151122
## factor(naziv_Opcine)Laktasi 2.7059287 1.0609234 2.551 0.010795 *
## factor(naziv_Opcine)Livno 0.5650300 1.2251517 0.461 0.644688
## factor(naziv_Opcine)Lopare 2.6716501 1.1833427 2.258 0.024020 *
## factor(naziv_Opcine)Lukavac 2.2455307 1.0472630 2.144 0.032082 *
## factor(naziv_Opcine)Ljubuski 3.4432785 1.1878815 2.899 0.003769 **
## factor(naziv_Opcine)Maglaj 0.5997986 1.0621900 0.565 0.572324
## factor(naziv_Opcine)Modrica 1.6286357 1.1301023 1.441 0.149628
## factor(naziv_Opcine)N.G.Sarajevo 1.6861694 0.8951795 1.884 0.059695 .
## factor(naziv_Opcine)N.Gorazde 3.8375430 1.6449724 2.333 0.019706 *
## factor(naziv_Opcine)N.Sarajevo 0.1295165 1.0303791 0.126 0.899978
## factor(naziv_Opcine)N.Travnik 0.5641050 1.0365922 0.544 0.586342
## factor(naziv_Opcine)Nevesinje 1.5197673 1.5300525 0.993 0.320638
## factor(naziv_Opcine)Novi Grad 0.1642603 1.0476676 0.157 0.875421
## factor(naziv_Opcine)Orasje 2.5929839 1.2002919 2.160 0.030813 *
## factor(naziv_Opcine)Pale -1.5821764 1.2997332 -1.217 0.223563
## factor(naziv_Opcine)Posusje 2.4201113 1.4385322 1.682 0.092584 .
## factor(naziv_Opcine)Prijedor 1.8580222 0.9729219 1.910 0.056243 .
## factor(naziv_Opcine)Prnjavor 1.7518439 1.1333072 1.546 0.122242
## factor(naziv_Opcine)Prozor -0.0174366 1.5394767 -0.011 0.990964
## factor(naziv_Opcine)Ribnik -0.5764129 1.4883859 -0.387 0.698575
## factor(naziv_Opcine)Rogatica -1.6307201 1.4415009 -1.131 0.258015
## factor(naziv_Opcine)Rudo 1.3014821 1.3753835 0.946 0.344072
## factor(naziv_Opcine)S.Brijeg 3.2076045 1.0844445 2.958 0.003117 **
## factor(naziv_Opcine)S.G.Sarajevo 1.7942877 1.0897053 1.647 0.099728 .
## factor(naziv_Opcine)Samac 1.8708137 1.0445468 1.791 0.073369 .
## factor(naziv_Opcine)Sanski Most 2.2222070 0.9633262 2.307 0.021120 *
## factor(naziv_Opcine)Sokolac -0.0759794 1.5848105 -0.048 0.961765
## factor(naziv_Opcine)Srbac 3.2188752 1.3192493 2.440 0.014736 *
## factor(naziv_Opcine)Srebrenik 0.2813957 0.9738471 0.289 0.772634
## factor(naziv_Opcine)Stolac 3.2462511 1.5248043 2.129 0.033322 *
## factor(naziv_Opcine)Tesanj 1.5026934 0.9943713 1.511 0.130822
## factor(naziv_Opcine)Teslic 1.4856423 1.1527700 1.289 0.197561
## factor(naziv_Opcine)Tomislavgrad 2.6861494 1.3029348 2.062 0.039313 *
## factor(naziv_Opcine)Travnik 2.1866392 0.9295224 2.352 0.018702 *
## factor(naziv_Opcine)Trebinje 0.3560660 1.1547367 0.308 0.757831
## factor(naziv_Opcine)Tuzla 1.3404465 0.9234229 1.452 0.146694
## factor(naziv_Opcine)Ugljevik 1.3220545 1.3716988 0.964 0.335204
## factor(naziv_Opcine)V.Kladusa 1.8207596 1.0445003 1.743 0.081383 .
## factor(naziv_Opcine)Visegrad -2.4487814 1.5818965 -1.548 0.121705
## factor(naziv_Opcine)Visoko 1.7966687 1.0270643 1.749 0.080316 .
## factor(naziv_Opcine)Vitez 1.8336064 1.0394300 1.764 0.077805 .
## factor(naziv_Opcine)Vlasenica 0.9747586 1.3476338 0.723 0.469534
## factor(naziv_Opcine)Vogosca 2.6900871 1.2796802 2.102 0.035606 *
## factor(naziv_Opcine)Zavidovici -0.1640000 1.0075847 -0.163 0.870712
## factor(naziv_Opcine)Zenica 0.2064205 0.8949715 0.231 0.817603
## factor(naziv_Opcine)Zepce 1.4922320 1.5885246 0.939 0.347595
## factor(naziv_Opcine)Zivinice 2.7446558 0.9530946 2.880 0.004003 **
## factor(naziv_Opcine)Zvornik 1.8227596 1.0177682 1.791 0.073384 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.259 on 3766 degrees of freedom
## (212 observations deleted due to missingness)
## Multiple R-squared: 0.1281, Adjusted R-squared: 0.101
## F-statistic: 4.729 on 117 and 3766 DF, p-value: < 2.2e-16
# 37 opstina je sign.
#proba kao gore no sex
p8 <- lm (log(mj.trans.AM + 0.0001) ~ factor(Educ.1) + as.numeric(Age_2) + as.numeric(Age_2^2)+ n.employ + factor (ncomp) + Activ.1 +factor (naziv_Opcine), data = hbs.transport.drop.1)
summary(p8) # 38 sign munic.. dakle i nije to to
##
## Call:
## lm(formula = log(mj.trans.AM + 1e-04) ~ factor(Educ.1) + as.numeric(Age_2) +
## as.numeric(Age_2^2) + n.employ + factor(ncomp) + Activ.1 +
## factor(naziv_Opcine), data = hbs.transport.drop.1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -13.9111 -0.2738 1.1009 2.3166 7.7046
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -3.2499565 1.0884702 -2.986 0.00285 **
## factor(Educ.1)no elementary -0.2287020 0.5811760 -0.394 0.69396
## factor(Educ.1)elementary -0.0274154 0.4837881 -0.057 0.95481
## factor(Educ.1)high schl 0.8798650 0.4749041 1.853 0.06400 .
## factor(Educ.1)college 1.5717813 0.5895531 2.666 0.00771 **
## factor(Educ.1)university 1.5096047 0.5308017 2.844 0.00448 **
## as.numeric(Age_2) 0.0845694 0.0293156 2.885 0.00394 **
## as.numeric(Age_2^2) -0.0007839 0.0003152 -2.487 0.01291 *
## n.employtwo 0.6993497 0.1566769 4.464 8.29e-06 ***
## n.employthree and more 0.9256982 0.2831998 3.269 0.00109 **
## factor(ncomp)3 1.1102645 0.2193495 5.062 4.36e-07 ***
## factor(ncomp)4 1.9139783 0.2167958 8.828 < 2e-16 ***
## factor(ncomp)5 1.9389494 0.2564384 7.561 4.99e-14 ***
## factor(ncomp)6 2.3101754 0.3224811 7.164 9.40e-13 ***
## factor(ncomp)7 2.7856935 0.5187671 5.370 8.36e-08 ***
## factor(ncomp)8 0.2593663 0.8325946 0.312 0.75543
## factor(ncomp)9 3.2975233 1.4624993 2.255 0.02421 *
## factor(ncomp)10 5.0043572 2.1886868 2.286 0.02228 *
## factor(ncomp)11 4.1259525 2.1761986 1.896 0.05804 .
## factor(ncomp)13 0.7079030 4.3004606 0.165 0.86926
## Activ.10 -0.6363205 0.1609892 -3.953 7.87e-05 ***
## factor(naziv_Opcine)B.Petrovac -1.7062811 1.5791956 -1.080 0.28000
## factor(naziv_Opcine)Banovici 2.6628928 1.2122232 2.197 0.02810 *
## factor(naziv_Opcine)Banja Luka 2.0185206 0.8759302 2.304 0.02125 *
## factor(naziv_Opcine)Bihac 2.3995461 0.9745174 2.462 0.01385 *
## factor(naziv_Opcine)Bijeljina 0.2657604 0.8896934 0.299 0.76518
## factor(naziv_Opcine)Bratunac 1.4263552 1.5797028 0.903 0.36662
## factor(naziv_Opcine)Brcko 2.1290661 0.8658914 2.459 0.01398 *
## factor(naziv_Opcine)Breza -0.7862106 1.4411718 -0.546 0.58542
## factor(naziv_Opcine)Brod 0.6603753 1.2599332 0.524 0.60022
## factor(naziv_Opcine)Bugojno 0.6641235 0.9995542 0.664 0.50646
## factor(naziv_Opcine)Busovaca 2.6656748 1.1954337 2.230 0.02581 *
## factor(naziv_Opcine)Buzim 0.7625893 1.5233660 0.501 0.61669
## factor(naziv_Opcine)C.Sarajevo 0.6503317 1.0184520 0.639 0.52316
## factor(naziv_Opcine)Capljina 3.0137781 1.2540140 2.403 0.01630 *
## factor(naziv_Opcine)Cazin 1.3378964 0.9928923 1.347 0.17791
## factor(naziv_Opcine)Celic 0.7119553 1.5264498 0.466 0.64095
## factor(naziv_Opcine)Celinac 1.9891767 1.5253531 1.304 0.19229
## factor(naziv_Opcine)Citluk 3.3856747 1.2152767 2.786 0.00536 **
## factor(naziv_Opcine)D.Vakuf 1.5778777 1.1020388 1.432 0.15229
## factor(naziv_Opcine)Derventa 1.7005540 1.1866762 1.433 0.15193
## factor(naziv_Opcine)Doboj 1.9141695 1.0199673 1.877 0.06064 .
## factor(naziv_Opcine)Doboj-Istok 3.0633460 1.4777932 2.073 0.03825 *
## factor(naziv_Opcine)Drvar -0.0222146 1.4817882 -0.015 0.98804
## factor(naziv_Opcine)Foca - RS 1.5268380 1.2616565 1.210 0.22628
## factor(naziv_Opcine)Fojnica 2.8764393 1.3471551 2.135 0.03281 *
## factor(naziv_Opcine)G.Vakuf 2.1775870 1.1827105 1.841 0.06567 .
## factor(naziv_Opcine)Gacko 0.0160675 1.3203819 0.012 0.99029
## factor(naziv_Opcine)Glamoc -1.3078541 1.8154935 -0.720 0.47133
## factor(naziv_Opcine)Gorazde 0.3083839 1.1233120 0.275 0.78369
## factor(naziv_Opcine)Gracanica 2.3770448 0.9549436 2.489 0.01285 *
## factor(naziv_Opcine)Grad Mostar 2.3573862 0.8884400 2.653 0.00800 **
## factor(naziv_Opcine)Gradacac 2.6206907 1.1300289 2.319 0.02044 *
## factor(naziv_Opcine)Gradiska 2.8652535 1.1343916 2.526 0.01158 *
## factor(naziv_Opcine)Grude 2.4460022 1.2581290 1.944 0.05195 .
## factor(naziv_Opcine)I.Ilidza -1.8313621 1.5843990 -1.156 0.24781
## factor(naziv_Opcine)Ilidza 1.5360971 1.0224208 1.502 0.13307
## factor(naziv_Opcine)Ilijas 0.9459787 1.4386572 0.658 0.51087
## factor(naziv_Opcine)Jajce 2.0534563 1.2798054 1.605 0.10869
## factor(naziv_Opcine)K.Dubica 2.0471357 1.0781912 1.899 0.05768 .
## factor(naziv_Opcine)Kakanj 0.7645747 0.9651915 0.792 0.42832
## factor(naziv_Opcine)Kalesija 2.2410238 1.1648700 1.924 0.05445 .
## factor(naziv_Opcine)Kiseljak 2.5202258 1.0995287 2.292 0.02195 *
## factor(naziv_Opcine)Kladanj 2.0771911 1.4404144 1.442 0.14936
## factor(naziv_Opcine)Kljuc 0.5843045 1.2420347 0.470 0.63807
## factor(naziv_Opcine)Knezevo 1.3106173 1.4057610 0.932 0.35123
## factor(naziv_Opcine)Konjic 0.3754012 1.0350391 0.363 0.71685
## factor(naziv_Opcine)Kotor Varos 1.5021997 1.3449659 1.117 0.26411
## factor(naziv_Opcine)Kresevo 2.0229372 1.4108060 1.434 0.15169
## factor(naziv_Opcine)Laktasi 2.7052347 1.0608427 2.550 0.01081 *
## factor(naziv_Opcine)Livno 0.5496639 1.2248352 0.449 0.65363
## factor(naziv_Opcine)Lopare 2.6744964 1.1832453 2.260 0.02386 *
## factor(naziv_Opcine)Lukavac 2.2301852 1.0469227 2.130 0.03322 *
## factor(naziv_Opcine)Ljubuski 3.4129651 1.1868930 2.876 0.00406 **
## factor(naziv_Opcine)Maglaj 0.6003380 1.0621094 0.565 0.57195
## factor(naziv_Opcine)Modrica 1.6083995 1.1295959 1.424 0.15457
## factor(naziv_Opcine)N.G.Sarajevo 1.6624768 0.8943833 1.859 0.06313 .
## factor(naziv_Opcine)N.Gorazde 3.8290479 1.6447971 2.328 0.01997 *
## factor(naziv_Opcine)N.Sarajevo 0.0990573 1.0292550 0.096 0.92333
## factor(naziv_Opcine)N.Travnik 0.5478779 1.0362187 0.529 0.59703
## factor(naziv_Opcine)Nevesinje 1.5040542 1.5297494 0.983 0.32557
## factor(naziv_Opcine)Novi Grad 0.1511848 1.0473989 0.144 0.88524
## factor(naziv_Opcine)Orasje 2.5743233 1.1998642 2.146 0.03198 *
## factor(naziv_Opcine)Pale -1.6083080 1.2990247 -1.238 0.21576
## factor(naziv_Opcine)Posusje 2.4104258 1.4383478 1.676 0.09385 .
## factor(naziv_Opcine)Prijedor 1.8428969 0.9725752 1.895 0.05819 .
## factor(naziv_Opcine)Prnjavor 1.7496703 1.1332167 1.544 0.12268
## factor(naziv_Opcine)Prozor -0.0265919 1.5392971 -0.017 0.98622
## factor(naziv_Opcine)Ribnik -0.6063063 1.4875760 -0.408 0.68361
## factor(naziv_Opcine)Rogatica -1.6504746 1.4410774 -1.145 0.25216
## factor(naziv_Opcine)Rudo 1.2962178 1.3752562 0.943 0.34598
## factor(naziv_Opcine)S.Brijeg 3.1800061 1.0835465 2.935 0.00336 **
## factor(naziv_Opcine)S.G.Sarajevo 1.7622290 1.0885270 1.619 0.10555
## factor(naziv_Opcine)Samac 1.8531831 1.0441222 1.775 0.07600 .
## factor(naziv_Opcine)Sanski Most 2.1916968 0.9621305 2.278 0.02278 *
## factor(naziv_Opcine)Sokolac -0.1198027 1.5832827 -0.076 0.93969
## factor(naziv_Opcine)Srbac 3.2086919 1.3190583 2.433 0.01504 *
## factor(naziv_Opcine)Srebrenik 0.2816061 0.9737735 0.289 0.77245
## factor(naziv_Opcine)Stolac 3.2063950 1.5234787 2.105 0.03539 *
## factor(naziv_Opcine)Tesanj 1.5043785 0.9942928 1.513 0.13036
## factor(naziv_Opcine)Teslic 1.4907022 1.1526571 1.293 0.19600
## factor(naziv_Opcine)Tomislavgrad 2.6808764 1.3028115 2.058 0.03968 *
## factor(naziv_Opcine)Travnik 2.1768248 0.9293318 2.342 0.01921 *
## factor(naziv_Opcine)Trebinje 0.3335176 1.1541380 0.289 0.77262
## factor(naziv_Opcine)Tuzla 1.3267351 0.9231166 1.437 0.15073
## factor(naziv_Opcine)Ugljevik 1.3236272 1.3715930 0.965 0.33459
## factor(naziv_Opcine)V.Kladusa 1.8251088 1.0444003 1.748 0.08063 .
## factor(naziv_Opcine)Visegrad -2.4851511 1.5808055 -1.572 0.11602
## factor(naziv_Opcine)Visoko 1.7823742 1.0267556 1.736 0.08266 .
## factor(naziv_Opcine)Vitez 1.8270679 1.0393037 1.758 0.07883 .
## factor(naziv_Opcine)Vlasenica 0.9653840 1.3474562 0.716 0.47376
## factor(naziv_Opcine)Vogosca 2.6852285 1.2795621 2.099 0.03592 *
## factor(naziv_Opcine)Zavidovici -0.1707714 1.0074557 -0.170 0.86541
## factor(naziv_Opcine)Zenica 0.1914183 0.8946117 0.214 0.83058
## factor(naziv_Opcine)Zepce 1.4926650 1.5884044 0.940 0.34742
## factor(naziv_Opcine)Zivinice 2.7347401 0.9529027 2.870 0.00413 **
## factor(naziv_Opcine)Zvornik 1.8232808 1.0176909 1.792 0.07328 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.259 on 3767 degrees of freedom
## (212 observations deleted due to missingness)
## Multiple R-squared: 0.128, Adjusted R-squared: 0.1011
## F-statistic: 4.766 on 116 and 3767 DF, p-value: < 2.2e-16
table (hbs.transport.drop.1$Activ.1)
##
## 1 0
## 2575 1521
#sacu kao ovaj gornji ali umjesto Activ.1 uzeti Activ_1
p5 <- lm (log(mj.trans.AM + 0.0001) ~ factor(Sex_1) + factor(Educ.1) + as.numeric(Age_2) + as.numeric(Age_2^2)+ n.employ + factor (ncomp) + Activ_1 +factor (naziv_Opcine), data = hbs.transport.drop.1)
summary(p5)
##
## Call:
## lm(formula = log(mj.trans.AM + 1e-04) ~ factor(Sex_1) + factor(Educ.1) +
## as.numeric(Age_2) + as.numeric(Age_2^2) + n.employ + factor(ncomp) +
## Activ_1 + factor(naziv_Opcine), data = hbs.transport.drop.1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -13.8207 -0.2317 1.0930 2.3250 8.0303
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2.8827731 1.1463876 -2.515 0.011956 *
## factor(Sex_1)2 -0.4344387 0.2481329 -1.751 0.080056 .
## factor(Educ.1)no elementary -0.2322457 0.5830429 -0.398 0.690407
## factor(Educ.1)elementary 0.0316288 0.4910323 0.064 0.948645
## factor(Educ.1)high schl 1.0224100 0.4869060 2.100 0.035812 *
## factor(Educ.1)college 1.7493280 0.5976601 2.927 0.003443 **
## factor(Educ.1)university 1.7772918 0.5389635 3.298 0.000984 ***
## as.numeric(Age_2) 0.0681973 0.0302834 2.252 0.024382 *
## as.numeric(Age_2^2) -0.0007202 0.0003199 -2.251 0.024435 *
## n.employtwo 0.8124634 0.1569943 5.175 2.40e-07 ***
## n.employthree and more 1.1494226 0.2850945 4.032 5.65e-05 ***
## factor(ncomp)3 1.0258669 0.2220051 4.621 3.95e-06 ***
## factor(ncomp)4 1.8487585 0.2216242 8.342 < 2e-16 ***
## factor(ncomp)5 1.8180494 0.2610346 6.965 3.86e-12 ***
## factor(ncomp)6 2.1182214 0.3285035 6.448 1.28e-10 ***
## factor(ncomp)7 2.6021271 0.5223127 4.982 6.58e-07 ***
## factor(ncomp)8 -0.0218319 0.8363843 -0.026 0.979177
## factor(ncomp)9 3.2319673 1.4655097 2.205 0.027489 *
## factor(ncomp)10 4.6531398 2.1953618 2.120 0.034111 *
## factor(ncomp)11 3.8816055 2.1829328 1.778 0.075458 .
## factor(ncomp)13 0.5297267 4.3090501 0.123 0.902166
## Activ_1 0.0224510 0.0305132 0.736 0.461910
## factor(naziv_Opcine)B.Petrovac -1.7073833 1.5820694 -1.079 0.280564
## factor(naziv_Opcine)Banovici 2.5781369 1.2143872 2.123 0.033819 *
## factor(naziv_Opcine)Banja Luka 1.8611642 0.8782530 2.119 0.034142 *
## factor(naziv_Opcine)Bihac 2.2810939 0.9767850 2.335 0.019580 *
## factor(naziv_Opcine)Bijeljina 0.2313990 0.8913057 0.260 0.795173
## factor(naziv_Opcine)Bratunac 1.6015711 1.5823126 1.012 0.311521
## factor(naziv_Opcine)Brcko 2.0069937 0.8671502 2.314 0.020695 *
## factor(naziv_Opcine)Breza -0.7588088 1.4442247 -0.525 0.599330
## factor(naziv_Opcine)Brod 0.6933109 1.2627876 0.549 0.583016
## factor(naziv_Opcine)Bugojno 0.3730857 0.9999330 0.373 0.709087
## factor(naziv_Opcine)Busovaca 2.6668451 1.1978196 2.226 0.026045 *
## factor(naziv_Opcine)Buzim 0.8102907 1.5278950 0.530 0.595913
## factor(naziv_Opcine)C.Sarajevo 0.4715895 1.0207039 0.462 0.644091
## factor(naziv_Opcine)Capljina 2.8159695 1.2556729 2.243 0.024981 *
## factor(naziv_Opcine)Cazin 1.3152983 0.9947519 1.322 0.186169
## factor(naziv_Opcine)Celic 0.7221629 1.5291969 0.472 0.636776
## factor(naziv_Opcine)Celinac 1.9268320 1.5285707 1.261 0.207551
## factor(naziv_Opcine)Citluk 3.2538347 1.2176360 2.672 0.007567 **
## factor(naziv_Opcine)D.Vakuf 1.2791907 1.1023634 1.160 0.245957
## factor(naziv_Opcine)Derventa 1.6801715 1.1888897 1.413 0.157672
## factor(naziv_Opcine)Doboj 1.7796095 1.0215438 1.742 0.081576 .
## factor(naziv_Opcine)Doboj-Istok 2.8640910 1.4796005 1.936 0.052977 .
## factor(naziv_Opcine)Drvar -0.1468423 1.4851820 -0.099 0.921245
## factor(naziv_Opcine)Foca - RS 1.3280972 1.2639524 1.051 0.293441
## factor(naziv_Opcine)Fojnica 2.6710987 1.3486700 1.981 0.047715 *
## factor(naziv_Opcine)G.Vakuf 1.9117963 1.1834947 1.615 0.106312
## factor(naziv_Opcine)Gacko 0.0028865 1.3231578 0.002 0.998260
## factor(naziv_Opcine)Glamoc -1.5591482 1.8181292 -0.858 0.391192
## factor(naziv_Opcine)Gorazde 0.1892309 1.1253634 0.168 0.866474
## factor(naziv_Opcine)Gracanica 2.1885088 0.9558818 2.290 0.022104 *
## factor(naziv_Opcine)Grad Mostar 2.2502632 0.8911358 2.525 0.011605 *
## factor(naziv_Opcine)Gradacac 2.4582321 1.1315780 2.172 0.029888 *
## factor(naziv_Opcine)Gradiska 2.6496088 1.1363001 2.332 0.019764 *
## factor(naziv_Opcine)Grude 2.3745354 1.2606945 1.884 0.059708 .
## factor(naziv_Opcine)I.Ilidza -2.1712578 1.5869235 -1.368 0.171325
## factor(naziv_Opcine)Ilidza 1.3756577 1.0241553 1.343 0.179284
## factor(naziv_Opcine)Ilijas 0.8891309 1.4412647 0.617 0.537331
## factor(naziv_Opcine)Jajce 1.9099262 1.2815659 1.490 0.136227
## factor(naziv_Opcine)K.Dubica 1.9485667 1.0808472 1.803 0.071497 .
## factor(naziv_Opcine)Kakanj 0.6793726 0.9668635 0.703 0.482313
## factor(naziv_Opcine)Kalesija 2.0564106 1.1659467 1.764 0.077859 .
## factor(naziv_Opcine)Kiseljak 2.3382628 1.1018758 2.122 0.033897 *
## factor(naziv_Opcine)Kladanj 1.9729233 1.4428030 1.367 0.171574
## factor(naziv_Opcine)Kljuc 0.5164998 1.2452187 0.415 0.678322
## factor(naziv_Opcine)Knezevo 1.2080916 1.4084234 0.858 0.391079
## factor(naziv_Opcine)Konjic 0.2039996 1.0369868 0.197 0.844055
## factor(naziv_Opcine)Kotor Varos 1.4215505 1.3475427 1.055 0.291529
## factor(naziv_Opcine)Kresevo 1.9855548 1.4134522 1.405 0.160176
## factor(naziv_Opcine)Laktasi 2.6364572 1.0630406 2.480 0.013178 *
## factor(naziv_Opcine)Livno 0.5527405 1.2273033 0.450 0.652470
## factor(naziv_Opcine)Lopare 2.3353442 1.1825412 1.975 0.048358 *
## factor(naziv_Opcine)Lukavac 2.1710030 1.0488956 2.070 0.038539 *
## factor(naziv_Opcine)Ljubuski 3.3453610 1.1901218 2.811 0.004965 **
## factor(naziv_Opcine)Maglaj 0.4664354 1.0635032 0.439 0.660988
## factor(naziv_Opcine)Modrica 1.4445945 1.1311085 1.277 0.201628
## factor(naziv_Opcine)N.G.Sarajevo 1.5490359 0.8968269 1.727 0.084206 .
## factor(naziv_Opcine)N.Gorazde 3.5151008 1.6460510 2.135 0.032787 *
## factor(naziv_Opcine)N.Sarajevo 0.0010827 1.0320861 0.001 0.999163
## factor(naziv_Opcine)N.Travnik 0.3465924 1.0382411 0.334 0.738529
## factor(naziv_Opcine)Nevesinje 1.1960927 1.5327352 0.780 0.435225
## factor(naziv_Opcine)Novi Grad 0.0372847 1.0492362 0.036 0.971655
## factor(naziv_Opcine)Orasje 2.4105921 1.2025717 2.005 0.045085 *
## factor(naziv_Opcine)Pale -1.6766515 1.3019171 -1.288 0.197883
## factor(naziv_Opcine)Posusje 2.3249909 1.4411585 1.613 0.106768
## factor(naziv_Opcine)Prijedor 1.7620794 0.9743929 1.808 0.070626 .
## factor(naziv_Opcine)Prnjavor 1.6757572 1.1352339 1.476 0.139992
## factor(naziv_Opcine)Prozor -0.1958608 1.5416747 -0.127 0.898912
## factor(naziv_Opcine)Ribnik -0.8056974 1.4911195 -0.540 0.589001
## factor(naziv_Opcine)Rogatica -1.6718937 1.4439249 -1.158 0.246986
## factor(naziv_Opcine)Rudo 1.1489647 1.3775730 0.834 0.404306
## factor(naziv_Opcine)S.Brijeg 3.0095929 1.0869544 2.769 0.005653 **
## factor(naziv_Opcine)S.G.Sarajevo 1.7154230 1.0915454 1.572 0.116138
## factor(naziv_Opcine)Samac 1.8261418 1.0462804 1.745 0.081003 .
## factor(naziv_Opcine)Sanski Most 2.1892473 0.9651548 2.268 0.023368 *
## factor(naziv_Opcine)Sokolac -0.2746730 1.5869789 -0.173 0.862598
## factor(naziv_Opcine)Srbac 3.2069531 1.3216239 2.427 0.015291 *
## factor(naziv_Opcine)Srebrenik 0.2764375 0.9755617 0.283 0.776915
## factor(naziv_Opcine)Stolac 3.0019407 1.5284904 1.964 0.049605 *
## factor(naziv_Opcine)Tesanj 1.4339327 0.9959548 1.440 0.150019
## factor(naziv_Opcine)Teslic 1.3650237 1.1545817 1.182 0.237174
## factor(naziv_Opcine)Tomislavgrad 2.6199301 1.3052974 2.007 0.044805 *
## factor(naziv_Opcine)Travnik 2.1290454 0.9313610 2.286 0.022312 *
## factor(naziv_Opcine)Trebinje 0.1344866 1.1567807 0.116 0.907453
## factor(naziv_Opcine)Tuzla 1.1638819 0.9244098 1.259 0.208089
## factor(naziv_Opcine)Ugljevik 1.1968303 1.3740544 0.871 0.383798
## factor(naziv_Opcine)V.Kladusa 1.7685620 1.0462949 1.690 0.091052 .
## factor(naziv_Opcine)Visegrad -2.6213409 1.5844855 -1.654 0.098134 .
## factor(naziv_Opcine)Visoko 1.6007295 1.0283449 1.557 0.119648
## factor(naziv_Opcine)Vitez 1.6184178 1.0407646 1.555 0.120023
## factor(naziv_Opcine)Vlasenica 0.9660749 1.3499393 0.716 0.474256
## factor(naziv_Opcine)Vogosca 2.4855816 1.2818966 1.939 0.052577 .
## factor(naziv_Opcine)Zavidovici -0.3217731 1.0090043 -0.319 0.749819
## factor(naziv_Opcine)Zenica 0.0887911 0.8963360 0.099 0.921096
## factor(naziv_Opcine)Zepce 1.2915417 1.5908038 0.812 0.416912
## factor(naziv_Opcine)Zivinice 2.6167159 0.9544977 2.741 0.006146 **
## factor(naziv_Opcine)Zvornik 1.7154207 1.0196744 1.682 0.092589 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.266 on 3766 degrees of freedom
## (212 observations deleted due to missingness)
## Multiple R-squared: 0.1251, Adjusted R-squared: 0.09792
## F-statistic: 4.603 on 117 and 3766 DF, p-value: < 2.2e-16
#ima 32 dakle ipak je bolje sa Activ.1
#ovo je kao p4 ali je i Sex_2 umjesto Sex_1
p6 <- lm (log(mj.trans.AM + 0.0001) ~ factor(Sex_2) + factor(Educ.1) + as.numeric(Age_2) + as.numeric(Age_2^2)+ n.employ + factor (ncomp) + Activ.1 +factor (naziv_Opcine), data = hbs.transport.drop.1)
summary(p6)
##
## Call:
## lm(formula = log(mj.trans.AM + 1e-04) ~ factor(Sex_2) + factor(Educ.1) +
## as.numeric(Age_2) + as.numeric(Age_2^2) + n.employ + factor(ncomp) +
## Activ.1 + factor(naziv_Opcine), data = hbs.transport.drop.1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -13.9121 -0.2749 1.1026 2.3159 7.7103
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -3.2472085 1.0890133 -2.982 0.002884 **
## factor(Sex_2)2 0.0222361 0.2387879 0.093 0.925813
## factor(Educ.1)no elementary -0.2305001 0.5815731 -0.396 0.691877
## factor(Educ.1)elementary -0.0342697 0.4894185 -0.070 0.944181
## factor(Educ.1)high schl 0.8707258 0.4850006 1.795 0.072685 .
## factor(Educ.1)college 1.5632567 0.5966948 2.620 0.008832 **
## factor(Educ.1)university 1.5009265 0.5389894 2.785 0.005384 **
## as.numeric(Age_2) 0.0840859 0.0297757 2.824 0.004768 **
## as.numeric(Age_2^2) -0.0007809 0.0003168 -2.465 0.013745 *
## n.employtwo 0.7001056 0.1569077 4.462 8.36e-06 ***
## n.employthree and more 0.9276477 0.2840097 3.266 0.001100 **
## factor(ncomp)3 1.1082646 0.2204271 5.028 5.19e-07 ***
## factor(ncomp)4 1.9112313 0.2188219 8.734 < 2e-16 ***
## factor(ncomp)5 1.9368787 0.2574343 7.524 6.62e-14 ***
## factor(ncomp)6 2.3070592 0.3242550 7.115 1.33e-12 ***
## factor(ncomp)7 2.7828345 0.5197430 5.354 9.10e-08 ***
## factor(ncomp)8 0.2552920 0.8338529 0.306 0.759500
## factor(ncomp)9 3.2927619 1.4635852 2.250 0.024520 *
## factor(ncomp)10 4.9977766 2.1901152 2.282 0.022547 *
## factor(ncomp)11 4.1187313 2.1778661 1.891 0.058677 .
## factor(ncomp)13 0.7025440 4.3014116 0.163 0.870268
## Activ.10 -0.6325661 0.1659815 -3.811 0.000141 ***
## factor(naziv_Opcine)B.Petrovac -1.7046042 1.5795061 -1.079 0.280567
## factor(naziv_Opcine)Banovici 2.6653687 1.2126742 2.198 0.028015 *
## factor(naziv_Opcine)Banja Luka 2.0201293 0.8762158 2.306 0.021192 *
## factor(naziv_Opcine)Bihac 2.4029651 0.9753370 2.464 0.013794 *
## factor(naziv_Opcine)Bijeljina 0.2667318 0.8898716 0.300 0.764391
## factor(naziv_Opcine)Bratunac 1.4264240 1.5799108 0.903 0.366663
## factor(naziv_Opcine)Brcko 2.1301806 0.8660881 2.460 0.013956 *
## factor(naziv_Opcine)Breza -0.7843961 1.4414931 -0.544 0.586367
## factor(naziv_Opcine)Brod 0.6639413 1.2606808 0.527 0.598466
## factor(naziv_Opcine)Bugojno 0.6661494 0.9999225 0.666 0.505323
## factor(naziv_Opcine)Busovaca 2.6671107 1.1956904 2.231 0.025766 *
## factor(naziv_Opcine)Buzim 0.7676103 1.5245203 0.504 0.614636
## factor(naziv_Opcine)C.Sarajevo 0.6515326 1.0186677 0.640 0.522476
## factor(naziv_Opcine)Capljina 3.0165392 1.2545295 2.405 0.016242 *
## factor(naziv_Opcine)Cazin 1.3383978 0.9930376 1.348 0.177810
## factor(naziv_Opcine)Celic 0.7118212 1.5266513 0.466 0.641054
## factor(naziv_Opcine)Celinac 1.9923218 1.5259277 1.306 0.191753
## factor(naziv_Opcine)Citluk 3.3873616 1.2155717 2.787 0.005352 **
## factor(naziv_Opcine)D.Vakuf 1.5782619 1.1021916 1.432 0.152247
## factor(naziv_Opcine)Derventa 1.7015319 1.1868788 1.434 0.151764
## factor(naziv_Opcine)Doboj 1.9142879 1.0201023 1.877 0.060655 .
## factor(naziv_Opcine)Doboj-Istok 3.0644369 1.4780341 2.073 0.038210 *
## factor(naziv_Opcine)Drvar -0.0195242 1.4822649 -0.013 0.989491
## factor(naziv_Opcine)Foca - RS 1.5285951 1.2619636 1.211 0.225863
## factor(naziv_Opcine)Fojnica 2.8759510 1.3473426 2.135 0.032863 *
## factor(naziv_Opcine)G.Vakuf 2.1769513 1.1828858 1.840 0.065792 .
## factor(naziv_Opcine)Gacko 0.0181559 1.3207461 0.014 0.989033
## factor(naziv_Opcine)Glamoc -1.3055778 1.8158970 -0.719 0.472203
## factor(naziv_Opcine)Gorazde 0.3107951 1.1237582 0.277 0.782127
## factor(naziv_Opcine)Gracanica 2.3789343 0.9552848 2.490 0.012807 *
## factor(naziv_Opcine)Grad Mostar 2.3602592 0.8890924 2.655 0.007972 **
## factor(naziv_Opcine)Gradacac 2.6199520 1.1302055 2.318 0.020496 *
## factor(naziv_Opcine)Gradiska 2.8668083 1.1346638 2.527 0.011559 *
## factor(naziv_Opcine)Grude 2.4470481 1.2583447 1.945 0.051891 .
## factor(naziv_Opcine)I.Ilidza -1.8290218 1.5848068 -1.154 0.248533
## factor(naziv_Opcine)Ilidza 1.5376819 1.0226970 1.504 0.132780
## factor(naziv_Opcine)Ilijas 0.9463131 1.4388510 0.658 0.510780
## factor(naziv_Opcine)Jajce 2.0551629 1.2801050 1.605 0.108475
## factor(naziv_Opcine)K.Dubica 2.0502485 1.0788511 1.900 0.057457 .
## factor(naziv_Opcine)Kakanj 0.7653411 0.9653536 0.793 0.427939
## factor(naziv_Opcine)Kalesija 2.2407863 1.1650261 1.923 0.054508 .
## factor(naziv_Opcine)Kiseljak 2.5224705 1.0999376 2.293 0.021886 *
## factor(naziv_Opcine)Kladanj 2.0788580 1.4407152 1.443 0.149122
## factor(naziv_Opcine)Kljuc 0.5870736 1.2425540 0.472 0.636616
## factor(naziv_Opcine)Knezevo 1.3121583 1.4060434 0.933 0.350762
## factor(naziv_Opcine)Konjic 0.3777245 1.0354759 0.365 0.715294
## factor(naziv_Opcine)Kotor Varos 1.5027256 1.3451548 1.117 0.264006
## factor(naziv_Opcine)Kresevo 2.0234133 1.4110010 1.434 0.151648
## factor(naziv_Opcine)Laktasi 2.7085024 1.0615624 2.551 0.010767 *
## factor(naziv_Opcine)Livno 0.5512888 1.2251207 0.450 0.652745
## factor(naziv_Opcine)Lopare 2.6755450 1.1834546 2.261 0.023829 *
## factor(naziv_Opcine)Lukavac 2.2328866 1.0474623 2.132 0.033095 *
## factor(naziv_Opcine)Ljubuski 3.4191724 1.1889193 2.876 0.004052 **
## factor(naziv_Opcine)Maglaj 0.6003867 1.0622493 0.565 0.571969
## factor(naziv_Opcine)Modrica 1.6103761 1.1299440 1.425 0.154187
## factor(naziv_Opcine)N.G.Sarajevo 1.6656038 0.8951311 1.861 0.062859 .
## factor(naziv_Opcine)N.Gorazde 3.8301630 1.6450572 2.328 0.019950 *
## factor(naziv_Opcine)N.Sarajevo 0.1025329 1.0300669 0.100 0.920715
## factor(naziv_Opcine)N.Travnik 0.5492810 1.0364646 0.530 0.596173
## factor(naziv_Opcine)Nevesinje 1.5056204 1.5300432 0.984 0.325160
## factor(naziv_Opcine)Novi Grad 0.1530178 1.0477216 0.146 0.883891
## factor(naziv_Opcine)Orasje 2.5748615 1.2000360 2.146 0.031964 *
## factor(naziv_Opcine)Pale -1.6059394 1.2994446 -1.236 0.216585
## factor(naziv_Opcine)Posusje 2.4129671 1.4387959 1.677 0.093611 .
## factor(naziv_Opcine)Prijedor 1.8429402 0.9727033 1.895 0.058214 .
## factor(naziv_Opcine)Prnjavor 1.7506966 1.1334194 1.545 0.122523
## factor(naziv_Opcine)Prozor -0.0254265 1.5395506 -0.017 0.986824
## factor(naziv_Opcine)Ribnik -0.6035359 1.4880692 -0.406 0.685072
## factor(naziv_Opcine)Rogatica -1.6509498 1.4412761 -1.145 0.252084
## factor(naziv_Opcine)Rudo 1.3014556 1.3765868 0.945 0.344504
## factor(naziv_Opcine)S.Brijeg 3.1822948 1.0839678 2.936 0.003347 **
## factor(naziv_Opcine)S.G.Sarajevo 1.7648034 1.0890212 1.621 0.105200
## factor(naziv_Opcine)Samac 1.8539850 1.0442951 1.775 0.075922 .
## factor(naziv_Opcine)Sanski Most 2.1943360 0.9626744 2.279 0.022698 *
## factor(naziv_Opcine)Sokolac -0.1115923 1.5859438 -0.070 0.943908
## factor(naziv_Opcine)Srbac 3.2099939 1.3193060 2.433 0.015017 *
## factor(naziv_Opcine)Srebrenik 0.2826325 0.9739640 0.290 0.771688
## factor(naziv_Opcine)Stolac 3.2091707 1.5239707 2.106 0.035288 *
## factor(naziv_Opcine)Tesanj 1.5047066 0.9944299 1.513 0.130329
## factor(naziv_Opcine)Teslic 1.4908804 1.1528104 1.293 0.196001
## factor(naziv_Opcine)Tomislavgrad 2.6827051 1.3031310 2.059 0.039595 *
## factor(naziv_Opcine)Travnik 2.1785601 0.9296409 2.343 0.019158 *
## factor(naziv_Opcine)Trebinje 0.3373521 1.1550241 0.292 0.770246
## factor(naziv_Opcine)Tuzla 1.3284491 0.9234216 1.439 0.150342
## factor(naziv_Opcine)Ugljevik 1.3229449 1.3717931 0.964 0.334912
## factor(naziv_Opcine)V.Kladusa 1.8263342 1.0446206 1.748 0.080490 .
## factor(naziv_Opcine)Visegrad -2.4843609 1.5810363 -1.571 0.116185
## factor(naziv_Opcine)Visoko 1.7841058 1.0270591 1.737 0.082451 .
## factor(naziv_Opcine)Vitez 1.8271112 1.0394406 1.758 0.078866 .
## factor(naziv_Opcine)Vlasenica 0.9674191 1.3478107 0.718 0.472943
## factor(naziv_Opcine)Vogosca 2.6860138 1.2797583 2.099 0.035897 *
## factor(naziv_Opcine)Zavidovici -0.1697739 1.0076452 -0.168 0.866210
## factor(naziv_Opcine)Zenica 0.1930299 0.8948968 0.216 0.829233
## factor(naziv_Opcine)Zepce 1.4923300 1.5886175 0.939 0.347591
## factor(naziv_Opcine)Zivinice 2.7356685 0.9530803 2.870 0.004123 **
## factor(naziv_Opcine)Zvornik 1.8241771 1.0178704 1.792 0.073189 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.259 on 3766 degrees of freedom
## (212 observations deleted due to missingness)
## Multiple R-squared: 0.128, Adjusted R-squared: 0.1009
## F-statistic: 4.724 on 117 and 3766 DF, p-value: < 2.2e-16
#isto 37 tako da nista ne mjenja i ostajemo pri p4
Nakon razmisljanja shvatila sam da ipak nije bas smisleno oslanjati se malo na prvog pa malo na drugog clana domacinstva.. nekako nije bas smisleno a i kada okrenem u novac dobijem vema male iznose oko 3 km prosjecno po domacinstvu tako da cu ipak uzeti model gjde je sve oko 1 clana domacinstva
#uradi model koji je kao p4 ali u potpunosti baziran na drugog clana dakle i Sex i Activ i Educ i age
#prvo napravi potrebne varijable
hbs.transport.drop.1 <- hbs.transport.drop.1 %>% mutate(Educ.2 = case_when(Educ_2 %in% c(1,2,3) ~ "no elementary", Educ_2 == 4 ~ "elementary", Educ_2 %in% c(5,6) ~ "high schl", Educ_2 %in% c(7,8,9,10) ~ "faculty"))
prop.table (table(hbs.transport.drop.1$Educ.2))
##
## elementary faculty high schl no elementary
## 0.27008239 0.11740474 0.52832132 0.08419156
#Relevel Educ
hbs.transport.drop.1$Educ.2 <- forcats::fct_relevel (hbs.transport.drop.1$Educ.2, "no elementary", "elementary", "high schl", "faculty")
table(hbs.transport.drop.1$Educ.2)
##
## no elementary elementary high schl faculty
## 327 1049 2052 456
str(hbs.transport.drop.1$Educ_2)
## num [1:4096] 4 1 4 5 4 5 4 4 1 4 ...
## - attr(*, "label")= chr "Educ_2"
## - attr(*, "format.spss")= chr "F2.0"
table (hbs.transport.drop.1$Activ_2) #mislim da je ovdje bolje staviti dummy prvog clana
##
## 1 2 3 4 5 6 7 8 9
## 1510 186 184 151 1560 78 38 148 6
hbs.transport.drop.1 <- hbs.transport.drop.1 %>% mutate(Activ.2 = case_when(Activ_2 == 1 ~"1", Activ_2!=1 ~
"0"))
table (hbs.transport.drop.1$Activ.2) #Mislim da mi je ova varijabla puno bolja, dakle imam oni koji su full time bilo prvi ili drugi clan je 1 ostali su 0
##
## 0 1
## 2351 1510
OD SVIH MODELA MODEL p2a ima najvise signif (35)kada gledam munic i kada ne gledam Age02
texreg::screenreg(list(p2, p2.age)) #
##
## ==========================================================
## Model 1 Model 2
## ----------------------------------------------------------
## (Intercept) -3.28 *** -3.91 **
## (0.97) (1.37)
## factor(Sex_1)2 -0.64 ** -0.63 **
## (0.21) (0.21)
## factor(Educ.1)no elementary -0.23 -0.21
## (0.58) (0.59)
## factor(Educ.1)elementary 0.03 0.17
## (0.49) (0.52)
## factor(Educ.1)high schl 0.96 * 1.13 *
## (0.48) (0.52)
## factor(Educ.1)college 1.55 ** 1.68 **
## (0.60) (0.62)
## factor(Educ.1)university 1.72 ** 1.90 ***
## (0.54) (0.56)
## factor(Activ.1)0 -0.49 ** -0.59 ***
## (0.16) (0.18)
## n.employtwo 0.73 *** 0.72 ***
## (0.16) (0.16)
## n.employthree and more 1.05 *** 0.99 ***
## (0.29) (0.29)
## factor(ncomp)2 2.12 ***
## (0.36)
## factor(ncomp)3 3.20 ***
## (0.36)
## factor(ncomp)4 3.98 ***
## (0.35)
## factor(ncomp)5 4.05 ***
## (0.38)
## factor(ncomp)6 4.40 ***
## (0.44)
## factor(ncomp)7 4.88 ***
## (0.60)
## factor(ncomp)8 2.40 **
## (0.91)
## factor(ncomp)9 5.23 ***
## (1.53)
## factor(ncomp)10 7.14 **
## (2.27)
## factor(ncomp)11 6.17 **
## (2.26)
## factor(ncomp)13 2.78
## (4.44)
## factor(naziv_Opcine)B.Petrovac -2.29 -2.34
## (1.57) (1.57)
## factor(naziv_Opcine)Banovici 2.60 * 2.60 *
## (1.25) (1.25)
## factor(naziv_Opcine)Banja Luka 1.95 * 1.93 *
## (0.90) (0.90)
## factor(naziv_Opcine)Bihac 2.64 ** 2.61 **
## (1.00) (1.00)
## factor(naziv_Opcine)Bijeljina 0.24 0.19
## (0.91) (0.91)
## factor(naziv_Opcine)Bratunac 1.91 1.87
## (1.57) (1.57)
## factor(naziv_Opcine)Brcko 2.09 * 2.07 *
## (0.89) (0.89)
## factor(naziv_Opcine)Breza -0.72 -0.78
## (1.49) (1.49)
## factor(naziv_Opcine)Brod 0.70 0.67
## (1.27) (1.27)
## factor(naziv_Opcine)Bugojno 0.55 0.55
## (1.03) (1.03)
## factor(naziv_Opcine)Busovaca 2.89 * 2.89 *
## (1.22) (1.22)
## factor(naziv_Opcine)Buzim 1.00 1.06
## (1.57) (1.57)
## factor(naziv_Opcine)C.Sarajevo 0.94 0.87
## (1.04) (1.04)
## factor(naziv_Opcine)Capljina 3.21 * 3.20 *
## (1.27) (1.27)
## factor(naziv_Opcine)Cazin 1.26 1.27
## (1.02) (1.02)
## factor(naziv_Opcine)Celic 0.56 0.52
## (1.57) (1.57)
## factor(naziv_Opcine)Celinac 2.09 2.04
## (1.57) (1.57)
## factor(naziv_Opcine)Citluk 3.36 ** 3.32 **
## (1.25) (1.25)
## factor(naziv_Opcine)D.Vakuf 1.53 1.55
## (1.14) (1.14)
## factor(naziv_Opcine)Derventa 1.13 1.04
## (1.18) (1.19)
## factor(naziv_Opcine)Doboj 1.58 1.56
## (1.03) (1.04)
## factor(naziv_Opcine)Doboj-Istok 3.07 * 3.07 *
## (1.52) (1.52)
## factor(naziv_Opcine)Drvar -0.40 -0.48
## (1.49) (1.49)
## factor(naziv_Opcine)Foca - RS 1.59 1.56
## (1.28) (1.28)
## factor(naziv_Opcine)Fojnica 2.77 * 2.79 *
## (1.39) (1.39)
## factor(naziv_Opcine)G.Vakuf 2.10 2.10
## (1.22) (1.22)
## factor(naziv_Opcine)Gacko -0.07 -0.17
## (1.32) (1.32)
## factor(naziv_Opcine)Glamoc -1.29 -1.32
## (1.63) (1.63)
## factor(naziv_Opcine)Gorazde 0.21 0.23
## (1.16) (1.16)
## factor(naziv_Opcine)Gracanica 2.24 * 2.22 *
## (0.98) (0.98)
## factor(naziv_Opcine)Grad Mostar 2.43 ** 2.37 **
## (0.91) (0.92)
## factor(naziv_Opcine)Gradacac 2.39 * 2.39 *
## (1.13) (1.13)
## factor(naziv_Opcine)Gradiska 2.84 * 2.79 *
## (1.17) (1.17)
## factor(naziv_Opcine)Grude 2.41 2.39
## (1.30) (1.30)
## factor(naziv_Opcine)I.Ilidza -0.83 -0.89
## (1.49) (1.49)
## factor(naziv_Opcine)Ilidza 1.56 1.53
## (1.05) (1.06)
## factor(naziv_Opcine)Ilijas 0.04 0.04
## (1.42) (1.42)
## factor(naziv_Opcine)Jajce 1.23 1.23
## (1.28) (1.28)
## factor(naziv_Opcine)K.Dubica 2.08 2.03
## (1.11) (1.11)
## factor(naziv_Opcine)Kakanj 0.71 0.70
## (0.99) (0.99)
## factor(naziv_Opcine)Kalesija 2.33 2.36 *
## (1.19) (1.19)
## factor(naziv_Opcine)Kiseljak 2.77 * 2.73 *
## (1.12) (1.12)
## factor(naziv_Opcine)Kladanj 1.93 1.92
## (1.48) (1.49)
## factor(naziv_Opcine)Kljuc 0.64 0.64
## (1.28) (1.28)
## factor(naziv_Opcine)Knezevo 1.27 1.21
## (1.45) (1.45)
## factor(naziv_Opcine)Konjic 0.50 0.48
## (1.06) (1.06)
## factor(naziv_Opcine)Kotor Varos 1.47 1.45
## (1.39) (1.39)
## factor(naziv_Opcine)Kresevo 2.26 2.25
## (1.42) (1.42)
## factor(naziv_Opcine)Laktasi 2.58 * 2.49 *
## (1.08) (1.09)
## factor(naziv_Opcine)Livno 0.57 0.50
## (1.26) (1.26)
## factor(naziv_Opcine)Lopare 2.57 * 2.56 *
## (1.20) (1.20)
## factor(naziv_Opcine)Lukavac 2.42 * 2.40 *
## (1.07) (1.07)
## factor(naziv_Opcine)Ljubuski 3.59 ** 3.49 **
## (1.21) (1.22)
## factor(naziv_Opcine)Maglaj 0.56 0.56
## (1.09) (1.09)
## factor(naziv_Opcine)Modrica 1.53 1.49
## (1.13) (1.13)
## factor(naziv_Opcine)N.G.Sarajevo 1.57 1.55
## (0.92) (0.92)
## factor(naziv_Opcine)N.Gorazde 3.83 * 3.87 *
## (1.63) (1.63)
## factor(naziv_Opcine)N.Sarajevo 0.22 0.15
## (1.06) (1.06)
## factor(naziv_Opcine)N.Travnik 0.68 0.66
## (1.06) (1.06)
## factor(naziv_Opcine)Nevesinje 1.53 1.43
## (1.58) (1.58)
## factor(naziv_Opcine)Novi Grad -0.64 -0.65
## (1.06) (1.06)
## factor(naziv_Opcine)Orasje 2.73 * 2.72 *
## (1.22) (1.23)
## factor(naziv_Opcine)Pale -0.80 -0.86
## (1.30) (1.30)
## factor(naziv_Opcine)Posusje 2.41 2.37
## (1.48) (1.48)
## factor(naziv_Opcine)Prijedor 1.90 1.91
## (0.98) (0.98)
## factor(naziv_Opcine)Prnjavor 2.29 * 2.27 *
## (1.12) (1.12)
## factor(naziv_Opcine)Prozor -0.10 -0.05
## (1.59) (1.58)
## factor(naziv_Opcine)Ribnik 0.39 0.32
## (1.45) (1.45)
## factor(naziv_Opcine)Rogatica -1.10 -1.13
## (1.45) (1.45)
## factor(naziv_Opcine)Rudo 1.53 1.47
## (1.39) (1.39)
## factor(naziv_Opcine)S.Brijeg 3.22 ** 3.15 **
## (1.12) (1.12)
## factor(naziv_Opcine)S.G.Sarajevo 1.74 1.71
## (1.12) (1.12)
## factor(naziv_Opcine)Samac 1.52 1.46
## (1.05) (1.05)
## factor(naziv_Opcine)Sanski Most 2.11 * 2.03 *
## (0.99) (0.99)
## factor(naziv_Opcine)Sokolac -0.70 -0.77
## (1.58) (1.58)
## factor(naziv_Opcine)Srbac 2.24 2.18
## (1.31) (1.32)
## factor(naziv_Opcine)Srebrenik 0.24 0.23
## (1.00) (1.00)
## factor(naziv_Opcine)Stolac 3.33 * 3.21 *
## (1.57) (1.57)
## factor(naziv_Opcine)Tesanj 1.51 1.50
## (1.02) (1.02)
## factor(naziv_Opcine)Teslic 0.91 0.91
## (1.17) (1.17)
## factor(naziv_Opcine)Tomislavgrad 2.82 * 2.77 *
## (1.32) (1.32)
## factor(naziv_Opcine)Travnik 2.30 * 2.27 *
## (0.95) (0.96)
## factor(naziv_Opcine)Trebinje 0.53 0.48
## (1.14) (1.15)
## factor(naziv_Opcine)Tuzla 1.53 1.52
## (0.95) (0.95)
## factor(naziv_Opcine)Ugljevik 1.96 1.93
## (1.36) (1.36)
## factor(naziv_Opcine)V.Kladusa 1.63 1.66
## (1.06) (1.06)
## factor(naziv_Opcine)Visegrad -2.09 -2.11
## (1.53) (1.53)
## factor(naziv_Opcine)Visoko 1.71 1.68
## (1.05) (1.05)
## factor(naziv_Opcine)Vitez 1.56 1.55
## (1.07) (1.07)
## factor(naziv_Opcine)Vlasenica 0.78 0.76
## (1.39) (1.39)
## factor(naziv_Opcine)Vogosca 2.21 2.16
## (1.30) (1.30)
## factor(naziv_Opcine)Zavidovici -0.34 -0.35
## (1.04) (1.04)
## factor(naziv_Opcine)Zenica 0.17 0.14
## (0.92) (0.92)
## factor(naziv_Opcine)Zepce 1.38 1.39
## (1.64) (1.64)
## factor(naziv_Opcine)Zivinice 2.68 ** 2.68 **
## (0.98) (0.98)
## factor(naziv_Opcine)Zvornik 1.35 1.30
## (1.04) (1.04)
## factor(ncomp1)two 2.07 ***
## (0.36)
## factor(ncomp1)three 3.18 ***
## (0.36)
## factor(ncomp1)four 3.99 ***
## (0.35)
## factor(ncomp1)five 4.05 ***
## (0.38)
## factor(ncomp1)six 4.39 ***
## (0.44)
## factor(ncomp1)seven 4.85 ***
## (0.60)
## factor(ncomp1)eight 2.37 **
## (0.91)
## factor(ncomp1)nine 5.16 ***
## (1.53)
## factor(ncomp1)ten 7.05 **
## (2.27)
## factor(ncomp1)11+ 5.55 **
## (2.03)
## as.numeric(Age_1) 0.01
## (0.04)
## as.numeric(Age_1^2) 0.00
## (0.00)
## ----------------------------------------------------------
## R^2 0.16 0.16
## Adj. R^2 0.13 0.13
## Num. obs. 4096 4096
## ==========================================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
model.coef.empl <- summary(p2.age)$coefficients
model.coef.empl # vidi koliko redova su koef.za druge varijable (25 redova su drugi koeficijenti)
## Estimate Std. Error t value
## (Intercept) -3.913729e+00 1.3689020951 -2.859027670
## factor(Sex_1)2 -6.324776e-01 0.2114289452 -2.991442845
## factor(Educ.1)no elementary -2.076665e-01 0.5874196859 -0.353523147
## factor(Educ.1)elementary 1.691994e-01 0.5159797415 0.327918644
## factor(Educ.1)high schl 1.129169e+00 0.5190551865 2.175430555
## factor(Educ.1)college 1.683707e+00 0.6196123991 2.717355538
## factor(Educ.1)university 1.895971e+00 0.5627014015 3.369408811
## factor(Activ.1)0 -5.872787e-01 0.1750454269 -3.355007120
## n.employtwo 7.217369e-01 0.1606409310 4.492858199
## n.employthree and more 9.911096e-01 0.2918358848 3.396119730
## factor(ncomp1)two 2.069703e+00 0.3587425020 5.769326513
## factor(ncomp1)three 3.180782e+00 0.3560917510 8.932479229
## factor(ncomp1)four 3.986198e+00 0.3530420208 11.291002102
## factor(ncomp1)five 4.050433e+00 0.3812428213 10.624285623
## factor(ncomp1)six 4.385823e+00 0.4376659192 10.020937357
## factor(ncomp1)seven 4.846195e+00 0.6040549423 8.022771448
## factor(ncomp1)eight 2.371232e+00 0.9058397799 2.617717089
## factor(ncomp1)nine 5.163196e+00 1.5319711682 3.370295649
## factor(ncomp1)ten 7.047417e+00 2.2699751588 3.104622899
## factor(ncomp1)11+ 5.548071e+00 2.0300964383 2.732909898
## as.numeric(Age_1) 1.084637e-02 0.0402034851 0.269786759
## as.numeric(Age_1^2) 1.580515e-06 0.0003867312 0.004086857
## factor(naziv_Opcine)B.Petrovac -2.343559e+00 1.5736629635 -1.489238146
## factor(naziv_Opcine)Banovici 2.595811e+00 1.2498690729 2.076866227
## factor(naziv_Opcine)Banja Luka 1.934821e+00 0.9030537641 2.142531372
## factor(naziv_Opcine)Bihac 2.610734e+00 0.9992502838 2.612692638
## factor(naziv_Opcine)Bijeljina 1.876237e-01 0.9113566813 0.205872995
## factor(naziv_Opcine)Bratunac 1.870069e+00 1.5732046947 1.188700591
## factor(naziv_Opcine)Brcko 2.073063e+00 0.8918375470 2.324485123
## factor(naziv_Opcine)Breza -7.780715e-01 1.4861116617 -0.523561917
## factor(naziv_Opcine)Brod 6.668858e-01 1.2677262643 0.526048744
## factor(naziv_Opcine)Bugojno 5.489472e-01 1.0322300822 0.531806982
## factor(naziv_Opcine)Busovaca 2.886278e+00 1.2195293704 2.366714280
## factor(naziv_Opcine)Buzim 1.056049e+00 1.5722936913 0.671661289
## factor(naziv_Opcine)C.Sarajevo 8.748932e-01 1.0418816393 0.839724128
## factor(naziv_Opcine)Capljina 3.199545e+00 1.2749051617 2.509634017
## factor(naziv_Opcine)Cazin 1.267231e+00 1.0204767921 1.241802619
## factor(naziv_Opcine)Celic 5.162620e-01 1.5739803690 0.327997762
## factor(naziv_Opcine)Celinac 2.035667e+00 1.5733393028 1.293851435
## factor(naziv_Opcine)Citluk 3.323251e+00 1.2542368531 2.649620350
## factor(naziv_Opcine)D.Vakuf 1.550872e+00 1.1364176246 1.364702195
## factor(naziv_Opcine)Derventa 1.036735e+00 1.1856441302 0.874406931
## factor(naziv_Opcine)Doboj 1.559069e+00 1.0352972198 1.505914448
## factor(naziv_Opcine)Doboj-Istok 3.070144e+00 1.5236712845 2.014964755
## factor(naziv_Opcine)Drvar -4.826177e-01 1.4883828562 -0.324256414
## factor(naziv_Opcine)Foca - RS 1.560209e+00 1.2823776949 1.216653598
## factor(naziv_Opcine)Fojnica 2.785435e+00 1.3892566033 2.004982433
## factor(naziv_Opcine)G.Vakuf 2.099253e+00 1.2204452978 1.720071621
## factor(naziv_Opcine)Gacko -1.747981e-01 1.3187394202 -0.132549402
## factor(naziv_Opcine)Glamoc -1.316261e+00 1.6349116182 -0.805096050
## factor(naziv_Opcine)Gorazde 2.313591e-01 1.1593301895 0.199562728
## factor(naziv_Opcine)Gracanica 2.224545e+00 0.9832796285 2.262372999
## factor(naziv_Opcine)Grad Mostar 2.371036e+00 0.9161656683 2.587999255
## factor(naziv_Opcine)Gradacac 2.393526e+00 1.1262196796 2.125274909
## factor(naziv_Opcine)Gradiska 2.785572e+00 1.1702401419 2.380341947
## factor(naziv_Opcine)Grude 2.390219e+00 1.2980864546 1.841340623
## factor(naziv_Opcine)I.Ilidza -8.936432e-01 1.4893370115 -0.600027523
## factor(naziv_Opcine)Ilidza 1.533945e+00 1.0551715783 1.453740092
## factor(naziv_Opcine)Ilijas 4.252310e-02 1.4165262218 0.030019284
## factor(naziv_Opcine)Jajce 1.230119e+00 1.2821556977 0.959414840
## factor(naziv_Opcine)K.Dubica 2.030717e+00 1.1134613632 1.823787274
## factor(naziv_Opcine)Kakanj 6.998392e-01 0.9917703272 0.705646391
## factor(naziv_Opcine)Kalesija 2.356409e+00 1.1901253634 1.979967168
## factor(naziv_Opcine)Kiseljak 2.732436e+00 1.1208288450 2.437871209
## factor(naziv_Opcine)Kladanj 1.917210e+00 1.4852304334 1.290850080
## factor(naziv_Opcine)Kljuc 6.400992e-01 1.2813567342 0.499547990
## factor(naziv_Opcine)Knezevo 1.212439e+00 1.4496638327 0.836358706
## factor(naziv_Opcine)Konjic 4.787779e-01 1.0640100915 0.449974983
## factor(naziv_Opcine)Kotor Varos 1.447382e+00 1.3865742871 1.043854966
## factor(naziv_Opcine)Kresevo 2.246928e+00 1.4229893108 1.579019332
## factor(naziv_Opcine)Laktasi 2.486575e+00 1.0861148409 2.289421953
## factor(naziv_Opcine)Livno 4.978714e-01 1.2624141319 0.394380372
## factor(naziv_Opcine)Lopare 2.564004e+00 1.1976523094 2.140858755
## factor(naziv_Opcine)Lukavac 2.400814e+00 1.0745816892 2.234185149
## factor(naziv_Opcine)Ljubuski 3.489419e+00 1.2158081895 2.870040591
## factor(naziv_Opcine)Maglaj 5.643831e-01 1.0945578976 0.515626563
## factor(naziv_Opcine)Modrica 1.494418e+00 1.1331299240 1.318841105
## factor(naziv_Opcine)N.G.Sarajevo 1.548577e+00 0.9201286046 1.683000245
## factor(naziv_Opcine)N.Gorazde 3.870915e+00 1.6320003931 2.371883591
## factor(naziv_Opcine)N.Sarajevo 1.507828e-01 1.0605241748 0.142177647
## factor(naziv_Opcine)N.Travnik 6.609029e-01 1.0564026515 0.625616444
## factor(naziv_Opcine)Nevesinje 1.429338e+00 1.5791698469 0.905120009
## factor(naziv_Opcine)Novi Grad -6.497563e-01 1.0621131295 -0.611758059
## factor(naziv_Opcine)Orasje 2.716598e+00 1.2250824360 2.217481911
## factor(naziv_Opcine)Pale -8.603666e-01 1.3009339070 -0.661345334
## factor(naziv_Opcine)Posusje 2.372100e+00 1.4837850112 1.598681565
## factor(naziv_Opcine)Prijedor 1.911757e+00 0.9803106015 1.950154456
## factor(naziv_Opcine)Prnjavor 2.271976e+00 1.1167773567 2.034403363
## factor(naziv_Opcine)Prozor -4.894544e-02 1.5843252865 -0.030893555
## factor(naziv_Opcine)Ribnik 3.157752e-01 1.4547556784 0.217064047
## factor(naziv_Opcine)Rogatica -1.132946e+00 1.4508808717 -0.780867516
## factor(naziv_Opcine)Rudo 1.474340e+00 1.3902637119 1.060475001
## factor(naziv_Opcine)S.Brijeg 3.146652e+00 1.1199714212 2.809582303
## factor(naziv_Opcine)S.G.Sarajevo 1.707665e+00 1.1227679571 1.520942473
## factor(naziv_Opcine)Samac 1.459210e+00 1.0491038494 1.390910906
## factor(naziv_Opcine)Sanski Most 2.026442e+00 0.9906312819 2.045606438
## factor(naziv_Opcine)Sokolac -7.666297e-01 1.5794104442 -0.485389813
## factor(naziv_Opcine)Srbac 2.184035e+00 1.3175322253 1.657671108
## factor(naziv_Opcine)Srebrenik 2.289489e-01 1.0006445146 0.228801436
## factor(naziv_Opcine)Stolac 3.214712e+00 1.5740900030 2.042266832
## factor(naziv_Opcine)Tesanj 1.502421e+00 1.0229414689 1.468725825
## factor(naziv_Opcine)Teslic 9.110332e-01 1.1692012367 0.779192787
## factor(naziv_Opcine)Tomislavgrad 2.769009e+00 1.3219674731 2.094611906
## factor(naziv_Opcine)Travnik 2.267355e+00 0.9555738509 2.372767851
## factor(naziv_Opcine)Trebinje 4.758655e-01 1.1453340268 0.415481812
## factor(naziv_Opcine)Tuzla 1.523680e+00 0.9469586123 1.609025424
## factor(naziv_Opcine)Ugljevik 1.931864e+00 1.3596883657 1.420813637
## factor(naziv_Opcine)V.Kladusa 1.659238e+00 1.0585577870 1.567451707
## factor(naziv_Opcine)Visegrad -2.113707e+00 1.5305559421 -1.381006118
## factor(naziv_Opcine)Visoko 1.682034e+00 1.0510010307 1.600411560
## factor(naziv_Opcine)Vitez 1.552143e+00 1.0691244414 1.451789119
## factor(naziv_Opcine)Vlasenica 7.642246e-01 1.3883770378 0.550444594
## factor(naziv_Opcine)Vogosca 2.158107e+00 1.2993807611 1.660873067
## factor(naziv_Opcine)Zavidovici -3.531872e-01 1.0365087907 -0.340746898
## factor(naziv_Opcine)Zenica 1.411459e-01 0.9172125529 0.153885664
## factor(naziv_Opcine)Zepce 1.391384e+00 1.6380248655 0.849427830
## factor(naziv_Opcine)Zivinice 2.680221e+00 0.9829880146 2.726605983
## factor(naziv_Opcine)Zvornik 1.302786e+00 1.0364722173 1.256942961
## Pr(>|t|)
## (Intercept) 4.271527e-03
## factor(Sex_1)2 2.793661e-03
## factor(Educ.1)no elementary 7.237150e-01
## factor(Educ.1)elementary 7.429904e-01
## factor(Educ.1)high schl 2.965656e-02
## factor(Educ.1)college 6.609086e-03
## factor(Educ.1)university 7.604666e-04
## factor(Activ.1)0 8.010642e-04
## n.employtwo 7.226957e-06
## n.employthree and more 6.901848e-04
## factor(ncomp1)two 8.564680e-09
## factor(ncomp1)three 6.243700e-19
## factor(ncomp1)four 4.014585e-29
## factor(ncomp1)five 5.112521e-26
## factor(ncomp1)six 2.328794e-23
## factor(ncomp1)seven 1.348307e-15
## factor(ncomp1)eight 8.885551e-03
## factor(ncomp1)nine 7.580302e-04
## factor(ncomp1)ten 1.918613e-03
## factor(ncomp1)11+ 6.305501e-03
## as.numeric(Age_1) 7.873383e-01
## as.numeric(Age_1^2) 9.967394e-01
## factor(naziv_Opcine)B.Petrovac 1.365039e-01
## factor(naziv_Opcine)Banovici 3.787794e-02
## factor(naziv_Opcine)Banja Luka 3.221126e-02
## factor(naziv_Opcine)Bihac 9.017005e-03
## factor(naziv_Opcine)Bijeljina 8.369007e-01
## factor(naziv_Opcine)Bratunac 2.346285e-01
## factor(naziv_Opcine)Brcko 2.014961e-02
## factor(naziv_Opcine)Breza 6.006124e-01
## factor(naziv_Opcine)Brod 5.988837e-01
## factor(naziv_Opcine)Bugojno 5.948894e-01
## factor(naziv_Opcine)Busovaca 1.799441e-02
## factor(naziv_Opcine)Buzim 5.018384e-01
## factor(naziv_Opcine)C.Sarajevo 4.011135e-01
## factor(naziv_Opcine)Capljina 1.212505e-02
## factor(naziv_Opcine)Cazin 2.143826e-01
## factor(naziv_Opcine)Celic 7.429306e-01
## factor(naziv_Opcine)Celinac 1.957919e-01
## factor(naziv_Opcine)Citluk 8.090105e-03
## factor(naziv_Opcine)D.Vakuf 1.724239e-01
## factor(naziv_Opcine)Derventa 3.819495e-01
## factor(naziv_Opcine)Doboj 1.321685e-01
## factor(naziv_Opcine)Doboj-Istok 4.397549e-02
## factor(naziv_Opcine)Drvar 7.457610e-01
## factor(naziv_Opcine)Foca - RS 2.238082e-01
## factor(naziv_Opcine)Fojnica 4.503256e-02
## factor(naziv_Opcine)G.Vakuf 8.549720e-02
## factor(naziv_Opcine)Gacko 8.945565e-01
## factor(naziv_Opcine)Glamoc 4.208124e-01
## factor(naziv_Opcine)Gorazde 8.418328e-01
## factor(naziv_Opcine)Gracanica 2.372809e-02
## factor(naziv_Opcine)Grad Mostar 9.688632e-03
## factor(naziv_Opcine)Gradacac 3.362514e-02
## factor(naziv_Opcine)Gradiska 1.734341e-02
## factor(naziv_Opcine)Grude 6.564607e-02
## factor(naziv_Opcine)I.Ilidza 5.485221e-01
## factor(naziv_Opcine)Ilidza 1.460973e-01
## factor(naziv_Opcine)Ilijas 9.760532e-01
## factor(naziv_Opcine)Jajce 3.374081e-01
## factor(naziv_Opcine)K.Dubica 6.825923e-02
## factor(naziv_Opcine)Kakanj 4.804494e-01
## factor(naziv_Opcine)Kalesija 4.777603e-02
## factor(naziv_Opcine)Kiseljak 1.481753e-02
## factor(naziv_Opcine)Kladanj 1.968307e-01
## factor(naziv_Opcine)Kljuc 6.174210e-01
## factor(naziv_Opcine)Knezevo 4.030034e-01
## factor(naziv_Opcine)Konjic 6.527530e-01
## factor(naziv_Opcine)Kotor Varos 2.966159e-01
## factor(naziv_Opcine)Kresevo 1.144111e-01
## factor(naziv_Opcine)Laktasi 2.210699e-02
## factor(naziv_Opcine)Livno 6.933214e-01
## factor(naziv_Opcine)Lopare 3.234604e-02
## factor(naziv_Opcine)Lukavac 2.552624e-02
## factor(naziv_Opcine)Ljubuski 4.125845e-03
## factor(naziv_Opcine)Maglaj 6.061439e-01
## factor(naziv_Opcine)Modrica 1.872982e-01
## factor(naziv_Opcine)N.G.Sarajevo 9.245351e-02
## factor(naziv_Opcine)N.Gorazde 1.774499e-02
## factor(naziv_Opcine)N.Sarajevo 8.869469e-01
## factor(naziv_Opcine)N.Travnik 5.316024e-01
## factor(naziv_Opcine)Nevesinje 3.654566e-01
## factor(naziv_Opcine)Novi Grad 5.407328e-01
## factor(naziv_Opcine)Orasje 2.664648e-02
## factor(naziv_Opcine)Pale 5.084292e-01
## factor(naziv_Opcine)Posusje 1.099708e-01
## factor(naziv_Opcine)Prijedor 5.122786e-02
## factor(naziv_Opcine)Prnjavor 4.197714e-02
## factor(naziv_Opcine)Prozor 9.753560e-01
## factor(naziv_Opcine)Ribnik 8.281696e-01
## factor(naziv_Opcine)Rogatica 4.349269e-01
## factor(naziv_Opcine)Rudo 2.889929e-01
## factor(naziv_Opcine)S.Brijeg 4.984813e-03
## factor(naziv_Opcine)S.G.Sarajevo 1.283538e-01
## factor(naziv_Opcine)Samac 1.643302e-01
## factor(naziv_Opcine)Sanski Most 4.086075e-02
## factor(naziv_Opcine)Sokolac 6.274266e-01
## factor(naziv_Opcine)Srbac 9.746272e-02
## factor(naziv_Opcine)Srebrenik 8.190350e-01
## factor(naziv_Opcine)Stolac 4.119088e-02
## factor(naziv_Opcine)Tesanj 1.419862e-01
## factor(naziv_Opcine)Teslic 4.359125e-01
## factor(naziv_Opcine)Tomislavgrad 3.626861e-02
## factor(naziv_Opcine)Travnik 1.770263e-02
## factor(naziv_Opcine)Trebinje 6.778116e-01
## factor(naziv_Opcine)Tuzla 1.076901e-01
## factor(naziv_Opcine)Ugljevik 1.554493e-01
## factor(naziv_Opcine)V.Kladusa 1.170887e-01
## factor(naziv_Opcine)Visegrad 1.673547e-01
## factor(naziv_Opcine)Visoko 1.095867e-01
## factor(naziv_Opcine)Vitez 1.466391e-01
## factor(naziv_Opcine)Vlasenica 5.820454e-01
## factor(naziv_Opcine)Vogosca 9.681775e-02
## factor(naziv_Opcine)Zavidovici 7.333121e-01
## factor(naziv_Opcine)Zenica 8.777077e-01
## factor(naziv_Opcine)Zepce 3.956944e-01
## factor(naziv_Opcine)Zivinice 6.426992e-03
## factor(naziv_Opcine)Zvornik 2.088481e-01
#Ovdje je B.Krupa referentna opstina, B.Grahovo sam brisala, provjeri koja ostina je abecedno po redu
sort(unique(hbs.transport.drop.1$naziv_Opcine)) #B.Krupa je referentna
## [1] "B.Krupa" "B.Petrovac" "Banovici" "Banja Luka" "Bihac"
## [6] "Bijeljina" "Bratunac" "Brcko" "Breza" "Brod"
## [11] "Bugojno" "Busovaca" "Buzim" "C.Sarajevo" "Capljina"
## [16] "Cazin" "Celic" "Celinac" "Citluk" "D.Vakuf"
## [21] "Derventa" "Doboj" "Doboj-Istok" "Drvar" "Foca - RS"
## [26] "Fojnica" "G.Vakuf" "Gacko" "Glamoc" "Gorazde"
## [31] "Gracanica" "Grad Mostar" "Gradacac" "Gradiska" "Grude"
## [36] "I.Ilidza" "Ilidza" "Ilijas" "Jajce" "K.Dubica"
## [41] "Kakanj" "Kalesija" "Kiseljak" "Kladanj" "Kljuc"
## [46] "Knezevo" "Konjic" "Kotor Varos" "Kresevo" "Laktasi"
## [51] "Livno" "Lopare" "Lukavac" "Ljubuski" "Maglaj"
## [56] "Modrica" "N.G.Sarajevo" "N.Gorazde" "N.Sarajevo" "N.Travnik"
## [61] "Nevesinje" "Novi Grad" "Orasje" "Pale" "Posusje"
## [66] "Prijedor" "Prnjavor" "Prozor" "Ribnik" "Rogatica"
## [71] "Rudo" "S.Brijeg" "S.G.Sarajevo" "Samac" "Sanski Most"
## [76] "Sokolac" "Srbac" "Srebrenik" "Stolac" "Tesanj"
## [81] "Teslic" "Tomislavgrad" "Travnik" "Trebinje" "Tuzla"
## [86] "Ugljevik" "V.Kladusa" "Visegrad" "Visoko" "Vitez"
## [91] "Vlasenica" "Vogosca" "Zavidovici" "Zenica" "Zepce"
## [96] "Zivinice" "Zvornik"
model.coef.empl[,c("Estimate","Pr(>|t|)")]
## Estimate Pr(>|t|)
## (Intercept) -3.913729e+00 4.271527e-03
## factor(Sex_1)2 -6.324776e-01 2.793661e-03
## factor(Educ.1)no elementary -2.076665e-01 7.237150e-01
## factor(Educ.1)elementary 1.691994e-01 7.429904e-01
## factor(Educ.1)high schl 1.129169e+00 2.965656e-02
## factor(Educ.1)college 1.683707e+00 6.609086e-03
## factor(Educ.1)university 1.895971e+00 7.604666e-04
## factor(Activ.1)0 -5.872787e-01 8.010642e-04
## n.employtwo 7.217369e-01 7.226957e-06
## n.employthree and more 9.911096e-01 6.901848e-04
## factor(ncomp1)two 2.069703e+00 8.564680e-09
## factor(ncomp1)three 3.180782e+00 6.243700e-19
## factor(ncomp1)four 3.986198e+00 4.014585e-29
## factor(ncomp1)five 4.050433e+00 5.112521e-26
## factor(ncomp1)six 4.385823e+00 2.328794e-23
## factor(ncomp1)seven 4.846195e+00 1.348307e-15
## factor(ncomp1)eight 2.371232e+00 8.885551e-03
## factor(ncomp1)nine 5.163196e+00 7.580302e-04
## factor(ncomp1)ten 7.047417e+00 1.918613e-03
## factor(ncomp1)11+ 5.548071e+00 6.305501e-03
## as.numeric(Age_1) 1.084637e-02 7.873383e-01
## as.numeric(Age_1^2) 1.580515e-06 9.967394e-01
## factor(naziv_Opcine)B.Petrovac -2.343559e+00 1.365039e-01
## factor(naziv_Opcine)Banovici 2.595811e+00 3.787794e-02
## factor(naziv_Opcine)Banja Luka 1.934821e+00 3.221126e-02
## factor(naziv_Opcine)Bihac 2.610734e+00 9.017005e-03
## factor(naziv_Opcine)Bijeljina 1.876237e-01 8.369007e-01
## factor(naziv_Opcine)Bratunac 1.870069e+00 2.346285e-01
## factor(naziv_Opcine)Brcko 2.073063e+00 2.014961e-02
## factor(naziv_Opcine)Breza -7.780715e-01 6.006124e-01
## factor(naziv_Opcine)Brod 6.668858e-01 5.988837e-01
## factor(naziv_Opcine)Bugojno 5.489472e-01 5.948894e-01
## factor(naziv_Opcine)Busovaca 2.886278e+00 1.799441e-02
## factor(naziv_Opcine)Buzim 1.056049e+00 5.018384e-01
## factor(naziv_Opcine)C.Sarajevo 8.748932e-01 4.011135e-01
## factor(naziv_Opcine)Capljina 3.199545e+00 1.212505e-02
## factor(naziv_Opcine)Cazin 1.267231e+00 2.143826e-01
## factor(naziv_Opcine)Celic 5.162620e-01 7.429306e-01
## factor(naziv_Opcine)Celinac 2.035667e+00 1.957919e-01
## factor(naziv_Opcine)Citluk 3.323251e+00 8.090105e-03
## factor(naziv_Opcine)D.Vakuf 1.550872e+00 1.724239e-01
## factor(naziv_Opcine)Derventa 1.036735e+00 3.819495e-01
## factor(naziv_Opcine)Doboj 1.559069e+00 1.321685e-01
## factor(naziv_Opcine)Doboj-Istok 3.070144e+00 4.397549e-02
## factor(naziv_Opcine)Drvar -4.826177e-01 7.457610e-01
## factor(naziv_Opcine)Foca - RS 1.560209e+00 2.238082e-01
## factor(naziv_Opcine)Fojnica 2.785435e+00 4.503256e-02
## factor(naziv_Opcine)G.Vakuf 2.099253e+00 8.549720e-02
## factor(naziv_Opcine)Gacko -1.747981e-01 8.945565e-01
## factor(naziv_Opcine)Glamoc -1.316261e+00 4.208124e-01
## factor(naziv_Opcine)Gorazde 2.313591e-01 8.418328e-01
## factor(naziv_Opcine)Gracanica 2.224545e+00 2.372809e-02
## factor(naziv_Opcine)Grad Mostar 2.371036e+00 9.688632e-03
## factor(naziv_Opcine)Gradacac 2.393526e+00 3.362514e-02
## factor(naziv_Opcine)Gradiska 2.785572e+00 1.734341e-02
## factor(naziv_Opcine)Grude 2.390219e+00 6.564607e-02
## factor(naziv_Opcine)I.Ilidza -8.936432e-01 5.485221e-01
## factor(naziv_Opcine)Ilidza 1.533945e+00 1.460973e-01
## factor(naziv_Opcine)Ilijas 4.252310e-02 9.760532e-01
## factor(naziv_Opcine)Jajce 1.230119e+00 3.374081e-01
## factor(naziv_Opcine)K.Dubica 2.030717e+00 6.825923e-02
## factor(naziv_Opcine)Kakanj 6.998392e-01 4.804494e-01
## factor(naziv_Opcine)Kalesija 2.356409e+00 4.777603e-02
## factor(naziv_Opcine)Kiseljak 2.732436e+00 1.481753e-02
## factor(naziv_Opcine)Kladanj 1.917210e+00 1.968307e-01
## factor(naziv_Opcine)Kljuc 6.400992e-01 6.174210e-01
## factor(naziv_Opcine)Knezevo 1.212439e+00 4.030034e-01
## factor(naziv_Opcine)Konjic 4.787779e-01 6.527530e-01
## factor(naziv_Opcine)Kotor Varos 1.447382e+00 2.966159e-01
## factor(naziv_Opcine)Kresevo 2.246928e+00 1.144111e-01
## factor(naziv_Opcine)Laktasi 2.486575e+00 2.210699e-02
## factor(naziv_Opcine)Livno 4.978714e-01 6.933214e-01
## factor(naziv_Opcine)Lopare 2.564004e+00 3.234604e-02
## factor(naziv_Opcine)Lukavac 2.400814e+00 2.552624e-02
## factor(naziv_Opcine)Ljubuski 3.489419e+00 4.125845e-03
## factor(naziv_Opcine)Maglaj 5.643831e-01 6.061439e-01
## factor(naziv_Opcine)Modrica 1.494418e+00 1.872982e-01
## factor(naziv_Opcine)N.G.Sarajevo 1.548577e+00 9.245351e-02
## factor(naziv_Opcine)N.Gorazde 3.870915e+00 1.774499e-02
## factor(naziv_Opcine)N.Sarajevo 1.507828e-01 8.869469e-01
## factor(naziv_Opcine)N.Travnik 6.609029e-01 5.316024e-01
## factor(naziv_Opcine)Nevesinje 1.429338e+00 3.654566e-01
## factor(naziv_Opcine)Novi Grad -6.497563e-01 5.407328e-01
## factor(naziv_Opcine)Orasje 2.716598e+00 2.664648e-02
## factor(naziv_Opcine)Pale -8.603666e-01 5.084292e-01
## factor(naziv_Opcine)Posusje 2.372100e+00 1.099708e-01
## factor(naziv_Opcine)Prijedor 1.911757e+00 5.122786e-02
## factor(naziv_Opcine)Prnjavor 2.271976e+00 4.197714e-02
## factor(naziv_Opcine)Prozor -4.894544e-02 9.753560e-01
## factor(naziv_Opcine)Ribnik 3.157752e-01 8.281696e-01
## factor(naziv_Opcine)Rogatica -1.132946e+00 4.349269e-01
## factor(naziv_Opcine)Rudo 1.474340e+00 2.889929e-01
## factor(naziv_Opcine)S.Brijeg 3.146652e+00 4.984813e-03
## factor(naziv_Opcine)S.G.Sarajevo 1.707665e+00 1.283538e-01
## factor(naziv_Opcine)Samac 1.459210e+00 1.643302e-01
## factor(naziv_Opcine)Sanski Most 2.026442e+00 4.086075e-02
## factor(naziv_Opcine)Sokolac -7.666297e-01 6.274266e-01
## factor(naziv_Opcine)Srbac 2.184035e+00 9.746272e-02
## factor(naziv_Opcine)Srebrenik 2.289489e-01 8.190350e-01
## factor(naziv_Opcine)Stolac 3.214712e+00 4.119088e-02
## factor(naziv_Opcine)Tesanj 1.502421e+00 1.419862e-01
## factor(naziv_Opcine)Teslic 9.110332e-01 4.359125e-01
## factor(naziv_Opcine)Tomislavgrad 2.769009e+00 3.626861e-02
## factor(naziv_Opcine)Travnik 2.267355e+00 1.770263e-02
## factor(naziv_Opcine)Trebinje 4.758655e-01 6.778116e-01
## factor(naziv_Opcine)Tuzla 1.523680e+00 1.076901e-01
## factor(naziv_Opcine)Ugljevik 1.931864e+00 1.554493e-01
## factor(naziv_Opcine)V.Kladusa 1.659238e+00 1.170887e-01
## factor(naziv_Opcine)Visegrad -2.113707e+00 1.673547e-01
## factor(naziv_Opcine)Visoko 1.682034e+00 1.095867e-01
## factor(naziv_Opcine)Vitez 1.552143e+00 1.466391e-01
## factor(naziv_Opcine)Vlasenica 7.642246e-01 5.820454e-01
## factor(naziv_Opcine)Vogosca 2.158107e+00 9.681775e-02
## factor(naziv_Opcine)Zavidovici -3.531872e-01 7.333121e-01
## factor(naziv_Opcine)Zenica 1.411459e-01 8.777077e-01
## factor(naziv_Opcine)Zepce 1.391384e+00 3.956944e-01
## factor(naziv_Opcine)Zivinice 2.680221e+00 6.426992e-03
## factor(naziv_Opcine)Zvornik 1.302786e+00 2.088481e-01
model.coef.empl <- model.coef.empl #provjeri koliko je drugih unosa
model.coef.empl <- as.data.frame.array(model.coef.empl[-c(1:22),]) # da bude dataframe a ne matrix i da mi brise prvih 20 redova koji su drugi koeficijenti
Munic <- rownames(model.coef.empl)
model.coef.empl$Munic <- Munic
dim(model.coef.empl) #da vidim koliko redova - 96 redova
## [1] 96 5
rownames(model.coef.empl) <- 1:96 #nedostaje B.Krupa koje je 0
head(model.coef.empl)
Estimate <dbl> | Std. Error <dbl> | t value <dbl> | Pr(>|t|) <dbl> | Munic <chr> | |
---|---|---|---|---|---|
1 | -2.3435589 | 1.5736630 | -1.489238 | 0.136503942 | factor(naziv_Opcine)B.Petrovac |
2 | 2.5958109 | 1.2498691 | 2.076866 | 0.037877945 | factor(naziv_Opcine)Banovici |
3 | 1.9348210 | 0.9030538 | 2.142531 | 0.032211265 | factor(naziv_Opcine)Banja Luka |
4 | 2.6107339 | 0.9992503 | 2.612693 | 0.009017005 | factor(naziv_Opcine)Bihac |
5 | 0.1876237 | 0.9113567 | 0.205873 | 0.836900655 | factor(naziv_Opcine)Bijeljina |
6 | 1.8700694 | 1.5732047 | 1.188701 | 0.234628463 | factor(naziv_Opcine)Bratunac |
factor(Munic)
Munic1 <- sapply(strsplit(Munic, split=')', fixed=TRUE), function(x) (x[2]))
Munic1
## [1] "B.Petrovac" "Banovici" "Banja Luka" "Bihac" "Bijeljina"
## [6] "Bratunac" "Brcko" "Breza" "Brod" "Bugojno"
## [11] "Busovaca" "Buzim" "C.Sarajevo" "Capljina" "Cazin"
## [16] "Celic" "Celinac" "Citluk" "D.Vakuf" "Derventa"
## [21] "Doboj" "Doboj-Istok" "Drvar" "Foca - RS" "Fojnica"
## [26] "G.Vakuf" "Gacko" "Glamoc" "Gorazde" "Gracanica"
## [31] "Grad Mostar" "Gradacac" "Gradiska" "Grude" "I.Ilidza"
## [36] "Ilidza" "Ilijas" "Jajce" "K.Dubica" "Kakanj"
## [41] "Kalesija" "Kiseljak" "Kladanj" "Kljuc" "Knezevo"
## [46] "Konjic" "Kotor Varos" "Kresevo" "Laktasi" "Livno"
## [51] "Lopare" "Lukavac" "Ljubuski" "Maglaj" "Modrica"
## [56] "N.G.Sarajevo" "N.Gorazde" "N.Sarajevo" "N.Travnik" "Nevesinje"
## [61] "Novi Grad" "Orasje" "Pale" "Posusje" "Prijedor"
## [66] "Prnjavor" "Prozor" "Ribnik" "Rogatica" "Rudo"
## [71] "S.Brijeg" "S.G.Sarajevo" "Samac" "Sanski Most" "Sokolac"
## [76] "Srbac" "Srebrenik" "Stolac" "Tesanj" "Teslic"
## [81] "Tomislavgrad" "Travnik" "Trebinje" "Tuzla" "Ugljevik"
## [86] "V.Kladusa" "Visegrad" "Visoko" "Vitez" "Vlasenica"
## [91] "Vogosca" "Zavidovici" "Zenica" "Zepce" "Zivinice"
## [96] "Zvornik"
model.coef.empl$Munic1 <- Munic1
add B.Krupa to dataframe
model.coef.empl[nrow(model.coef.empl) + 1,] = c(0, NA, NA, NA,"B.Krupa","B.Krupa" )
model.coef.empl$Estimate <- as.numeric(model.coef.empl$Estimate)
top10.m.empl <- model.coef.empl %>%
dplyr::select(Estimate, Munic1) %>%
arrange (desc(Estimate))%>%
head(10) #top ten municipalities
top10.m.empl
Estimate <dbl> | Munic1 <chr> | |||
---|---|---|---|---|
1 | 3.870915 | N.Gorazde | ||
2 | 3.489419 | Ljubuski | ||
3 | 3.323251 | Citluk | ||
4 | 3.214712 | Stolac | ||
5 | 3.199545 | Capljina | ||
6 | 3.146652 | S.Brijeg | ||
7 | 3.070144 | Doboj-Istok | ||
8 | 2.886278 | Busovaca | ||
9 | 2.785572 | Gradiska | ||
10 | 2.785435 | Fojnica |
model.coef.empl_p2 <- summary(p2)$coefficients
model.coef.empl_p2# vidi koliko redova su koef.za druge varijable (21 redova su drugi koeficijenti)
## Estimate Std. Error t value
## (Intercept) -3.27990118 0.9687246 -3.38579322
## factor(Sex_1)2 -0.63504157 0.2113959 -3.00403930
## factor(Educ.1)no elementary -0.23135651 0.5842143 -0.39601312
## factor(Educ.1)elementary 0.03278330 0.4904880 0.06683812
## factor(Educ.1)high schl 0.95736454 0.4848138 1.97470558
## factor(Educ.1)college 1.54962802 0.5976551 2.59284684
## factor(Educ.1)university 1.72030553 0.5354184 3.21301149
## factor(Activ.1)0 -0.48785898 0.1605501 -3.03867152
## n.employtwo 0.73476928 0.1602872 4.58407937
## n.employthree and more 1.04831548 0.2885569 3.63295885
## factor(ncomp)2 2.11762097 0.3573672 5.92561686
## factor(ncomp)3 3.20186122 0.3557592 9.00008033
## factor(ncomp)4 3.97762735 0.3527847 11.27494158
## factor(ncomp)5 4.05005247 0.3809812 10.63058287
## factor(ncomp)6 4.39519839 0.4376247 10.04330577
## factor(ncomp)7 4.88347062 0.6036045 8.09051410
## factor(ncomp)8 2.39671720 0.9055448 2.64671300
## factor(ncomp)9 5.23363844 1.5310741 3.41827905
## factor(ncomp)10 7.14030264 2.2688102 3.14715735
## factor(ncomp)11 6.17388081 2.2629882 2.72819844
## factor(ncomp)13 2.78440740 4.4425540 0.62675826
## factor(naziv_Opcine)B.Petrovac -2.28932717 1.5732347 -1.45517207
## factor(naziv_Opcine)Banovici 2.59664374 1.2492045 2.07863788
## factor(naziv_Opcine)Banja Luka 1.95396109 0.9006611 2.16947422
## factor(naziv_Opcine)Bihac 2.64195221 0.9981571 2.64682993
## factor(naziv_Opcine)Bijeljina 0.23775527 0.9089724 0.26156490
## factor(naziv_Opcine)Bratunac 1.90581007 1.5730433 1.21154330
## factor(naziv_Opcine)Brcko 2.09072348 0.8905157 2.34776725
## factor(naziv_Opcine)Breza -0.72277972 1.4853446 -0.48660743
## factor(naziv_Opcine)Brod 0.69951672 1.2658489 0.55260679
## factor(naziv_Opcine)Bugojno 0.55042973 1.0299238 0.53443734
## factor(naziv_Opcine)Busovaca 2.89354568 1.2191816 2.37335090
## factor(naziv_Opcine)Buzim 0.99890298 1.5719607 0.63545036
## factor(naziv_Opcine)C.Sarajevo 0.93881309 1.0391914 0.90340729
## factor(naziv_Opcine)Capljina 3.21468522 1.2749084 2.52150284
## factor(naziv_Opcine)Cazin 1.26397568 1.0205579 1.23851445
## factor(naziv_Opcine)Celic 0.56410519 1.5720343 0.35883772
## factor(naziv_Opcine)Celinac 2.09228071 1.5721846 1.33081105
## factor(naziv_Opcine)Citluk 3.35506633 1.2525371 2.67861631
## factor(naziv_Opcine)D.Vakuf 1.53277714 1.1356465 1.34969560
## factor(naziv_Opcine)Derventa 1.12887052 1.1799908 0.95667743
## factor(naziv_Opcine)Doboj 1.57629880 1.0344085 1.52386484
## factor(naziv_Opcine)Doboj-Istok 3.07494432 1.5233059 2.01859933
## factor(naziv_Opcine)Drvar -0.39626477 1.4864552 -0.26658372
## factor(naziv_Opcine)Foca - RS 1.59382201 1.2812882 1.24392160
## factor(naziv_Opcine)Fojnica 2.76709321 1.3884515 1.99293469
## factor(naziv_Opcine)G.Vakuf 2.10329685 1.2190320 1.72538283
## factor(naziv_Opcine)Gacko -0.06710201 1.3151238 -0.05102335
## factor(naziv_Opcine)Glamoc -1.29297045 1.6342667 -0.79116247
## factor(naziv_Opcine)Gorazde 0.21054480 1.1577683 0.18185399
## factor(naziv_Opcine)Gracanica 2.23753341 0.9824147 2.27758544
## factor(naziv_Opcine)Grad Mostar 2.42525021 0.9127960 2.65694659
## factor(naziv_Opcine)Gradacac 2.39007321 1.1254504 2.12365931
## factor(naziv_Opcine)Gradiska 2.84285772 1.1687628 2.43236491
## factor(naziv_Opcine)Grude 2.41216885 1.2966695 1.86028036
## factor(naziv_Opcine)I.Ilidza -0.82901438 1.4884775 -0.55695458
## factor(naziv_Opcine)Ilidza 1.56379913 1.0538703 1.48386291
## factor(naziv_Opcine)Ilijas 0.03523393 1.4155812 0.02489008
## factor(naziv_Opcine)Jajce 1.22854199 1.2819064 0.95837105
## factor(naziv_Opcine)K.Dubica 2.08117984 1.1114104 1.87255745
## factor(naziv_Opcine)Kakanj 0.71194374 0.9909298 0.71846028
## factor(naziv_Opcine)Kalesija 2.32587095 1.1895553 1.95524401
## factor(naziv_Opcine)Kiseljak 2.76941709 1.1193001 2.47423993
## factor(naziv_Opcine)Kladanj 1.93125273 1.4843272 1.30109634
## factor(naziv_Opcine)Kljuc 0.64105464 1.2808950 0.50047398
## factor(naziv_Opcine)Knezevo 1.26608900 1.4488425 0.87386240
## factor(naziv_Opcine)Konjic 0.50378884 1.0624233 0.47418845
## factor(naziv_Opcine)Kotor Varos 1.47398866 1.3862345 1.06330396
## factor(naziv_Opcine)Kresevo 2.26443091 1.4216142 1.59285898
## factor(naziv_Opcine)Laktasi 2.58174693 1.0827094 2.38452438
## factor(naziv_Opcine)Livno 0.56719983 1.2612549 0.44971070
## factor(naziv_Opcine)Lopare 2.57355961 1.1963382 2.15119733
## factor(naziv_Opcine)Lukavac 2.41887671 1.0739917 2.25223043
## factor(naziv_Opcine)Ljubuski 3.59208867 1.2106040 2.96718708
## factor(naziv_Opcine)Maglaj 0.56478813 1.0943399 0.51609936
## factor(naziv_Opcine)Modrica 1.52760070 1.1322038 1.34922770
## factor(naziv_Opcine)N.G.Sarajevo 1.56674564 0.9176727 1.70730332
## factor(naziv_Opcine)N.Gorazde 3.82932933 1.6306969 2.34827783
## factor(naziv_Opcine)N.Sarajevo 0.22347525 1.0573135 0.21136138
## factor(naziv_Opcine)N.Travnik 0.67927723 1.0555249 0.64354447
## factor(naziv_Opcine)Nevesinje 1.53253124 1.5759204 0.97246739
## factor(naziv_Opcine)Novi Grad -0.64233421 1.0573761 -0.60747943
## factor(naziv_Opcine)Orasje 2.72790935 1.2239627 2.22875204
## factor(naziv_Opcine)Pale -0.80212014 1.2978972 -0.61801514
## factor(naziv_Opcine)Posusje 2.40662635 1.4826096 1.62323668
## factor(naziv_Opcine)Prijedor 1.90442269 0.9781964 1.94687154
## factor(naziv_Opcine)Prnjavor 2.29271062 1.1157839 2.05479802
## factor(naziv_Opcine)Prozor -0.10176920 1.5864749 -0.06414801
## factor(naziv_Opcine)Ribnik 0.39452843 1.4529071 0.27154416
## factor(naziv_Opcine)Rogatica -1.10462350 1.4499621 -0.76182923
## factor(naziv_Opcine)Rudo 1.53217455 1.3883481 1.10359541
## factor(naziv_Opcine)S.Brijeg 3.22438093 1.1166288 2.88760332
## factor(naziv_Opcine)S.G.Sarajevo 1.74108149 1.1215647 1.55236825
## factor(naziv_Opcine)Samac 1.52376002 1.0470837 1.45524187
## factor(naziv_Opcine)Sanski Most 2.11415736 0.9903235 2.13481487
## factor(naziv_Opcine)Sokolac -0.70119105 1.5780456 -0.44434143
## factor(naziv_Opcine)Srbac 2.24443794 1.3147282 1.70714975
## factor(naziv_Opcine)Srebrenik 0.24414616 0.9992056 0.24434026
## factor(naziv_Opcine)Stolac 3.32576662 1.5706594 2.11743339
## factor(naziv_Opcine)Tesanj 1.51480153 1.0219363 1.48228562
## factor(naziv_Opcine)Teslic 0.91484148 1.1684491 0.78295365
## factor(naziv_Opcine)Tomislavgrad 2.81666769 1.3210407 2.13215817
## factor(naziv_Opcine)Travnik 2.29868927 0.9543260 2.40870455
## factor(naziv_Opcine)Trebinje 0.53480104 1.1440675 0.46745583
## factor(naziv_Opcine)Tuzla 1.53084965 0.9453647 1.61932185
## factor(naziv_Opcine)Ugljevik 1.95819691 1.3595119 1.44036766
## factor(naziv_Opcine)V.Kladusa 1.63185789 1.0574053 1.54326622
## factor(naziv_Opcine)Visegrad -2.09193897 1.5293962 -1.36782021
## factor(naziv_Opcine)Visoko 1.70880289 1.0498012 1.62773947
## factor(naziv_Opcine)Vitez 1.55542866 1.0666983 1.45817115
## factor(naziv_Opcine)Vlasenica 0.77556921 1.3873148 0.55904341
## factor(naziv_Opcine)Vogosca 2.20510453 1.2985453 1.69813452
## factor(naziv_Opcine)Zavidovici -0.33525893 1.0350397 -0.32390924
## factor(naziv_Opcine)Zenica 0.17132694 0.9158301 0.18707284
## factor(naziv_Opcine)Zepce 1.38357557 1.6372243 0.84507395
## factor(naziv_Opcine)Zivinice 2.68227382 0.9820688 2.73124832
## factor(naziv_Opcine)Zvornik 1.34830492 1.0352825 1.30235463
## Pr(>|t|)
## (Intercept) 7.166056e-04
## factor(Sex_1)2 2.680805e-03
## factor(Educ.1)no elementary 6.921166e-01
## factor(Educ.1)elementary 9.467139e-01
## factor(Educ.1)high schl 4.837060e-02
## factor(Educ.1)college 9.553360e-03
## factor(Educ.1)university 1.323989e-03
## factor(Activ.1)0 2.391674e-03
## n.employtwo 4.699887e-06
## n.employthree and more 2.837249e-04
## factor(ncomp)2 3.374965e-09
## factor(ncomp)3 3.421685e-19
## factor(ncomp)4 4.790497e-29
## factor(ncomp)5 4.786755e-26
## factor(ncomp)6 1.866741e-23
## factor(ncomp)7 7.817136e-16
## factor(ncomp)8 8.159849e-03
## factor(ncomp)9 6.365125e-04
## factor(ncomp)10 1.660846e-03
## factor(ncomp)11 6.396098e-03
## factor(ncomp)13 5.308537e-01
## factor(naziv_Opcine)B.Petrovac 1.457005e-01
## factor(naziv_Opcine)Banovici 3.771457e-02
## factor(naziv_Opcine)Banja Luka 3.010571e-02
## factor(naziv_Opcine)Bihac 8.157034e-03
## factor(naziv_Opcine)Bijeljina 7.936704e-01
## factor(naziv_Opcine)Bratunac 2.257592e-01
## factor(naziv_Opcine)Brcko 1.893504e-02
## factor(naziv_Opcine)Breza 6.265634e-01
## factor(naziv_Opcine)Brod 5.805637e-01
## factor(naziv_Opcine)Bugojno 5.930688e-01
## factor(naziv_Opcine)Busovaca 1.767474e-02
## factor(naziv_Opcine)Buzim 5.251713e-01
## factor(naziv_Opcine)C.Sarajevo 3.663645e-01
## factor(naziv_Opcine)Capljina 1.172422e-02
## factor(naziv_Opcine)Cazin 2.155984e-01
## factor(naziv_Opcine)Celic 7.197355e-01
## factor(naziv_Opcine)Celinac 1.833274e-01
## factor(naziv_Opcine)Citluk 7.423105e-03
## factor(naziv_Opcine)D.Vakuf 1.771904e-01
## factor(naziv_Opcine)Derventa 3.387882e-01
## factor(naziv_Opcine)Doboj 1.276219e-01
## factor(naziv_Opcine)Doboj-Istok 4.359584e-02
## factor(naziv_Opcine)Drvar 7.898035e-01
## factor(naziv_Opcine)Foca - RS 2.136017e-01
## factor(naziv_Opcine)Fojnica 4.633679e-02
## factor(naziv_Opcine)G.Vakuf 8.453615e-02
## factor(naziv_Opcine)Gacko 9.593095e-01
## factor(naziv_Opcine)Glamoc 4.288963e-01
## factor(naziv_Opcine)Gorazde 8.557066e-01
## factor(naziv_Opcine)Gracanica 2.280411e-02
## factor(naziv_Opcine)Grad Mostar 7.916689e-03
## factor(naziv_Opcine)Gradacac 3.376017e-02
## factor(naziv_Opcine)Gradiska 1.504439e-02
## factor(naziv_Opcine)Grude 6.291960e-02
## factor(naziv_Opcine)I.Ilidza 5.775898e-01
## factor(naziv_Opcine)Ilidza 1.379245e-01
## factor(naziv_Opcine)Ilijas 9.801439e-01
## factor(naziv_Opcine)Jajce 3.379339e-01
## factor(naziv_Opcine)K.Dubica 6.120280e-02
## factor(naziv_Opcine)Kakanj 4.725157e-01
## factor(naziv_Opcine)Kalesija 5.062418e-02
## factor(naziv_Opcine)Kiseljak 1.339340e-02
## factor(naziv_Opcine)Kladanj 1.933008e-01
## factor(naziv_Opcine)Kljuc 6.167691e-01
## factor(naziv_Opcine)Knezevo 3.822459e-01
## factor(naziv_Opcine)Konjic 6.353915e-01
## factor(naziv_Opcine)Kotor Varos 2.877087e-01
## factor(naziv_Opcine)Kresevo 1.112713e-01
## factor(naziv_Opcine)Laktasi 1.714779e-02
## factor(naziv_Opcine)Livno 6.529436e-01
## factor(naziv_Opcine)Lopare 3.152065e-02
## factor(naziv_Opcine)Lukavac 2.436201e-02
## factor(naziv_Opcine)Ljubuski 3.023275e-03
## factor(naziv_Opcine)Maglaj 6.058137e-01
## factor(naziv_Opcine)Modrica 1.773406e-01
## factor(naziv_Opcine)N.G.Sarajevo 8.784370e-02
## factor(naziv_Opcine)N.Gorazde 1.890914e-02
## factor(naziv_Opcine)N.Sarajevo 8.326161e-01
## factor(naziv_Opcine)N.Travnik 5.199080e-01
## factor(naziv_Opcine)Nevesinje 3.308772e-01
## factor(naziv_Opcine)Novi Grad 5.435675e-01
## factor(naziv_Opcine)Orasje 2.588605e-02
## factor(naziv_Opcine)Pale 5.366007e-01
## factor(naziv_Opcine)Posusje 1.046180e-01
## factor(naziv_Opcine)Prijedor 5.162041e-02
## factor(naziv_Opcine)Prnjavor 3.996367e-02
## factor(naziv_Opcine)Prozor 9.488556e-01
## factor(naziv_Opcine)Ribnik 7.859866e-01
## factor(naziv_Opcine)Rogatica 4.462071e-01
## factor(naziv_Opcine)Rudo 2.698354e-01
## factor(naziv_Opcine)S.Brijeg 3.902826e-03
## factor(naziv_Opcine)S.G.Sarajevo 1.206537e-01
## factor(naziv_Opcine)Samac 1.456812e-01
## factor(naziv_Opcine)Sanski Most 3.283706e-02
## factor(naziv_Opcine)Sokolac 6.568199e-01
## factor(naziv_Opcine)Srbac 8.787224e-02
## factor(naziv_Opcine)Srebrenik 8.069799e-01
## factor(naziv_Opcine)Stolac 3.428495e-02
## factor(naziv_Opcine)Tesanj 1.383435e-01
## factor(naziv_Opcine)Teslic 4.337009e-01
## factor(naziv_Opcine)Tomislavgrad 3.305492e-02
## factor(naziv_Opcine)Travnik 1.605442e-02
## factor(naziv_Opcine)Trebinje 6.401994e-01
## factor(naziv_Opcine)Tuzla 1.054573e-01
## factor(naziv_Opcine)Ugljevik 1.498421e-01
## factor(naziv_Opcine)V.Kladusa 1.228457e-01
## factor(naziv_Opcine)Visegrad 1.714456e-01
## factor(naziv_Opcine)Visoko 1.036593e-01
## factor(naziv_Opcine)Vitez 1.448723e-01
## factor(naziv_Opcine)Vlasenica 5.761636e-01
## factor(naziv_Opcine)Vogosca 8.956056e-02
## factor(naziv_Opcine)Zavidovici 7.460238e-01
## factor(naziv_Opcine)Zenica 8.516131e-01
## factor(naziv_Opcine)Zepce 3.981204e-01
## factor(naziv_Opcine)Zivinice 6.337314e-03
## factor(naziv_Opcine)Zvornik 1.928706e-01
#Ovdje je B.Krupa referentna opstina, B.Grahovo sam brisala, provjeri koja ostina je abecedno po redu
model.coef.empl_p2[,c("Estimate","Pr(>|t|)")]
## Estimate Pr(>|t|)
## (Intercept) -3.27990118 7.166056e-04
## factor(Sex_1)2 -0.63504157 2.680805e-03
## factor(Educ.1)no elementary -0.23135651 6.921166e-01
## factor(Educ.1)elementary 0.03278330 9.467139e-01
## factor(Educ.1)high schl 0.95736454 4.837060e-02
## factor(Educ.1)college 1.54962802 9.553360e-03
## factor(Educ.1)university 1.72030553 1.323989e-03
## factor(Activ.1)0 -0.48785898 2.391674e-03
## n.employtwo 0.73476928 4.699887e-06
## n.employthree and more 1.04831548 2.837249e-04
## factor(ncomp)2 2.11762097 3.374965e-09
## factor(ncomp)3 3.20186122 3.421685e-19
## factor(ncomp)4 3.97762735 4.790497e-29
## factor(ncomp)5 4.05005247 4.786755e-26
## factor(ncomp)6 4.39519839 1.866741e-23
## factor(ncomp)7 4.88347062 7.817136e-16
## factor(ncomp)8 2.39671720 8.159849e-03
## factor(ncomp)9 5.23363844 6.365125e-04
## factor(ncomp)10 7.14030264 1.660846e-03
## factor(ncomp)11 6.17388081 6.396098e-03
## factor(ncomp)13 2.78440740 5.308537e-01
## factor(naziv_Opcine)B.Petrovac -2.28932717 1.457005e-01
## factor(naziv_Opcine)Banovici 2.59664374 3.771457e-02
## factor(naziv_Opcine)Banja Luka 1.95396109 3.010571e-02
## factor(naziv_Opcine)Bihac 2.64195221 8.157034e-03
## factor(naziv_Opcine)Bijeljina 0.23775527 7.936704e-01
## factor(naziv_Opcine)Bratunac 1.90581007 2.257592e-01
## factor(naziv_Opcine)Brcko 2.09072348 1.893504e-02
## factor(naziv_Opcine)Breza -0.72277972 6.265634e-01
## factor(naziv_Opcine)Brod 0.69951672 5.805637e-01
## factor(naziv_Opcine)Bugojno 0.55042973 5.930688e-01
## factor(naziv_Opcine)Busovaca 2.89354568 1.767474e-02
## factor(naziv_Opcine)Buzim 0.99890298 5.251713e-01
## factor(naziv_Opcine)C.Sarajevo 0.93881309 3.663645e-01
## factor(naziv_Opcine)Capljina 3.21468522 1.172422e-02
## factor(naziv_Opcine)Cazin 1.26397568 2.155984e-01
## factor(naziv_Opcine)Celic 0.56410519 7.197355e-01
## factor(naziv_Opcine)Celinac 2.09228071 1.833274e-01
## factor(naziv_Opcine)Citluk 3.35506633 7.423105e-03
## factor(naziv_Opcine)D.Vakuf 1.53277714 1.771904e-01
## factor(naziv_Opcine)Derventa 1.12887052 3.387882e-01
## factor(naziv_Opcine)Doboj 1.57629880 1.276219e-01
## factor(naziv_Opcine)Doboj-Istok 3.07494432 4.359584e-02
## factor(naziv_Opcine)Drvar -0.39626477 7.898035e-01
## factor(naziv_Opcine)Foca - RS 1.59382201 2.136017e-01
## factor(naziv_Opcine)Fojnica 2.76709321 4.633679e-02
## factor(naziv_Opcine)G.Vakuf 2.10329685 8.453615e-02
## factor(naziv_Opcine)Gacko -0.06710201 9.593095e-01
## factor(naziv_Opcine)Glamoc -1.29297045 4.288963e-01
## factor(naziv_Opcine)Gorazde 0.21054480 8.557066e-01
## factor(naziv_Opcine)Gracanica 2.23753341 2.280411e-02
## factor(naziv_Opcine)Grad Mostar 2.42525021 7.916689e-03
## factor(naziv_Opcine)Gradacac 2.39007321 3.376017e-02
## factor(naziv_Opcine)Gradiska 2.84285772 1.504439e-02
## factor(naziv_Opcine)Grude 2.41216885 6.291960e-02
## factor(naziv_Opcine)I.Ilidza -0.82901438 5.775898e-01
## factor(naziv_Opcine)Ilidza 1.56379913 1.379245e-01
## factor(naziv_Opcine)Ilijas 0.03523393 9.801439e-01
## factor(naziv_Opcine)Jajce 1.22854199 3.379339e-01
## factor(naziv_Opcine)K.Dubica 2.08117984 6.120280e-02
## factor(naziv_Opcine)Kakanj 0.71194374 4.725157e-01
## factor(naziv_Opcine)Kalesija 2.32587095 5.062418e-02
## factor(naziv_Opcine)Kiseljak 2.76941709 1.339340e-02
## factor(naziv_Opcine)Kladanj 1.93125273 1.933008e-01
## factor(naziv_Opcine)Kljuc 0.64105464 6.167691e-01
## factor(naziv_Opcine)Knezevo 1.26608900 3.822459e-01
## factor(naziv_Opcine)Konjic 0.50378884 6.353915e-01
## factor(naziv_Opcine)Kotor Varos 1.47398866 2.877087e-01
## factor(naziv_Opcine)Kresevo 2.26443091 1.112713e-01
## factor(naziv_Opcine)Laktasi 2.58174693 1.714779e-02
## factor(naziv_Opcine)Livno 0.56719983 6.529436e-01
## factor(naziv_Opcine)Lopare 2.57355961 3.152065e-02
## factor(naziv_Opcine)Lukavac 2.41887671 2.436201e-02
## factor(naziv_Opcine)Ljubuski 3.59208867 3.023275e-03
## factor(naziv_Opcine)Maglaj 0.56478813 6.058137e-01
## factor(naziv_Opcine)Modrica 1.52760070 1.773406e-01
## factor(naziv_Opcine)N.G.Sarajevo 1.56674564 8.784370e-02
## factor(naziv_Opcine)N.Gorazde 3.82932933 1.890914e-02
## factor(naziv_Opcine)N.Sarajevo 0.22347525 8.326161e-01
## factor(naziv_Opcine)N.Travnik 0.67927723 5.199080e-01
## factor(naziv_Opcine)Nevesinje 1.53253124 3.308772e-01
## factor(naziv_Opcine)Novi Grad -0.64233421 5.435675e-01
## factor(naziv_Opcine)Orasje 2.72790935 2.588605e-02
## factor(naziv_Opcine)Pale -0.80212014 5.366007e-01
## factor(naziv_Opcine)Posusje 2.40662635 1.046180e-01
## factor(naziv_Opcine)Prijedor 1.90442269 5.162041e-02
## factor(naziv_Opcine)Prnjavor 2.29271062 3.996367e-02
## factor(naziv_Opcine)Prozor -0.10176920 9.488556e-01
## factor(naziv_Opcine)Ribnik 0.39452843 7.859866e-01
## factor(naziv_Opcine)Rogatica -1.10462350 4.462071e-01
## factor(naziv_Opcine)Rudo 1.53217455 2.698354e-01
## factor(naziv_Opcine)S.Brijeg 3.22438093 3.902826e-03
## factor(naziv_Opcine)S.G.Sarajevo 1.74108149 1.206537e-01
## factor(naziv_Opcine)Samac 1.52376002 1.456812e-01
## factor(naziv_Opcine)Sanski Most 2.11415736 3.283706e-02
## factor(naziv_Opcine)Sokolac -0.70119105 6.568199e-01
## factor(naziv_Opcine)Srbac 2.24443794 8.787224e-02
## factor(naziv_Opcine)Srebrenik 0.24414616 8.069799e-01
## factor(naziv_Opcine)Stolac 3.32576662 3.428495e-02
## factor(naziv_Opcine)Tesanj 1.51480153 1.383435e-01
## factor(naziv_Opcine)Teslic 0.91484148 4.337009e-01
## factor(naziv_Opcine)Tomislavgrad 2.81666769 3.305492e-02
## factor(naziv_Opcine)Travnik 2.29868927 1.605442e-02
## factor(naziv_Opcine)Trebinje 0.53480104 6.401994e-01
## factor(naziv_Opcine)Tuzla 1.53084965 1.054573e-01
## factor(naziv_Opcine)Ugljevik 1.95819691 1.498421e-01
## factor(naziv_Opcine)V.Kladusa 1.63185789 1.228457e-01
## factor(naziv_Opcine)Visegrad -2.09193897 1.714456e-01
## factor(naziv_Opcine)Visoko 1.70880289 1.036593e-01
## factor(naziv_Opcine)Vitez 1.55542866 1.448723e-01
## factor(naziv_Opcine)Vlasenica 0.77556921 5.761636e-01
## factor(naziv_Opcine)Vogosca 2.20510453 8.956056e-02
## factor(naziv_Opcine)Zavidovici -0.33525893 7.460238e-01
## factor(naziv_Opcine)Zenica 0.17132694 8.516131e-01
## factor(naziv_Opcine)Zepce 1.38357557 3.981204e-01
## factor(naziv_Opcine)Zivinice 2.68227382 6.337314e-03
## factor(naziv_Opcine)Zvornik 1.34830492 1.928706e-01
model.coef.empl_p2 <- model.coef.empl_p2 #provjeri koliko je drugih unosa
model.coef.empl_p2 <- as.data.frame.array(model.coef.empl_p2[-c(1:21),]) # da bude dataframe a ne matrix i da mi brise prvih 10 redova koji su drugi koeficijenti
Munic <- rownames(model.coef.empl_p2)
model.coef.empl_p2$Munic <- Munic
dim(model.coef.empl_p2) #da vidim koliko redova -
## [1] 96 5
rownames(model.coef.empl_p2) <- 1:96 #nedostaje B.Krupa koje je 0
head(model.coef.empl_p2)
Estimate <dbl> | Std. Error <dbl> | t value <dbl> | Pr(>|t|) <dbl> | Munic <chr> | |
---|---|---|---|---|---|
1 | -2.2893272 | 1.5732347 | -1.4551721 | 0.145700514 | factor(naziv_Opcine)B.Petrovac |
2 | 2.5966437 | 1.2492045 | 2.0786379 | 0.037714575 | factor(naziv_Opcine)Banovici |
3 | 1.9539611 | 0.9006611 | 2.1694742 | 0.030105708 | factor(naziv_Opcine)Banja Luka |
4 | 2.6419522 | 0.9981571 | 2.6468299 | 0.008157034 | factor(naziv_Opcine)Bihac |
5 | 0.2377553 | 0.9089724 | 0.2615649 | 0.793670449 | factor(naziv_Opcine)Bijeljina |
6 | 1.9058101 | 1.5730433 | 1.2115433 | 0.225759193 | factor(naziv_Opcine)Bratunac |
factor(Munic)
Munic1 <- sapply(strsplit(Munic, split=')', fixed=TRUE), function(x) (x[2]))
Munic1
## [1] "B.Petrovac" "Banovici" "Banja Luka" "Bihac" "Bijeljina"
## [6] "Bratunac" "Brcko" "Breza" "Brod" "Bugojno"
## [11] "Busovaca" "Buzim" "C.Sarajevo" "Capljina" "Cazin"
## [16] "Celic" "Celinac" "Citluk" "D.Vakuf" "Derventa"
## [21] "Doboj" "Doboj-Istok" "Drvar" "Foca - RS" "Fojnica"
## [26] "G.Vakuf" "Gacko" "Glamoc" "Gorazde" "Gracanica"
## [31] "Grad Mostar" "Gradacac" "Gradiska" "Grude" "I.Ilidza"
## [36] "Ilidza" "Ilijas" "Jajce" "K.Dubica" "Kakanj"
## [41] "Kalesija" "Kiseljak" "Kladanj" "Kljuc" "Knezevo"
## [46] "Konjic" "Kotor Varos" "Kresevo" "Laktasi" "Livno"
## [51] "Lopare" "Lukavac" "Ljubuski" "Maglaj" "Modrica"
## [56] "N.G.Sarajevo" "N.Gorazde" "N.Sarajevo" "N.Travnik" "Nevesinje"
## [61] "Novi Grad" "Orasje" "Pale" "Posusje" "Prijedor"
## [66] "Prnjavor" "Prozor" "Ribnik" "Rogatica" "Rudo"
## [71] "S.Brijeg" "S.G.Sarajevo" "Samac" "Sanski Most" "Sokolac"
## [76] "Srbac" "Srebrenik" "Stolac" "Tesanj" "Teslic"
## [81] "Tomislavgrad" "Travnik" "Trebinje" "Tuzla" "Ugljevik"
## [86] "V.Kladusa" "Visegrad" "Visoko" "Vitez" "Vlasenica"
## [91] "Vogosca" "Zavidovici" "Zenica" "Zepce" "Zivinice"
## [96] "Zvornik"
model.coef.empl_p2$Munic1 <- Munic1
add B.Krupa to dataframe
model.coef.empl_p2[nrow(model.coef.empl_p2) + 1,] = c(0, NA, NA, NA,"B.Krupa","B.Krupa" )
model.coef.empl_p2$Estimate <- as.numeric(model.coef.empl_p2$Estimate)
top10.m.empl_p2 <- model.coef.empl_p2 %>%
dplyr::select(Estimate, Munic1) %>%
arrange (desc(Estimate))%>%
head(10) #top ten municipalities. ovaj mi se cak cini mogucnijim nego ono sa N.gorazdem sto je bilo u prvoj verziji
top10.m.empl_p2
Estimate <dbl> | Munic1 <chr> | |||
---|---|---|---|---|
1 | 3.829329 | N.Gorazde | ||
2 | 3.592089 | Ljubuski | ||
3 | 3.355066 | Citluk | ||
4 | 3.325767 | Stolac | ||
5 | 3.224381 | S.Brijeg | ||
6 | 3.214685 | Capljina | ||
7 | 3.074944 | Doboj-Istok | ||
8 | 2.893546 | Busovaca | ||
9 | 2.842858 | Gradiska | ||
10 | 2.816668 | Tomislavgrad |
bottom10.m.empl_p2 <- model.coef.empl_p2 %>%
dplyr::select(Estimate, Munic1) %>%
arrange (Estimate) %>%
head(10) #top ten municipalities
bottom10.m.empl_p2
Estimate <dbl> | Munic1 <chr> | |||
---|---|---|---|---|
1 | -2.2893272 | B.Petrovac | ||
2 | -2.0919390 | Visegrad | ||
3 | -1.2929704 | Glamoc | ||
4 | -1.1046235 | Rogatica | ||
5 | -0.8290144 | I.Ilidza | ||
6 | -0.8021201 | Pale | ||
7 | -0.7227797 | Breza | ||
8 | -0.7011910 | Sokolac | ||
9 | -0.6423342 | Novi Grad | ||
10 | -0.3962648 | Drvar |
library(openxlsx)
wb = createWorkbook()
addWorksheet(wb, "estimates.WINNING.MODEL_p2.age") #ovo je naziv sheeta
addWorksheet(wb, "estimates.TRANSP.MODEL2") #ovo je naziv sheeta
writeData(wb,"estimates.WINNING.MODEL_p2.age", model.coef.empl)
writeData(wb,"estimates.TRANSP.MODEL2", model.coef.empl_p2)
saveWorkbook(wb, "estimates.transport.hbs.cost.empl.01.8.xlsx", overwrite = T)