Data and R packages

This is an R Markdown document.

library(party)
## Loading required package: grid
## Loading required package: mvtnorm
## Loading required package: modeltools
## Loading required package: stats4
## Loading required package: strucchange
## Loading required package: zoo
## 
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
## 
##     as.Date, as.Date.numeric
## Loading required package: sandwich
library(foreign)
library(haven)
library(sjlabelled)
## 
## Attaching package: 'sjlabelled'
## The following objects are masked from 'package:haven':
## 
##     as_factor, read_sas, read_spss, read_stata, write_sas, zap_labels
ZA6861_v1_2_0 <- read_sav("ZA6861_v1-2-0.sav")
data <- as.data.frame(ZA6861_v1_2_0)
attach(data)
## The following object is masked from package:base:
## 
##     version
EUcountry = as.factor(isocntry)

General assessment of robotics and AI

From QD10 of the EB460:

## 
##   Conditional inference tree with 8 terminal nodes
## 
## Response:  qd10fact 
## Input:  EUcountry 
## Number of observations:  27901 
## 
## 1) EUcountry == {AT, CY, FR, GB-NIR, GR, HR, HU, IT, LU, RO, SI}; criterion = 1, statistic = 2143.988
##   2) EUcountry == {AT, CY, FR, GR, HR, HU, LU, SI}; criterion = 1, statistic = 355.426
##     3) EUcountry == {CY, GR, HR}; criterion = 1, statistic = 169.511
##       4)*  weights = 2559 
##     3) EUcountry == {AT, FR, HU, LU, SI}
##       5)*  weights = 4595 
##   2) EUcountry == {GB-NIR, IT, RO}
##     6) EUcountry == {IT, RO}; criterion = 1, statistic = 55.938
##       7)*  weights = 2055 
##     6) EUcountry == {GB-NIR}
##       8)*  weights = 309 
## 1) EUcountry == {BE, BG, CZ, DE-E, DE-W, DK, EE, ES, FI, GB-GBN, IE, LT, LV, MT, NL, PL, PT, SE, SK}
##   9) EUcountry == {BG, DE-E, DE-W, EE, ES, GB-GBN, IE, LT, LV, MT, PL, PT, SK}; criterion = 1, statistic = 1212.273
##     10) EUcountry == {DE-E, EE, LT, LV, PL}; criterion = 1, statistic = 349.061
##       11)*  weights = 4545 
##     10) EUcountry == {BG, DE-W, ES, GB-GBN, IE, MT, PT, SK}
##       12)*  weights = 7723 
##   9) EUcountry == {BE, CZ, DK, FI, NL, SE}
##     13) EUcountry == {DK, NL, SE}; criterion = 1, statistic = 384.271
##       14)*  weights = 3022 
##     13) EUcountry == {BE, CZ, FI}
##       15)*  weights = 3093

Plot

Robots will steal jobs (Q12_6)

From QD12_6 of the EB460:

## 
##   Conditional inference tree with 7 terminal nodes
## 
## Response:  qd12_6fact 
## Input:  EUcountry 
## Number of observations:  27901 
## 
## 1) EUcountry == {CY, ES, GR, HR, LT, LV, PT}; criterion = 1, statistic = 3474.163
##   2) EUcountry == {CY, ES, GR, PT}; criterion = 1, statistic = 168.25
##     3) EUcountry == {CY, ES, GR}; criterion = 1, statistic = 73.489
##       4)*  weights = 2535 
##     3) EUcountry == {PT}
##       5)*  weights = 1061 
##   2) EUcountry == {HR, LT, LV}
##     6)*  weights = 3053 
## 1) EUcountry == {AT, BE, BG, CZ, DE-E, DE-W, DK, EE, FI, FR, GB-GBN, GB-NIR, HU, IE, IT, LU, MT, NL, PL, RO, SE, SI, SK}
##   7) EUcountry == {DK, NL, SE}; criterion = 1, statistic = 1721.959
##     8) EUcountry == {NL}; criterion = 1, statistic = 61.602
##       9)*  weights = 1015 
##     8) EUcountry == {DK, SE}
##       10)*  weights = 2007 
##   7) EUcountry == {AT, BE, BG, CZ, DE-E, DE-W, EE, FI, FR, GB-GBN, GB-NIR, HU, IE, IT, LU, MT, PL, RO, SI, SK}
##     11) EUcountry == {AT, BG, DE-E, EE, FR, GB-NIR, HU, IE, IT, LU, MT, RO, SI, SK}; criterion = 1, statistic = 841.402
##       12)*  weights = 12070 
##     11) EUcountry == {BE, CZ, DE-W, FI, GB-GBN, PL}
##       13)*  weights = 6160

Plot ## Robots and drones deliver goods (Q13_4)

From QD13_4 of the EB460:

