I would like to remove the chief physicians from the characteristic professional position and remove the characteristic employed from the characteristic employment relationship (self-employed or employed). Subsequently, all employed chief physicians are to be compared with all other employed physicians without the professional position of chief physician. I now have the difficulty how to represent this in a contingency table, let alone in a barplot.
First, I thought about creating two dataframes. Is it possible to proceed like this? Subsequently, one could do this in the table function? But it is not working...
Chefarzt<-subset(daten0,Position.EM=="Chefarzt",Arbeitsverhaeltnis.EM=="angestellt")
Aerzte<- subset(daten0, Position.EM!="Chefarzt",Arbeitsverhaeltnis.EM=="angestellt")
Chefarzt <- as.factor(daten0$Chefarzt)
Aerzte<- as.factor(daten0$Aerzte)
tabChefAe<-table(daten0$Chefarzt,daten0$Aerzte)
tabChefAe
result: table of extent 0 x 0 >