--------------------------------------------------------------------------------------------------- name: log: I:\MO-AVD\5009 MikroReg\WP7 Piloter\Survey\2023\Bomring kunnskap\Toll Road knowledge l > og file.log log type: text opened on: 7 Jan 2025, 17:31:23 . cls . clear all . . // Run a script that cleans and imports the dataset. . do "I:\MO-AVD\5009 MikroReg\WP7 Piloter\Survey\2023\databehandling_mikroreg_2023.do" . version 17 . clear all . cls . . // Import . cd "I:\MO-AVD\5009 MikroReg\WP7 Piloter\Survey\2023\Originalt datasett\31d2767f-1be1-44a2-9f6c-9d > 5690b966ee\" I:\MO-AVD\5009 MikroReg\WP7 Piloter\Survey\2023\Originalt datasett\31d2767f-1be1-44a2-9f6c-9d5690b9 > 66ee . import spss using "5009 MikroReg brukersurvey 2023.sav", case(lower) note: invalid numeric format % (274 vars, 1,265 obs) . . . // Var name changes . rename _v1 surveydesign_id . rename _v2 epost_id . drop _v3 . rename _v4 date_start . rename _v5 time_1 . drop if _v6 == "lars2" (1 observation deleted) . drop _v6 . rename _v7 født . rename _v8 postnr . rename _v9 aannet_bruker_delt . rename _v10 aannet_bruker_privateid . rename _v11 aleid_formal_annet . rename _v12 aleid_hvorfor_annet . rename _v13 aleid_sistetur_annet . rename _v14 aleid_sisttur_erstatt_ss . rename _v15 aleid_sisttur_endre . rename _v16 aleid_sisttur_endre_annet . rename _v17 aleid_sisttur_erstattermode_an . rename _v18 apriv_formal_annet . rename _v19 apriv_hvorfor_14_annet . rename _v20 apriv_sisttur_tilmode_annet . rename _v21 apriv_sistetur_erstatt_del . rename _v22 apriv_sistetur_erstatt_del_annet . rename _v23 apriv_sisttur_endrereisekjede_an . rename _v24 apriv_sisttur_erstattermode_an . rename _v25 aelsyk_formal_annet . rename _v26 aelsyk_hvorfor_annet . rename _v27 aelsyk_sisttur_tilmode_annet . rename _v28 aelsyk_sisttur_erstatter_del . rename _v29 aelsyk_sisttur_erstatter_del_an . rename _v30 aelsyk_sisttur_endrereisek__an . rename _v31 aelsyk_sisttur_erstattermode_an . drop aopen_flere_store_1 . drop aopen_flere_store_2 . rename _v32 aopen_flere_store . rename _v33 anatten_erstattet_annet . rename _v34 abomp_1 . rename _v35 abomp_2 . rename _v36 date_end . rename _v37 time_2 . rename _v38 kommentarer . rename abomp_3 abomp_timeregel . rename abomp_4 abomp_makstak . rename abomp_5n1 abomp_start_mor_rush . rename bbomp_5n1 abomp_slutt_mor_rush . rename abomp_6n1 abomp_start_kvld_rush . rename bbomp_6n1 abomp_slutt_kvld_rush . drop responsedate weight aid_1 . drop ageof_paavirket_5 . . // Check time to complete survey . tostring time_* date*, replace // Transform origin date to string time_1 was long now str6 time_2 was long now str6 date_start was long now str8 date_end was long now str8 . . foreach v of varlist time_* { 2. replace `v' = "0" + `v' if length(`v') < 6 3. replace `v' = "0" + `v' if length(`v') < 6 4. replace `v' = "0" + `v' if length(`v') < 6 5. replace `v' = "0" + `v' if length(`v') < 6 6. replace `v' = "0" + `v' if length(`v') < 6 7. replace `v' = "0" + `v' if length(`v') < 6 8. } // Adds a zero to the start of the string while it has less than 6 letters, transforming for > example "10" to "0010" to get an actual clock-format. (216 real changes made) (6 real changes made) (1 real change made) (0 real changes made) (0 real changes made) (0 real changes made) (214 real changes made) (9 real changes made) (1 real change made) (0 real changes made) (0 real changes made) (0 real changes made) . . gen date_time_start_str = date_start + time_1 . gen date_time_end_str = date_end + time_2 . gen double date_time_start = clock(date_time_start_str, "YMDhms") . gen double date_time_end = clock(date_time_end_str, "YMDhms") . gen survey_time_min = ((date_time_end - date_time_start) / 1000) / 60 . format %tc date_time_start . format %tc date_time_end . drop date_time_start_str date_time_end_str . . // Recode email source to asource . gen bruker_num = substr(epost_id, 7, 5) (776 missing values generated) . destring bruker_num, replace bruker_num: all characters numeric; replaced as int (776 missing values generated) . recode asource (. = 8) if bruker_num < 19999 (193 changes made to asource) . recode asource (. = 9) if bruker_num > 19999 & bruker_num < 99999999999999999 (295 changes made to asource) . label define labels3 9 "Tidligere epostliste 2022", add . . . **** Clean data. . // Drop participants . drop if strpos(kommentarer, "Lars Even") (2 observations deleted) . drop if strpos(kommentarer, "Nils Fearnley") (1 observation deleted) . drop if date_start == "20231012" // Pretty sure the survey had not been launched at this point. (1 observation deleted) . drop if aover16 == 2 // Drop if you state you are under 16. (3 observations deleted) . drop if aunder16 == 1 & aover16 == . // Drop if you somehow skip the under or over 16 confirmatio > n question. One participant has some demographical data, not sure how that happened. Probably som > e back-button shenanigans. (29 observations deleted) . drop if aleid_formal_annet == "på vei hjem til deg for å knulle dama di" // Although I can confir > m intercourse with my partner is indeed a worthwhile purpose, the rest of the responses are nonse > nsical, and thus removed from the sample (1 observation deleted) . // There are some participants with a somewhat fast response time, but they are not THAT fast. Ad > ditionally, most very fast times didnt respond to that much because they didnt ride e-scooters/bi > kes. . replace kommentarer = "." if strpos(kommentarer, "Kanskje et kurs hos undertegnede ") // Or maybe > the guy suggesting we take a course by him shouldnt reveal his name in a open field survey. (1 real change made) . . // Recode some responses . // From missing to other . recode aforerkort_* (. = 0) // Give all values with missing zero, so people that did NOT indicate > they had something does not have it. (216 changes made to aforerkort_1) (988 changes made to aforerkort_2) (726 changes made to aforerkort_3) (1,039 changes made to aforerkort_4) (1,227 changes made to aforerkort_5) . //Lable missing . recode postnr (0 = .) (70 changes made to postnr) . recode apromillen1 apromillen2 atrafikaltgrunnkurs aleid_sisttur_hjelm apriv_sisttur_hjelm aelsyk > _sisttur_hjelm aelsyk_sisttur_hjelm anatten_brukt abruk_annen_deling_eier_2n1 abruk_annen_deling_ > eier_2n2 abruk_annen_deling_eier_2n3 abruk_annen_deling_eier_2n4 abruk_annen_deling_eier_2n5 aper > iodebillett aruter_integrasjonn1 aruter_integrasjonn2 (3 = .) (62 changes made to apromillen1) (62 changes made to apromillen2) (12 changes made to atrafikaltgrunnkurs) (23 changes made to aleid_sisttur_hjelm) (4 changes made to apriv_sisttur_hjelm) (7 changes made to aelsyk_sisttur_hjelm) (7 changes made to aelsyk_sisttur_hjelm) (36 changes made to anatten_brukt) (107 changes made to abruk_annen_deling_eier_2n1) (93 changes made to abruk_annen_deling_eier_2n2) (78 changes made to abruk_annen_deling_eier_2n3) (51 changes made to abruk_annen_deling_eier_2n4) (54 changes made to abruk_annen_deling_eier_2n5) (31 changes made to aperiodebillett) (20 changes made to aruter_integrasjonn1) (64 changes made to aruter_integrasjonn2) . recode akjonn aleid_sisttur_area apriv_sisttur_area aelsyk_sisttur_area (4 = .) (5 changes made to akjonn) (4 changes made to aleid_sisttur_area) (3 changes made to apriv_sisttur_area) (4 changes made to aelsyk_sisttur_area) . recode aeietilgang (5 = .) (9 changes made to aeietilgang) . recode aantalluhell atilgangn2 aleid_sisttur_lengde apriv_sisttur_lengde aelsyk_sisttur_lengde (6 > = .) (2 changes made to aantalluhell) (6 changes made to atilgangn2) (3 changes made to aleid_sisttur_lengde) (2 changes made to apriv_sisttur_lengde) (5 changes made to aelsyk_sisttur_lengde) . recode aleid_sisttur_lengesiden apriv_sisttur_lengesiden aelsyk_sisttur_lengesiden (7 = .) (5 changes made to aleid_sisttur_lengesiden) (27 changes made to apriv_sisttur_lengesiden) (34 changes made to aelsyk_sisttur_lengesiden) . recode autdanning ahovedaktivitet aleid_formal apriv_formal aelsyk_formal aleid_avstand_start_sis > ttur apastander_integrasjonn1 apastander_integrasjonn2 apastander_integrasjonn3 apastander_integr > asjonn4 apastander_integrasjonn5 apastander_integrasjonn6 apastander_integrasjonn7 apastander_int > egrasjonn8 agoef_opplevdn1 agoef_opplevdn2 agoef_opplevdn3 agoef_opplevdn4 agoef_opplevdn5 aelspa > rkesykkeltilbudet autvalg_regelverkn1 autvalg_regelverkn2 autvalg_regelverkn3 amarked_mengden1 am > arked_mengden2 amarked_mengden3 amarked_viktign1 amarked_viktign2 amarked_viktign3 amarked_viktig > n4 amarked_viktign5 amarked_viktign6 amarked_viktign7 (8 = .) (13 changes made to autdanning) (16 changes made to ahovedaktivitet) (12 changes made to aleid_formal) (1 changes made to apriv_formal) (6 changes made to aelsyk_formal) (10 changes made to aleid_avstand_start_sisttur) (111 changes made to apastander_integrasjonn1) (93 changes made to apastander_integrasjonn2) (97 changes made to apastander_integrasjonn3) (89 changes made to apastander_integrasjonn4) (59 changes made to apastander_integrasjonn5) (74 changes made to apastander_integrasjonn6) (96 changes made to apastander_integrasjonn7) (100 changes made to apastander_integrasjonn8) (8 changes made to agoef_opplevdn1) (18 changes made to agoef_opplevdn2) (12 changes made to agoef_opplevdn3) (27 changes made to agoef_opplevdn4) (16 changes made to agoef_opplevdn5) (165 changes made to aelsparkesykkeltilbudet) (177 changes made to autvalg_regelverkn1) (83 changes made to autvalg_regelverkn2) (225 changes made to autvalg_regelverkn3) (122 changes made to amarked_mengden1) (178 changes made to amarked_mengden2) (42 changes made to amarked_mengden3) (55 changes made to amarked_viktign1) (76 changes made to amarked_viktign2) (38 changes made to amarked_viktign3) (40 changes made to amarked_viktign4) (59 changes made to amarked_viktign5) (57 changes made to amarked_viktign6) (39 changes made to amarked_viktign7) . // Change answers . recode aelsyk_sisttur_erstatter_del (. = 1) if aelsyk_sisttur_erstatter_del_an == "Løpt" // Recod > e the "løpt" in open text response to precoded "gått", not different enough to warrant a seperat > e category. (1 changes made to aelsyk_sisttur_erstatter_del) . recode aleid_formal (. = 7) if aleid_formal_annet == "Henting barnehage" // Picking up from kinde > rgarden is an errand. (1 changes made to aleid_formal) . recode aleid_formal (. = 1) if aleid_formal_annet == "Til kurs senter" // Close enough to school (1 changes made to aleid_formal) . recode aleid_formal (. = 3) if aleid_formal_annet == "Til sentrum for å delta i demonstrasjon ute > nfor Stortinget" // Protesting close enough to a free time activity. (1 changes made to aleid_formal) . recode apriv_formal (. = 6) if apriv_formal_annet == "Bare kjøre rundt på natten uten mål eller m > ening i timevis." // No purpose is fun purpose. (1 changes made to apriv_formal) . recode apriv_formal (. = 7) if aelsyk_formal_annet == "For å levere bil på verksted" // Deliverin > g car to meachanic is a errand. (0 changes made to apriv_formal) . recode aelsyk_formal (. = 6) if aelsyk_formal_annet == "Bare for å teste det" // Testing is just > for fun (1 changes made to aelsyk_formal) . recode aelsyk_formal (. = 7) if aelsyk_formal_annet == "Butikken til og fra" // Shopping is an er > rand (1 changes made to aelsyk_formal) . recode aelsyk_formal (. = 7) if aelsyk_formal_annet == "Henting barnehage" // Picking up in kinde > rgarden is an errand (1 changes made to aelsyk_formal) . recode aleid_hvorfor_9 (. = 1) if aleid_hvorfor_annet == "Bussene hadde sluttet å gå for kvelden" (1 changes made to aleid_hvorfor_9) . recode aleid_hvorfor_1 (. = 1) if aleid_hvorfor_annet == "Gir også mulighet til å gå til jobben o > g bruke elsparkesykkel ved dårlig tid" (0 changes made to aleid_hvorfor_1) . recode aleid_hvorfor_1 (. = 1) if aleid_hvorfor_annet == "Hadde dårlig tid" (0 changes made to aleid_hvorfor_1) . recode aleid_hvorfor_9 (. = 1) if aleid_hvorfor_annet == "Kollektivproblemer" (1 changes made to aleid_hvorfor_9) . recode aleid_hvorfor_1 (. = 1) if aleid_hvorfor_annet == "Lenge å vente på kollektivtransport" (0 changes made to aleid_hvorfor_1) . recode aleid_hvorfor_1 (. = 1) if aleid_hvorfor_annet == "Lenge å vente på offentlig kommunikasjo > n" (0 changes made to aleid_hvorfor_1) . recode aleid_hvorfor_1 (. = 1) if aleid_hvorfor_annet == "Måtte rekke møte. Sparte ca 20 minutter > på å ta elsparkesykkel" (0 changes made to aleid_hvorfor_1) . recode aleid_hvorfor_1 (. = 1) if aleid_hvorfor_annet == "Raskt, effektivt og fikk frisk luft" (1 changes made to aleid_hvorfor_1) . recode aleid_hvorfor_1 (. = 1) if aleid_hvorfor_annet == "ville ikke rukket timeavtale uten" (0 changes made to aleid_hvorfor_1) . // Insert "no" response if was presented item. . foreach v of varlist aleid_hvorfor_1 aleid_hvorfor_2 aleid_hvorfor_3 aleid_hvorfor_4 aleid_hvorfo > r_5 aleid_hvorfor_6 aleid_hvorfor_7 aleid_hvorfor_8 aleid_hvorfor_9 aleid_hvorfor_10 aleid_hvorfo > r_11 { 2. recode `v' (. = 0) if aleid_sisttur_lengesiden <= 3 3. } (147 changes made to aleid_hvorfor_1) (832 changes made to aleid_hvorfor_2) (782 changes made to aleid_hvorfor_3) (452 changes made to aleid_hvorfor_4) (504 changes made to aleid_hvorfor_5) (766 changes made to aleid_hvorfor_6) (832 changes made to aleid_hvorfor_7) (861 changes made to aleid_hvorfor_8) (776 changes made to aleid_hvorfor_9) (756 changes made to aleid_hvorfor_10) (887 changes made to aleid_hvorfor_11) . foreach v of varlist apriv_hvorfor_1 apriv_hvorfor_2 apriv_hvorfor_3 apriv_hvorfor_4 apriv_hvorfo > r_5 apriv_hvorfor_6 apriv_hvorfor_7 apriv_hvorfor_8 apriv_hvorfor_9 apriv_hvorfor_10 apriv_hvorfo > r_11 { 2. recode `v' (. = 0) if apriv_sisttur_lengesiden <= 3 3. } (43 changes made to apriv_hvorfor_1) (110 changes made to apriv_hvorfor_2) (87 changes made to apriv_hvorfor_3) (63 changes made to apriv_hvorfor_4) (83 changes made to apriv_hvorfor_5) (93 changes made to apriv_hvorfor_6) (111 changes made to apriv_hvorfor_7) (108 changes made to apriv_hvorfor_8) (103 changes made to apriv_hvorfor_9) (95 changes made to apriv_hvorfor_10) (113 changes made to apriv_hvorfor_11) . foreach v of varlist aelsyk_hvorfor_1 aelsyk_hvorfor_2 aelsyk_hvorfor_3 aelsyk_hvorfor_4 aelsyk_h > vorfor_5 aelsyk_hvorfor_6 aelsyk_hvorfor_7 aelsyk_hvorfor_8 aelsyk_hvorfor_9 aelsyk_hvorfor_10 ae > lsyk_hvorfor_11 { 2. recode `v' (. = 0) if aelsyk_sisttur_lengesiden <= 3 3. } (69 changes made to aelsyk_hvorfor_1) (192 changes made to aelsyk_hvorfor_2) (180 changes made to aelsyk_hvorfor_3) (130 changes made to aelsyk_hvorfor_4) (131 changes made to aelsyk_hvorfor_5) (189 changes made to aelsyk_hvorfor_6) (199 changes made to aelsyk_hvorfor_7) (200 changes made to aelsyk_hvorfor_8) (193 changes made to aelsyk_hvorfor_9) (174 changes made to aelsyk_hvorfor_10) (205 changes made to aelsyk_hvorfor_11) . . . recode aleid_sisttur_erstattermode (. = 1) if aleid_sisttur_erstattermode_an == "Som etterkommer > av dessertgenerasjonen ville jeg måttet gå" (1 changes made to aleid_sisttur_erstattermode) . recode aleid_sisttur_endrereisekjede (. = 3) if aleid_sisttur_endre_annet == "Kollektiv og gange" (1 changes made to aleid_sisttur_endrereisekjede) . recode aleid_sisttur_endrereisekjede (. = 6) if aleid_sisttur_endre_annet == "Tatt tog en stasjon > lenger og så gått" (1 changes made to aleid_sisttur_endrereisekjede) . recode apriv_hvorfor_7 (. = 1) if apriv_hvorfor_14_annet == "Burde vært parkeringsområde ved soma > kapell" (0 changes made to apriv_hvorfor_7) . recode aelsyk_sisttur_erstatter_del (. = 1) if aelsyk_sisttur_erstatter_del_an == "Løpt" (0 changes made to aelsyk_sisttur_erstatter_del) . foreach v of varlist ageof_paavirket_1 ageof_paavirket_2 ageof_paavirket_3 ageof_paavirket_4 { 2. recode `v' (. = 0) if ageof_kjennskap == 1 & abrukt_delt != 1 3. } (328 changes made to ageof_paavirket_1) (519 changes made to ageof_paavirket_2) (773 changes made to ageof_paavirket_3) (898 changes made to ageof_paavirket_4) . recode atrafikaltgrunnkurs (. = 1) if aforerkort_1 == 1 | aforerkort_2 == 1 | aforerkort_3 == 1 / > / Everyone with a licence has this course. (1,039 changes made to atrafikaltgrunnkurs) . recode atrafikaltgrunnkurs aruter_integrasjonn1 aruter_integrasjonn2 (2 = 0) // Change so 1 is YE > S and 0 is NO (55 changes made to atrafikaltgrunnkurs) (333 changes made to aruter_integrasjonn1) (193 changes made to aruter_integrasjonn2) . . // Generate new variables . gen alder = 2023 - født // Generate an age measure. About half a year off, as year of birth is no > t the same as age, but should not matter much. . gen uhell = 0 . replace uhell = aantalluhell if aantalluhell < 100 (204 real changes made) . gen fyllekjørt_før_2022 = (apromillen1 * -1) + 2 // Turn so 1 is yes and 0 is no. (94 missing values generated) . gen fyllekjørt_etter_2022 = (apromillen2 * -1) + 2 (94 missing values generated) . gen bruker_oslo_delt = 1 if abruker_delt == 13 // Make a dictonomous for Oslo (527 missing values generated) . recode bruker_oslo_delt (. = 0) if abruker_delt != . (458 changes made to bruker_oslo_delt) . gen bruker_oslo_privateid = 1 if abruker_privateid == 13 // Also for privately owned (1,044 missing values generated) . recode bruker_oslo_privateid (. = 0) if abruker_privateid != . (241 changes made to bruker_oslo_privateid) . bysort abruker_delt: egen place_freq = total(abruker_delt) // Make a variable counting the number > of respondents from the same place . replace place_freq = place_freq / abruker_delt (1,213 real changes made, 69 to missing) . //Weights for usage. Not ideal, but worthwhile. . gen leid_bruk_vekt = 0 . replace leid_bruk_vekt = 3 if abrukt_delt == 2 (118 real changes made) . replace leid_bruk_vekt = 8 if abrukt_delt == 3 (103 real changes made) . replace leid_bruk_vekt = 15.5 if abrukt_delt == 4 (144 real changes made) . replace leid_bruk_vekt = 35.5 if abrukt_delt == 5 (266 real changes made) . replace leid_bruk_vekt = 75 if abrukt_delt == 6 (548 real changes made) . gen priv_bruk_vekt = 0 . replace priv_bruk_vekt = 3 if abrukt_privateid == 2 (204 real changes made) . replace priv_bruk_vekt = 8 if abrukt_privateid == 3 (46 real changes made) . replace priv_bruk_vekt = 15.5 if abrukt_privateid == 4 (39 real changes made) . replace priv_bruk_vekt = 35.5 if abrukt_privateid == 5 (57 real changes made) . replace priv_bruk_vekt = 75 if abrukt_privateid == 6 (118 real changes made) . gen elsyk_bruk_vekt = 0 . replace elsyk_bruk_vekt = 3 if abrukt_elsyk == 2 (252 real changes made) . replace elsyk_bruk_vekt = 8 if abrukt_elsyk == 3 (60 real changes made) . replace elsyk_bruk_vekt = 15.5 if abrukt_elsyk == 4 (48 real changes made) . replace elsyk_bruk_vekt = 35.5 if abrukt_elsyk == 5 (42 real changes made) . replace elsyk_bruk_vekt = 75 if abrukt_elsyk == 6 (72 real changes made) . //Total exp in escooters . gen tot_exp_escoot = 0 . replace tot_exp_escoot = tot_exp_escoot + abruk_leidn1 if abruk_leidn1 != . //Add this exp measur > e if its not missing. (1,178 real changes made) . replace tot_exp_escoot = tot_exp_escoot + abruk_leidn2 if abruk_leidn2 != . (1,178 real changes made) . replace tot_exp_escoot = tot_exp_escoot + abruk_privateidn1 if abruk_privateidn1 != . (463 real changes made) . replace tot_exp_escoot = tot_exp_escoot + abruk_privateidn2 if abruk_privateidn2 != . (463 real changes made) . // Usage of shared things score. . gen shared_use = 0 . foreach v of varlist abruk_annen_deling_eier_2n1 abruk_annen_deling_eier_2n2 abruk_annen_deling_e > ier_2n3 abruk_annen_deling_eier_2n4 abruk_annen_deling_eier_2n5 { 2. replace shared_use = shared_use + 1 if `v' == 1 3. } (404 real changes made) (280 real changes made) (36 real changes made) (536 real changes made) (159 real changes made) . // Replacement variable borrowed escooter . gen leid_replacement = . (1,227 missing values generated) . replace leid_replacement = 1 if aleid_sisttur_erstattereise == 3 | aleid_sisttur_erstattermode == > 7 // Ikke reist (13 real changes made) . replace leid_replacement = 2 if aleid_sisttur_erstattereise == 4 | aleid_sisttur_erstattermode == > 8 // Annet sted (3 real changes made) . replace leid_replacement = 3 if aleid_sisttur_erstatt_ss == 1 | aleid_sisttur_endrereisekjede == > 6 | aleid_sisttur_erstattermode == 1 // Gått (455 real changes made) . replace leid_replacement = 4 if aleid_sisttur_erstatt_ss == 2 | aleid_sisttur_endrereisekjede == > 5 | aleid_sisttur_erstattermode == 2 // Syklet (27 real changes made) . replace leid_replacement = 5 if aleid_sisttur_erstatt_ss == 3 | aleid_sisttur_endrereisekjede == > 1 | aleid_sisttur_erstattermode == 3 // Privat elsparkesykkel (13 real changes made) . replace leid_replacement = 6 if aleid_sisttur_erstatt_ss == 4 | aleid_sisttur_endrereisekjede == > 4 | aleid_sisttur_erstattermode == 4 // Kollektivt (262 real changes made) . replace leid_replacement = 7 if aleid_sisttur_erstatt_ss == 5 | aleid_sisttur_endrereisekjede == > 2 | aleid_sisttur_erstattermode == 5 // Bil (52 real changes made) . replace leid_replacement = 8 if aleid_sisttur_erstatt_ss == 6 | aleid_sisttur_endrereisekjede == > 3 | aleid_sisttur_erstattermode == 6 // Taxi (39 real changes made) . label define replacements 1 "Aborted travel" 2 "Somewhere else" 3 "Walked" 4 "Biked" 5 "Private e > scooter" 6 "Public transportation" 7 "Car" 8 "Taxi" 9 "Borrowed escooter" // Generate a label for > the above . label values leid_replacement replacements // Apply the label . // Replacement variable private escooter . gen priv_replacement = . (1,227 missing values generated) . replace priv_replacement = 1 if apriv_sisttur_erstattereise == 3 | apriv_sisttur_erstattermode == > 7 // Ikke reist (4 real changes made) . replace priv_replacement = 2 if apriv_sisttur_erstattereise == 4 | apriv_sisttur_erstattermode == > 8 // Annet sted (1 real change made) . replace priv_replacement = 3 if apriv_sistetur_erstatt_del == 1 | apriv_sisttur_endrereisekjede = > = 6 | apriv_sisttur_erstattermode == 1 // Gått (24 real changes made) . replace priv_replacement = 4 if apriv_sistetur_erstatt_del == 2 | apriv_sisttur_endrereisekjede = > = 5 | apriv_sisttur_erstattermode == 2 // Syklet (12 real changes made) . replace priv_replacement = 9 if apriv_sistetur_erstatt_del == 3 | apriv_sisttur_endrereisekjede = > = 1 | apriv_sisttur_erstattermode == 4 // Leid elsparkesykkel (12 real changes made) . replace priv_replacement = 6 if apriv_sistetur_erstatt_del == 4 | apriv_sisttur_endrereisekjede = > = 4 | apriv_sisttur_erstattermode == 3 // Kollektivt (20 real changes made) . replace priv_replacement = 7 if apriv_sistetur_erstatt_del == 5 | apriv_sisttur_endrereisekjede = > = 2 | apriv_sisttur_erstattermode == 5 // Bil (25 real changes made) . replace priv_replacement = 8 if apriv_sistetur_erstatt_del == 6 | apriv_sisttur_endrereisekjede = > = 3 | apriv_sisttur_erstattermode == 6 // Taxi (3 real changes made) . label values priv_replacement replacements // Apply the label . // Replacement variable borrowed ebike . gen elsyk_replacement = . (1,227 missing values generated) . replace elsyk_replacement = 1 if aelsyk_sisttur_erstattereise == 3 | aelsyk_sisttur_erstattermode > == 8 // Ikke reist (4 real changes made) . replace elsyk_replacement = 2 if aelsyk_sisttur_erstattereise == 4 | aelsyk_sisttur_erstattermode > == 9 // Annet sted (2 real changes made) . replace elsyk_replacement = 3 if aelsyk_sisttur_erstatter_del == 1 | aelsyk_sisttur_endrereisekje > de == 7 | aelsyk_sisttur_erstattermode == 1 // Gått (70 real changes made) . replace elsyk_replacement = 4 if aelsyk_sisttur_erstatter_del == 2 | aelsyk_sisttur_endrereisekje > de == 6 | aelsyk_sisttur_erstattermode == 2 // Syklet (6 real changes made) . replace elsyk_replacement = 5 if aelsyk_sisttur_erstatter_del == 4 | aelsyk_sisttur_endrereisekje > de == 2 | aelsyk_sisttur_erstattermode == 4 // Privat elsparkesykkel (2 real changes made) . replace elsyk_replacement = 9 if aelsyk_sisttur_erstatter_del == 3 | aelsyk_sisttur_endrereisekje > de == 1 | aelsyk_sisttur_erstattermode == 3 // Leid elsparkesykkel (23 real changes made) . replace elsyk_replacement = 6 if aelsyk_sisttur_erstatter_del == 5 | aelsyk_sisttur_endrereisekje > de == 5 | aelsyk_sisttur_erstattermode == 5 // Kollektivt (66 real changes made) . replace elsyk_replacement = 7 if aelsyk_sisttur_erstatter_del == 6 | aelsyk_sisttur_endrereisekje > de == 3 | aelsyk_sisttur_erstattermode == 6 // Bil (13 real changes made) . replace elsyk_replacement = 8 if aelsyk_sisttur_erstatter_del == 7 | aelsyk_sisttur_endrereisekje > de == 4 | aelsyk_sisttur_erstattermode == 7 // Taxi (12 real changes made) . label values elsyk_replacement replacements // Apply the label . . label variable aleid_hvorfor_1 "Det var raskest" . label variable aleid_hvorfor_2 "Det var mest pålitelig" . label variable aleid_hvorfor_3 "Det var billigst" . label variable aleid_hvorfor_4 "Det var mest fleksibelt" . label variable aleid_hvorfor_5 "Det var lettest tilgjengelig" . label variable aleid_hvorfor_6 "Jeg slapp å anstrenge meg" . label variable aleid_hvorfor_7 "Parkering gjorde det vanskelig å ta bil" . label variable aleid_hvorfor_8 "Jeg hadde ikke bil" . label variable aleid_hvorfor_9 "Kollektivtransport gikk ikke dit jeg skulle" . label variable aleid_hvorfor_10 "Det er gøy" . label variable aleid_hvorfor_11 "Det opplevdes tryggest" . . label variable apriv_hvorfor_1 "Det var raskest" . label variable apriv_hvorfor_2 "Det var mest pålitelig" . label variable apriv_hvorfor_3 "Det var billigst" . label variable apriv_hvorfor_4 "Det var mest fleksibelt" . label variable apriv_hvorfor_5 "Det var lettest tilgjengelig" . label variable apriv_hvorfor_6 "Jeg slapp å anstrenge meg" . label variable apriv_hvorfor_7 "Parkering gjorde det vanskelig å ta bil" . label variable apriv_hvorfor_8 "Jeg hadde ikke bil" . label variable apriv_hvorfor_9 "Kollektivtransport gikk ikke dit jeg skulle" . label variable apriv_hvorfor_10 "Det er gøy" . label variable apriv_hvorfor_11 "Det opplevdes tryggest" . . label variable aelsyk_hvorfor_1 "Det var raskest" . label variable aelsyk_hvorfor_2 "Det var mest pålitelig" . label variable aelsyk_hvorfor_3 "Det var billigst" . label variable aelsyk_hvorfor_4 "Det var mest fleksibelt" . label variable aelsyk_hvorfor_5 "Det var lettest tilgjengelig" . label variable aelsyk_hvorfor_6 "Jeg slapp å anstrenge meg" . label variable aelsyk_hvorfor_7 "Parkering gjorde det vanskelig å ta bil" . label variable aelsyk_hvorfor_8 "Jeg hadde ikke bil" . label variable aelsyk_hvorfor_9 "Kollektivtransport gikk ikke dit jeg skulle" . label variable aelsyk_hvorfor_10 "Det er gøy" . label variable aelsyk_hvorfor_11 "Det opplevdes tryggest" . . . // Generate a law knowledge variable . gen law_score = 0 . replace law_score = law_score + 1 if aregel_aldersgrense == 1 (417 real changes made) . replace law_score = law_score + 1 if aregel_hjelm == 3 (328 real changes made) . replace law_score = law_score + 1 if aregel_flere == 5 (1,177 real changes made) . replace law_score = law_score + 1 if aregel_promille == 1 (998 real changes made) . replace law_score = law_score + 1 if aregel_forsikring == 1 (878 real changes made) . replace law_score = law_score + 1 if aregel_parkering == 1 (704 real changes made) . replace law_score = law_score + 1 if aregel_parkering_utleie == 1 (631 real changes made) . . foreach v in aldersgrense hjelm flere promille forsikring parkering parkeringutleie { 2. gen law_`v' = 0 3. } . replace law_aldersgrense = 1 if aregel_aldersgrense == 1 (417 real changes made) . replace law_hjelm = 1 if aregel_hjelm == 3 (328 real changes made) . replace law_flere = 1 if aregel_flere == 5 (1,177 real changes made) . replace law_promille = 1 if aregel_promille == 1 (998 real changes made) . replace law_forsikring = 1 if aregel_forsikring == 1 (878 real changes made) . replace law_parkering = 1 if aregel_parkering == 1 (704 real changes made) . replace law_parkeringutleie = 1 if aregel_parkering_utleie == 1 (631 real changes made) . . // Make a geofence summary score . generate agoef_opplevdn1_r = 8 - agoef_opplevdn1 (334 missing values generated) . generate agoef_opplevdn3_r = 8 - agoef_opplevdn3 (338 missing values generated) . egen agoef_sum = rowmean(agoef_opplevdn1_r agoef_opplevdn2 agoef_opplevdn3_r agoef_opplevdn4 agoe > f_opplevdn5) (328 missing values generated) . . . . export spss using "I:\MO-AVD\5009 MikroReg\WP7 Piloter\Survey\2023\behandlet_datasett_2023.sav", > replace file I:\MO-AVD\5009 MikroReg\WP7 Piloter\Survey\2023\behandlet_datasett_2023.sav saved . save "I:\MO-AVD\5009 MikroReg\WP7 Piloter\2021 til 2023 samlet dataset\2023_dataset.dta", replace file I:\MO-AVD\5009 MikroReg\WP7 Piloter\2021 til 2023 samlet dataset\2023_dataset.dta saved . . **** Output **** . /* > // Demographics > tab akjonn > sum alder > tab autdanning > tab ahovedaktivitet > tab aforerkort_1 // Andel førerkort på bil > tab aforerkort_1 if alder > 18 // På de over 18 år. > tab asource > > //Use and counts > tab abrukt_delt > tab abrukt_privateid > tab abrukt_elsyk > count if aleid_sisttur_lengesiden <= 7 //Antall som har kjørt leid sparkesykkel de siste 3 mnd. > count if aleid_sisttur_lengesiden <= 3 //Antall som har kjørt leid sparkesykkel de siste 3 mnd. > count if apriv_sisttur_lengesiden <= 7 //Antall som har kjørt privateid sparkesykkel de siste 3 m > nd. > count if apriv_sisttur_lengesiden <= 3 //Antall som har kjørt privateid sparkesykkel de siste 3 m > nd. > count if aelsyk_sisttur_lengesiden <= 7 //Antall som har leid elsykkel de siste 3 mnd. > count if aelsyk_sisttur_lengesiden <= 3 //Antall som har leid elsykkel de siste 3 mnd. > > // Purpose of travels > tab aleid_formal > tab aleid_formal [iweight=leid_bruk_vekt] //Weighted by use. > tab apriv_formal [iweight=priv_bruk_vekt] > tab aelsyk_formal [iweight=elsyk_bruk_vekt] > > // Why choose this mode of transport > sum aleid_hvorfor_1 aleid_hvorfor_2 aleid_hvorfor_3 aleid_hvorfor_4 aleid_hvorfor_5 aleid_hvorfor > _6 aleid_hvorfor_7 aleid_hvorfor_8 aleid_hvorfor_9 aleid_hvorfor_10 aleid_hvorfor_11 // E-scotter > s > > // Description of last trip > // Shared escooter > tab aleid_sisttur_area > tab aleid_sisttur_lengde > tab aleid_avstand_start_sisttur > tab aleid_sisttur_hjelm > // Private escooter > tab apriv_sisttur_area > tab apriv_sisttur_lengde > tab apriv_sisttur_hjelm > // Borrowed ebikes > tab aelsyk_sisttur_area > tab aelsyk_sisttur_lengde > tab aelsyk_sisttur_hjelm > > // Erstattet siste tur > tab leid_replacement > tab priv_replacement > tab elsyk_replacement > > // Last mile? > tab aleid_sisttur_kombinert > tab apriv_sisttur_kombinert > tab aelsyk_sisttur_kombinert > > // Statements > sum apastander_integrasjonn1 apastander_integrasjonn2 apastander_integrasjonn3 apastander_integra > sjonn4 apastander_integrasjonn5 apastander_integrasjonn6 apastander_integrasjonn7 apastander_inte > grasjonn8 > > // Geofencing > sum ageof_paa* > sum agoef_opplevdn1 agoef_opplevdn2 agoef_opplevdn3 agoef_opplevdn4 agoef_opplevdn5 > > // Endringer > tabm aendringn1 aendringn2 aendringn3 aendringn4 aendringn5 aendringn6 aendringn7 aendringn8 aend > ringn9 aendringn10 aendringn11 aendringn12 aendringn13 > > //Bilhold > tab abilhold > > // Evalutation place > reg aelsparkesykkeltilbudet i.abruker_delt if place_freq > 50 // Weird way to get a mean, but hon > estly the simplest way to give the mean for all places with more than 50. Bysort sum is messy. by > sort abruker_delt: sum aelsparkesykkeltilbudet if place_freq > 50 > margins abruker_delt > > // Antall i steder. > reg autvalg_regelverkn1 i.abruker_delt if place_freq > 40 > margins abruker_delt > reg autvalg_regelverkn2 i.abruker_delt if place_freq > 40 > margins abruker_delt > reg autvalg_regelverkn3 i.abruker_delt if place_freq > 40 > margins abruker_delt > > // Ruter integrasjon > logistic aruter_integrasjonn1 i.abruker_delt // No difference between places > tab aruter_integrasjonn1 abruker_delt // Only Oslo has high enough n to reasonably report on > tab aruter_integrasjonn2 abruker_delt > > // Falls > nbreg uhell i.akjonn alder aforerkort_1 tot_exp_escoot, irr > nbreg uhell i.akjonn tot_exp_escoot, irr > nbreg uhell fyllekjørt_før_2022 fyllekjørt_etter_2022 tot_exp_escoot alder, irr > > // Market > sum amarked_viktign1 amarked_viktign2 amarked_viktign3 > sum aelsparkesykkeltilbudet if aelsparkesykkeltilbudet > > /* > // Law stuff > sum law_* > tab law_score end of do-file . cd "I:\MO-AVD\5009 MikroReg\WP7 Piloter\Survey\2023\Bomring kunnskap" I:\MO-AVD\5009 MikroReg\WP7 Piloter\Survey\2023\Bomring kunnskap . . // Drop the same people as the filter in the survey filters. Must live in Oslo, have a driving li > cence, and access to car. . keep if postnr > 0 & postnr < 1300 (649 observations deleted) . keep if aforerkort_1 == 1 (76 observations deleted) . keep if atilgangn1 <= 4 (83 observations deleted) . . keep abil_type aautopass abomp_1_1 abomp_1_2 abomp_1_3 abomp_1_4 abomp_1 abomp_2_1 abomp_2_2 abom > p_2_3 abomp_2_4 abomp_2 abomp_timeregel abomp_makstak abomp_start_mor_rush abomp_slutt_mor_rush a > bomp_start_kvld_rush abomp_slutt_kvld_rush akjonn alder autdanning atilgangn1 . . // Save and use a minimized dataset to follow the publication . save "I:\MO-AVD\5009 MikroReg\WP7 Piloter\Survey\2023\Bomring kunnskap\tollroad_knowledge_minimiz > ed_dataset.dta", replace file I:\MO-AVD\5009 MikroReg\WP7 Piloter\Survey\2023\Bomring kunnskap\tollroad_knowledge_minimized_dataset.dta saved . export delimited using "I:\MO-AVD\5009 MikroReg\WP7 Piloter\Survey\2023\Bomring kunnskap\minimize > d_dataset_toll_road_knowledge.csv", replace file I:\MO-AVD\5009 MikroReg\WP7 Piloter\Survey\2023\Bomring kunnskap\minimized_dataset_toll_road_k > nowledge.csv saved . use "I:\MO-AVD\5009 MikroReg\WP7 Piloter\Survey\2023\Bomring kunnskap\tollroad_knowledge_minimize > d_dataset.dta" . . // Recode dunno into missing . recode abil_type (. = .a) (4 = .) (10 changes made to abil_type) . recode aautopass (. = .a) (3 = .) (21 changes made to aautopass) . . // Recode toll items into different missig types . // . = normal missing did not answer . // .a = did not get item . // .b = did not want to answer . // .c = states that they dont know . . // Recode text to numbers . replace abomp_1 = "45" if abomp_1 == "40-50 kr" (1 real change made) . replace abomp_1 = "26" if abomp_1 == "26kr" (1 real change made) . replace abomp_1 = ".c" if abomp_1 == "For mye" (1 real change made) . replace abomp_1 = ".c" if abomp_1 == "Jævlig mye" (1 real change made) . replace abomp_1 = ".c" if abomp_1 == "Mye" (1 real change made) . . replace abomp_2 = ".c" if abomp_2 == "For mye" (2 real changes made) . replace abomp_2 = ".c" if abomp_2 == "Mye" (1 real change made) . replace abomp_2 = "25" if abomp_2 == "25?" (1 real change made) . . // Insert missing . replace abomp_1 = ".c" if abomp_1_2 == 1 (295 real changes made) . replace abomp_1 = ".b" if abomp_1_3 == 1 (6 real changes made) . replace abomp_1 = "." if abomp_1_4 == 1 (3 real changes made) . . replace abomp_2 = ".c" if abomp_2_2 == 1 (284 real changes made) . replace abomp_2 = ".b" if abomp_2_3 == 1 (6 real changes made) . replace abomp_2 = "." if abomp_2_4 == 1 (2 real changes made) . . // Convert to numbers . destring abomp_1, dpcomma replace abomp_1: all characters numeric; replaced as double (306 missing values generated) . destring abomp_2, dpcomma replace abomp_2: all characters numeric; replaced as double (296 missing values generated) . . // Drop these now that all information is in abomp_1 . drop abomp_1_1 abomp_1_2 abomp_1_3 abomp_1_4 abomp_2_1 abomp_2_2 abomp_2_3 abomp_2_4 . . // Recode some "dont wanna answer" into .b . recode abomp_timeregel abomp_makstak (4 = .b) (4 changes made to abomp_timeregel) (4 changes made to abomp_makstak) . recode abomp_slutt_mor_rush (2 = .b) (1 changes made to abomp_slutt_mor_rush) . recode abomp_start_kvld_rush (3 = .b) (1 changes made to abomp_start_kvld_rush) . recode abomp_slutt_kvld_rush (2 = .b) (1 changes made to abomp_slutt_kvld_rush) . . // Time questions. Generate a relative value so 0 is correct and 0.5 off is 30m off. . gen start_mor_rush_relative = . (419 missing values generated) . replace start_mor_rush_relative = (abomp_start_mor_rush - 11) / 2 // Correct is 06:30, we adjust > relative to 11 (312 real changes made) . replace start_mor_rush_relative = .c if abomp_start_mor_rush == 1 (111 real changes made, 111 to missing) . replace start_mor_rush_relative = .b if abomp_start_mor_rush == 2 (1 real change made, 1 to missing) . . gen slutt_mor_rush_relative = . (419 missing values generated) . replace slutt_mor_rush_relative = (abomp_slutt_mor_rush - 15) / 2 // Correct is 09:00, we adjust > relative to 15 (306 real changes made) . replace slutt_mor_rush_relative = .c if abomp_slutt_mor_rush == 1 (103 real changes made, 103 to missing) . replace slutt_mor_rush_relative = .b if abomp_slutt_mor_rush == 2 (0 real changes made) . . gen start_kvld_rush_relative = . (419 missing values generated) . replace start_kvld_rush_relative = (abomp_start_kvld_rush - 10) / 2 // Correct is 15:00, we adjus > t relative to 10 (317 real changes made) . replace start_kvld_rush_relative = .c if abomp_start_kvld_rush == 1 (122 real changes made, 122 to missing) . replace start_kvld_rush_relative = .b if abomp_start_kvld_rush == 3 (0 real changes made) . replace start_kvld_rush_relative = .c if abomp_start_kvld_rush == 2 // Count "never" as "dont kno > w". (3 real changes made, 3 to missing) . . gen slutt_kvld_rush_relative = . (419 missing values generated) . replace slutt_kvld_rush_relative = (abomp_slutt_kvld_rush - 13) / 2 // Correct is 17:00, we adjus > t relative to 13 (312 real changes made) . replace slutt_kvld_rush_relative = .c if abomp_slutt_kvld_rush == 1 (119 real changes made, 119 to missing) . replace slutt_kvld_rush_relative = .b if abomp_slutt_kvld_rush == 2 (0 real changes made) . . // Set correct price guesses for toll passings. . gen korr_pris_utaforoslo = . (419 missing values generated) . replace korr_pris_utaforoslo = 66 if abil_type == 1 & aautopass == 2 (6 real changes made) . replace korr_pris_utaforoslo = 58 if abil_type == 2 & aautopass == 2 (6 real changes made) . replace korr_pris_utaforoslo = 28 if abil_type == 3 & aautopass == 2 (4 real changes made) . replace korr_pris_utaforoslo = 52.80 if abil_type == 1 & aautopass == 1 (54 real changes made) . replace korr_pris_utaforoslo = 46.40 if abil_type == 2 & aautopass == 1 (131 real changes made) . replace korr_pris_utaforoslo = 22.40 if abil_type == 3 & aautopass == 1 (197 real changes made) . gen korr_pris_irushen = . // In rush prices (419 missing values generated) . replace korr_pris_irushen = 38 if abil_type == 1 & aautopass == 2 (6 real changes made) . replace korr_pris_irushen = 35 if abil_type == 2 & aautopass == 2 (6 real changes made) . replace korr_pris_irushen = 17 if abil_type == 3 & aautopass == 2 (4 real changes made) . replace korr_pris_irushen = 30.40 if abil_type == 1 & aautopass == 1 (54 real changes made) . replace korr_pris_irushen = 28.00 if abil_type == 2 & aautopass == 1 (131 real changes made) . replace korr_pris_irushen = 13.60 if abil_type == 3 & aautopass == 1 (197 real changes made) . . // Generate relative measures . gen diff_pris_utaforoslo = abomp_1 - korr_pris_utaforoslo (308 missing values generated) . gen diff_pris_irushen = abomp_2 - korr_pris_irushen (298 missing values generated) . // Put back inn nonstandard missing . replace diff_pris_utaforoslo = .b if abomp_1 == .b (6 real changes made, 6 to missing) . replace diff_pris_utaforoslo = .c if abomp_1 == .c (297 real changes made, 297 to missing) . replace diff_pris_irushen = .b if abomp_2 == .b (6 real changes made, 6 to missing) . replace diff_pris_irushen = .c if abomp_2 == .c (287 real changes made, 287 to missing) . . // Generate categories for price responses . generate diff_price_utaforoslo_cat = "missing" . replace diff_price_utaforoslo_cat = "I dont know" if diff_pris_utaforoslo == .c variable diff_price_utaforoslo_cat was str7 now str11 (297 real changes made) . replace diff_price_utaforoslo_cat = "More than 10" if abs(diff_pris_utaforoslo) < 1000000000 // T > his little bit of weird filtering is needed because Stata stores "missing" as a very large number > . variable diff_price_utaforoslo_cat was str11 now str12 (111 real changes made) . replace diff_price_utaforoslo_cat = "10" if abs(diff_pris_utaforoslo) <= 10 (47 real changes made) . replace diff_price_utaforoslo_cat = "5" if abs(diff_pris_utaforoslo) <= 5 (28 real changes made) . replace diff_price_utaforoslo_cat = "1" if abs(diff_pris_utaforoslo) <= 1 (2 real changes made) . . generate diff_price_irushen_cat = "missing" . replace diff_price_irushen_cat = "I dont know" if diff_pris_irushen == .c variable diff_price_irushen_cat was str7 now str11 (287 real changes made) . replace diff_price_irushen_cat = "More than 10" if abs(diff_pris_irushen) < 1000000000 variable diff_price_irushen_cat was str11 now str12 (121 real changes made) . replace diff_price_irushen_cat = "10" if abs(diff_pris_irushen) <= 10 (94 real changes made) . replace diff_price_irushen_cat = "5" if abs(diff_pris_irushen) <= 5 (64 real changes made) . replace diff_price_irushen_cat = "1" if abs(diff_pris_irushen) <= 1 (13 real changes made) . . // Generate uniform time values for Sankey figure. Here, all values will mean the same time. . gen abomp_start_mor_rush_uni = abomp_start_mor_rush + 3 (107 missing values generated) . recode abomp_start_mor_rush_uni (4 = 0) (5 = -1) (112 changes made to abomp_start_mor_rush_uni) . gen abomp_slutt_mor_rush_uni = abomp_slutt_mor_rush + 4 (113 missing values generated) . recode abomp_slutt_mor_rush_uni (5 = 0) (103 changes made to abomp_slutt_mor_rush_uni) . gen abomp_start_kvld_rush_uni = abomp_start_kvld_rush + 21 (102 missing values generated) . recode abomp_start_kvld_rush_uni (22 = 0) (23 = -1) (125 changes made to abomp_start_kvld_rush_uni) . gen abomp_slutt_kvld_rush_uni = abomp_slutt_kvld_rush + 22 (107 missing values generated) . recode abomp_slutt_kvld_rush_uni (23 = 0) (119 changes made to abomp_slutt_kvld_rush_uni) . . // Labels for figure purposes . label variable diff_pris_utaforoslo "Price guess difference trip whole Oslo" . label variable diff_pris_irushen "Price guess difference, single rush hour toll-road pass" . label variable start_mor_rush_relative "Difference in hours between actual and guessed time for s > tart of morning rush hour pricing" note: label truncated to 80 characters . label variable start_mor_rush_relative "Difference in hours between actual and guessed time for e > nd of morning rush hour pricing" note: label truncated to 80 characters . label variable start_mor_rush_relative "Difference in hours between actual and guessed time for s > tart of evening rush hour pricing" note: label truncated to 80 characters . label variable start_mor_rush_relative "Difference in hours between actual and guessed time for e > nd of evening rush hour pricing" note: label truncated to 80 characters . . label define time -1 "Never" 0 "I don't know" 1 "00:00" 2 "00:30" 3 "01:00" 4 "01:30" 5 "02:00" 6 > "02:30" 7 "03:00" 8 "03:30" 9 "04:00" 10 "04:30" 11 "05:00" 12 "05:30" 13 "06:00" 14 "06:30" 15 > "07:00" 16 "07:30" 17 "08:00" 18 "08:30" 19 "09:00" 20 "09:30" 21 "10:00" 22 "10:30" 23 "11:00" 2 > 4 "11:30" 25 "12:00" 26 "12:30" 27 "13:00" 28 "13:30" 29 "14:00" 30 "14:30" 31 "15:00" 32 "15:30" > 33 "16:00" 34 "16:30" 35 "17:00" 36 "17:30" 37 "18:00" 38 "18:30" 39 "19:00" 40 "19:30" 41 "20:0 > 0" 42 "20:30" 4 "21:00" 44 "21:30" 45 "22:00" 46 "22:30" 47 "23:00" 48 "23:30" . label values abomp_start_mor_rush_uni time . label values abomp_slutt_mor_rush_uni time . label values abomp_start_kvld_rush_uni time . label values abomp_slutt_kvld_rush_uni time . . . *************** Outputs*************** . // Demogrphic info . sum alder Variable | Obs Mean Std. dev. Min Max -------------+--------------------------------------------------------- alder | 419 45.93079 12.14575 19 77 . tab akjonn Du | identifiserer | deg som | Freq. Percent Cum. ---------------+----------------------------------- Mann | 297 71.39 71.39 Kvinne | 117 28.12 99.52 Annet | 2 0.48 100.00 ---------------+----------------------------------- Total | 416 100.00 . tab autdanning Hva er din høyeste fullførte | utdanning? | Freq. Percent Cum. ----------------------------------------+----------------------------------- Grunnskole | 7 1.67 1.67 Videregående, 1 til 2 år | 5 1.20 2.87 Videregående, 3 år | 33 7.89 10.77 Fag- eller svennebrev | 15 3.59 14.35 Fagskolenivå | 31 7.42 21.77 Bachelorgrad/cand.mag. eller tilsvarend | 148 35.41 57.18 Mastergrad/hovedfag eller høyere | 179 42.82 100.00 ----------------------------------------+----------------------------------- Total | 418 100.00 . tab atilgangn1 Eier du, eller har du tilgang til Bil | Freq. Percent Cum. ----------------------------------------+----------------------------------- Ja, jeg eier | 282 67.30 67.30 Ja, husholdningen har | 30 7.16 74.46 Ja, gjennom deleordninger (bysykkel, bi | 69 16.47 90.93 Ja, på annen måte | 38 9.07 100.00 ----------------------------------------+----------------------------------- Total | 419 100.00 . . // Time start rushhour pricing . // For each output, filter out the people stating they dont want to answer, but keep the people s > tating they dont know. . tab start_mor_rush_relative if start_mor_rush_relative != . & start_mor_rush_relative != .b, m Difference | in hours | between | actual and | guessed | time for | end of | evening | rush hour | Freq. Percent Cum. ------------+----------------------------------- -1.5 | 1 0.32 0.32 -1 | 1 0.32 0.64 -.5 | 57 18.33 18.97 0 | 11 3.54 22.51 .5 | 116 37.30 59.81 1 | 6 1.93 61.74 1.5 | 7 2.25 63.99 6.5 | 1 0.32 64.31 .c | 111 35.69 100.00 ------------+----------------------------------- Total | 311 100.00 . hist start_mor_rush_relative, width(0.5) (bin=16, start=-1.5, width=.5) . tab slutt_mor_rush_relative if slutt_mor_rush_relative != . & slutt_mor_rush_relative != .b, m slutt_mor_r | ush_relativ | e | Freq. Percent Cum. ------------+----------------------------------- -.5 | 2 0.65 0.65 0 | 124 40.52 41.18 .5 | 9 2.94 44.12 1 | 56 18.30 62.42 2 | 1 0.33 62.75 2.5 | 1 0.33 63.07 5 | 2 0.65 63.73 7 | 8 2.61 66.34 .c | 103 33.66 100.00 ------------+----------------------------------- Total | 306 100.00 . hist slutt_mor_rush_relative, width(0.5) (bin=15, start=-.5, width=.5) . . tab start_kvld_rush_relative if start_kvld_rush_relative != . & start_kvld_rush_relative != .b, m start_kvld_ | rush_relati | ve | Freq. Percent Cum. ------------+----------------------------------- -1 | 30 9.46 9.46 -.5 | 7 2.21 11.67 0 | 141 44.48 56.15 .5 | 3 0.95 57.10 1 | 9 2.84 59.94 2 | 1 0.32 60.25 3 | 1 0.32 60.57 .c | 125 39.43 100.00 ------------+----------------------------------- Total | 317 100.00 . hist start_kvld_rush_relative (bin=13, start=-1, width=.30769231) . tab slutt_kvld_rush_relative if slutt_kvld_rush_relative != . & slutt_kvld_rush_relative != .b, m slutt_kvld_ | rush_relati | ve | Freq. Percent Cum. ------------+----------------------------------- -1 | 3 0.96 0.96 0 | 80 25.64 26.60 .5 | 12 3.85 30.45 1 | 86 27.56 58.01 1.5 | 3 0.96 58.97 2 | 5 1.60 60.58 3 | 4 1.28 61.86 .c | 119 38.14 100.00 ------------+----------------------------------- Total | 312 100.00 . hist slutt_kvld_rush_relative (bin=13, start=-1, width=.30769231) . . // Price answers . tab diff_pris_utaforoslo if diff_pris_utaforoslo != . & diff_pris_utaforoslo != .b, m Price guess | difference | trip whole | Oslo | Freq. Percent Cum. ------------+----------------------------------- -46.4 | 1 0.25 0.25 -37.8 | 1 0.25 0.49 -30.4 | 1 0.25 0.74 -29.4 | 1 0.25 0.98 -28.4 | 3 0.74 1.72 -27.8 | 1 0.25 1.96 -27.4 | 1 0.25 2.21 -26.8 | 1 0.25 2.45 -26.4 | 1 0.25 2.70 -24.4 | 1 0.25 2.94 -23.9 | 1 0.25 3.19 -23.4 | 1 0.25 3.43 -23.2 | 2 0.49 3.92 -22.8 | 1 0.25 4.17 -22.4 | 2 0.49 4.66 -21.4 | 3 0.74 5.39 -20.4 | 1 0.25 5.64 -18.4 | 2 0.49 6.13 -17.4 | 2 0.49 6.62 -16.8 | 1 0.25 6.86 -16.4 | 4 0.98 7.84 -16.4 | 2 0.49 8.33 -15.4 | 2 0.49 8.82 -14.4 | 1 0.25 9.07 -14.4 | 1 0.25 9.31 -12.8 | 1 0.25 9.56 -12.4 | 1 0.25 9.80 -12.4 | 3 0.74 10.54 -11.4 | 2 0.49 11.03 -11.2 | 2 0.49 11.52 -11 | 1 0.25 11.76 -10.4 | 1 0.25 12.01 -10.4 | 5 1.23 13.24 -9.4 | 2 0.49 13.73 -8.4 | 1 0.25 13.97 -8 | 1 0.25 14.22 -7.4 | 2 0.49 14.71 -6.400002 | 4 0.98 15.69 -6 | 1 0.25 15.93 -5.799999 | 1 0.25 16.18 -5.4 | 2 0.49 16.67 -4.4 | 1 0.25 16.91 -3.799999 | 1 0.25 17.16 -2.799999 | 1 0.25 17.40 -2.400002 | 1 0.25 17.65 -2.4 | 8 1.96 19.61 -1.400002 | 4 0.98 20.59 -.4000015 | 1 0.25 20.83 .2000008 | 1 0.25 21.08 1.6 | 1 0.25 21.32 2.6 | 5 1.23 22.55 3.200001 | 1 0.25 22.79 3.599998 | 3 0.74 23.53 5.6 | 1 0.25 23.77 7.200001 | 1 0.25 24.02 7.6 | 2 0.49 24.51 9.6 | 1 0.25 24.75 12.6 | 1 0.25 25.00 13.6 | 1 0.25 25.25 23.6 | 1 0.25 25.49 27.6 | 2 0.49 25.98 29.6 | 1 0.25 26.23 40.6 | 1 0.25 26.47 43.2 | 1 0.25 26.72 50.6 | 1 0.25 26.96 76.6 | 1 0.25 27.21 .c | 297 72.79 100.00 ------------+----------------------------------- Total | 408 100.00 . hist diff_pris_utaforoslo, bins(30) freq (bin=30, start=-46.400002, width=4.1) . graph export outsideoslo.png, replace file outsideoslo.png saved as PNG format . summarize diff_pris_utaforoslo Variable | Obs Mean Std. dev. Min Max -------------+--------------------------------------------------------- diff_pris_~o | 111 -6.847748 17.62965 -46.4 76.6 . tab diff_pris_irushen if diff_pris_irushen != . & diff_pris_irushen != .b, m Price guess | difference, | single rush | hour | toll-road | pass | Freq. Percent Cum. ------------+----------------------------------- -15 | 1 0.25 0.25 -13.6 | 1 0.25 0.49 -10.4 | 1 0.25 0.74 -9 | 4 0.98 1.72 -8.6 | 1 0.25 1.96 -8 | 5 1.23 3.19 -7.6 | 1 0.25 3.43 -7.4 | 1 0.25 3.68 -7 | 1 0.25 3.92 -6 | 1 0.25 4.17 -5.6 | 3 0.74 4.90 -5.4 | 2 0.49 5.39 -4.6 | 3 0.74 6.13 -4.4 | 2 0.49 6.62 -4 | 1 0.25 6.86 -3.6 | 4 0.98 7.84 -3.4 | 1 0.25 8.09 -3 | 6 1.47 9.56 -2.6 | 3 0.74 10.29 -2.4 | 1 0.25 10.54 -1.6 | 4 0.98 11.52 -.6000004 | 2 0.49 12.01 -.3999996 | 1 0.25 12.25 0 | 5 1.23 13.48 .3999996 | 5 1.23 14.71 1.4 | 6 1.47 16.18 2 | 7 1.72 17.89 2.4 | 1 0.25 18.14 3.4 | 3 0.74 18.87 3.6 | 1 0.25 19.12 4 | 2 0.49 19.61 4.4 | 5 1.23 20.83 4.6 | 1 0.25 21.08 6 | 1 0.25 21.32 6.4 | 6 1.47 22.79 7 | 2 0.49 23.28 8.4 | 2 0.49 23.77 12 | 2 0.49 24.26 14.6 | 1 0.25 24.51 15 | 1 0.25 24.75 16.4 | 3 0.74 25.49 16.6 | 1 0.25 25.74 17 | 2 0.49 26.23 19.6 | 1 0.25 26.47 20 | 2 0.49 26.96 20.4 | 1 0.25 27.21 22 | 3 0.74 27.94 28 | 1 0.25 28.19 29.6 | 1 0.25 28.43 32 | 1 0.25 28.68 36.4 | 1 0.25 28.92 37.6 | 1 0.25 29.17 52 | 1 0.25 29.41 136.4 | 1 0.25 29.66 .c | 287 70.34 100.00 ------------+----------------------------------- Total | 408 100.00 . hist diff_pris_irushen, bins(30) freq (bin=30, start=-15, width=5.0466665) . graph export singlepassing.png, replace file singlepassing.png saved as PNG format . summarize diff_pris_irushen Variable | Obs Mean Std. dev. Min Max -------------+--------------------------------------------------------- diff_pris_~n | 121 4.479339 16.42318 -15 136.4 . . tab diff_price_utaforoslo_cat if diff_price_utaforoslo_cat != "missing" diff_price_u | taforoslo_ca | t | Freq. Percent Cum. -------------+----------------------------------- 1 | 2 0.49 0.49 10 | 19 4.66 5.15 5 | 26 6.37 11.52 I dont know | 297 72.79 84.31 More than 10 | 64 15.69 100.00 -------------+----------------------------------- Total | 408 100.00 . tab diff_price_irushen_cat if diff_price_irushen_cat != "missing" diff_price_i | rushen_cat | Freq. Percent Cum. -------------+----------------------------------- 1 | 13 3.19 3.19 10 | 30 7.35 10.54 5 | 51 12.50 23.04 I dont know | 287 70.34 93.38 More than 10 | 27 6.62 100.00 -------------+----------------------------------- Total | 408 100.00 . . // Yes/no items . tab abomp_timeregel if abomp_timeregel != ., m Stemmer det at | ved passering | av | bomstasjoner | ved Bygrensen | og Osloringen | i | Freq. Percent Cum. ---------------+----------------------------------- Ja | 242 57.89 57.89 Nei | 41 9.81 67.70 Vet ikke | 131 31.34 99.04 .b | 4 0.96 100.00 ---------------+----------------------------------- Total | 418 100.00 . tab abomp_makstak if abomp_makstak != ., m Stemmer det at | det er et | månedlig | makstak for | antallet | bompasseringer | man | Freq. Percent Cum. ---------------+----------------------------------- Ja | 70 16.75 16.75 Nei | 117 27.99 44.74 Vet ikke | 227 54.31 99.04 .b | 4 0.96 100.00 ---------------+----------------------------------- Total | 418 100.00 . . // Sankey diagrams is informative, but cumbersome to include in the article text. I'll try to inc > lude them as supplementary information. . gen count = 1 . sankey count, from(abomp_start_mor_rush_uni) to(abomp_slutt_mor_rush_uni) labangle(0) labposition > (12) boxw(6) title("Estimates on when morning rush hour pricing starts and ends", size(medium)) s > ubtitle("Correct estimates are 06:30-09:00", size(small)) WARNING: No by() option specified. Assuming one layer. . graph export sankey_morning.png, replace file sankey_morning.png saved as PNG format . . sankey count, from(abomp_start_kvld_rush_uni) to(abomp_slutt_kvld_rush_uni) labangle(0) labpositi > on(12) boxw(6) title("Estimates on when evening rush hour pricing starts and ends", size(medium)) > subtitle("Correct estimates are 15:00-17:00", size(small)) WARNING: No by() option specified. Assuming one layer. . graph export sankey_evening.png, replace file sankey_evening.png saved as PNG format . . log close name: log: I:\MO-AVD\5009 MikroReg\WP7 Piloter\Survey\2023\Bomring kunnskap\Toll Road knowledge l > og file.log log type: text closed on: 7 Jan 2025, 17:31:35 ---------------------------------------------------------------------------------------------------