## 
##   Conditional inference tree with 8 terminal nodes
## 
## Response:  qd13_4fact 
## Input:  EUcountry 
## Number of observations:  27901 
## 
## 1) EUcountry == {AT, CY, DE-E, DE-W, ES, FR, GB-GBN, GB-NIR, GR, HR, HU, IE, LT, LU, LV, MT, PT, SI}; criterion = 1, statistic = 3631.414
##   2) EUcountry == {AT, CY, DE-E, DE-W, ES, FR, GB-GBN, GB-NIR, GR, HR, HU, IE, LU, MT, PT, SI}; criterion = 1, statistic = 1090.725
##     3) EUcountry == {CY, DE-E, FR, GR, LU, MT, SI}; criterion = 1, statistic = 835.748
##       4)*  weights = 5067 
##     3) EUcountry == {AT, DE-W, ES, GB-GBN, GB-NIR, HR, HU, IE, PT}
##       5)*  weights = 8576 
##   2) EUcountry == {LT, LV}
##     6) EUcountry == {LT}; criterion = 0.968, statistic = 21.118
##       7)*  weights = 1001 
##     6) EUcountry == {LV}
##       8)*  weights = 1004 
## 1) EUcountry == {BE, BG, CZ, DK, EE, FI, IT, NL, PL, RO, SE, SK}
##   9) EUcountry == {BE, BG, FI, IT, NL, RO, SK}; criterion = 1, statistic = 1331.377
##     10) EUcountry == {BE, FI, IT, NL, RO}; criterion = 1, statistic = 652.394
##       11)*  weights = 5105 
##     10) EUcountry == {BG, SK}
##       12)*  weights = 2058 
##   9) EUcountry == {CZ, DK, EE, PL, SE}
##     13) EUcountry == {EE, PL}; criterion = 1, statistic = 214.17
##       14)*  weights = 2025 
##     13) EUcountry == {CZ, DK, SE}
##       15)*  weights = 3065

Plot ## Autonomous vehicles (Q13_5)

From QD13_5 of the EB460:

## 
##   Conditional inference tree with 8 terminal nodes
## 
## Response:  qd13_5fact 
## Input:  EUcountry 
## Number of observations:  27901 
## 
## 1) EUcountry == {CY, DE-E, ES, FR, GB-GBN, GB-NIR, GR, HR, HU, IE, LT, LU, LV, MT, SI}; criterion = 1, statistic = 2613.66
##   2) EUcountry == {DE-E, ES, HR}; criterion = 1, statistic = 471.532
##     3) EUcountry == {HR}; criterion = 1, statistic = 51.051
##       4)*  weights = 1048 
##     3) EUcountry == {DE-E, ES}
##       5)*  weights = 1539 
##   2) EUcountry == {CY, FR, GB-GBN, GB-NIR, GR, HU, IE, LT, LU, LV, MT, SI}
##     6) EUcountry == {CY, FR, GB-GBN, GB-NIR, GR, IE, LT, LU, LV, MT, SI}; criterion = 1, statistic = 287.692
##       7)*  weights = 8924 
##     6) EUcountry == {HU}
##       8)*  weights = 1053 
## 1) EUcountry == {AT, BE, BG, CZ, DE-W, DK, EE, FI, IT, NL, PL, PT, RO, SE, SK}
##   9) EUcountry == {CZ, DK, PL, SE}; criterion = 1, statistic = 1227.749
##     10) EUcountry == {CZ, DK, SE}; criterion = 1, statistic = 154.998
##       11)*  weights = 3065 
##     10) EUcountry == {PL}
##       12)*  weights = 1008 
##   9) EUcountry == {AT, BE, BG, DE-W, EE, FI, IT, NL, PT, RO, SK}
##     13) EUcountry == {BG, EE, SK}; criterion = 1, statistic = 807.792
##       14)*  weights = 3075 
##     13) EUcountry == {AT, BE, DE-W, FI, IT, NL, PT, RO}
##       15)*  weights = 8189

Plot

Robots and health, medical operation

## 
##   Conditional inference tree with 7 terminal nodes
## 
## Response:  qd13_4fact 
## Input:  EUcountry 
## Number of observations:  27901 
## 
## 1) EUcountry == {AT, CY, DE-E, DE-W, ES, FR, GB-GBN, GB-NIR, GR, HR, HU, IE, LT, LU, LV, MT, PT, SI}; criterion = 1, statistic = 3631.414
##   2) EUcountry == {AT, CY, DE-E, DE-W, ES, FR, GB-GBN, GB-NIR, GR, HR, HU, IE, LU, MT, PT, SI}; criterion = 1, statistic = 1090.725
##     3) EUcountry == {CY, DE-E, FR, GR, LU, MT, SI}; criterion = 1, statistic = 835.748
##       4)*  weights = 5067 
##     3) EUcountry == {AT, DE-W, ES, GB-GBN, GB-NIR, HR, HU, IE, PT}
##       5)*  weights = 8576 
##   2) EUcountry == {LT, LV}
##     6)*  weights = 2005 
## 1) EUcountry == {BE, BG, CZ, DK, EE, FI, IT, NL, PL, RO, SE, SK}
##   7) EUcountry == {BE, BG, FI, IT, NL, RO, SK}; criterion = 1, statistic = 1331.377
##     8) EUcountry == {BE, FI, IT, NL, RO}; criterion = 1, statistic = 652.394
##       9)*  weights = 5105 
##     8) EUcountry == {BG, SK}
##       10)*  weights = 2058 
##   7) EUcountry == {CZ, DK, EE, PL, SE}
##     11) EUcountry == {EE, PL}; criterion = 1, statistic = 214.17
##       12)*  weights = 2025 
##     11) EUcountry == {CZ, DK, SE}
##       13)*  weights = 3065

Plot