library(readxl)
pmdata <- read_excel("C:/Users/schoi/OneDrive/pmdata.xlsx")
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
pmdata$gender<- recode(pmdata$gender, '1'='male', '2'='female', '3'= 'other')
pmdata$race<- recode(pmdata$race, '1'='asian', '2'='black', '3'= 'hispanic', '4' = 'middle eastern', '5' = 'native american', '6' = 'white', '7' = 'other')
pmdata$edu<- recode(pmdata$edu, '1'='some high school', '2'='high school', '3'= 'associates', '4' = 'bachelors', '5' = 'masters', '6' = 'phd/higher', '7' = 'trade school')
pmdata$marital<- recode(pmdata$marital, '1'='single', '2'='partnered', '3'= 'married', '4' = 'separated', '5' = 'widowed')
pmdata$income<- recode(pmdata$income, '1'='24.9k or <', '2'='25k to 49.9k', '3'= '50k to 99.9k', '4' = '100k to 199.9k', '5' = '200k or >')
pmdata$religion<- recode(pmdata$religion, '1'='christianity', '2'='judaism', '3'= 'islam', '4' = 'hinduism', '5' = 'buddhism', '6' = 'other', '7' = 'no affil')
pmdata$rank<- recode(pmdata$rank, '1'='police tech', '2'='police officer', '3'= 'detective', '4' = 'corporal', '5' = 'sergeant', '6' = 'lieutenant', '7' = 'captain', '8' = 'deputy chief', '9' = 'chief', '10' ='other rank')
pmdata$family<- recode(pmdata$family, '1'='yes', '2'='no')
pmdata$nopoexp<- recode(pmdata$nopoexp, '1'='yes', '2'='no')
pmdata$military<- recode(pmdata$military, '1'='yes', '2'='no')
##Rename police motivation variables
pmdata <- rename(pmdata, stdysal = motiv1, benefits = motiv2, goodsal = motiv3, jobsec = motiv4, retire = motiv5, jobstat = motiv6, jobfit = motiv7, power = motiv8, faminflu = motiv9, excite = motiv10, service = motiv11, dream = motiv12, danger = motiv13)
social dominance orientation (Ho et al., 2015): higher scores indicate higher SDO endorsement; reverse scored con-trait dominance/antiegalitarianism (SDO 5-8 and 13-16)
pmdata$sdo5r <- recode(pmdata$sdo5, '1'=7, '2'=6, '3'=5, '4'=4, '5'=3, '6'=2, '7'=1)
pmdata$sdo6r <- recode(pmdata$sdo6, '1'=7, '2'=6, '3'=5, '4'=4, '5'=3, '6'=2, '7'=1)
pmdata$sdo7r <- recode(pmdata$sdo7, '1'=7, '2'=6, '3'=5, '4'=4, '5'=3, '6'=2, '7'=1)
pmdata$sdo8r <- recode(pmdata$sdo8, '1'=7, '2'=6, '3'=5, '4'=4, '5'=3, '6'=2, '7'=1)
pmdata$sdo13r <- recode(pmdata$sdo13, '1'=7, '2'=6, '3'=5, '4'=4, '5'=3, '6'=2, '7'=1)
pmdata$sdo14r <- recode(pmdata$sdo14, '1'=7, '2'=6, '3'=5, '4'=4, '5'=3, '6'=2, '7'=1)
pmdata$sdo15r <- recode(pmdata$sdo15, '1'=7, '2'=6, '3'=5, '4'=4, '5'=3, '6'=2, '7'=1)
pmdata$sdo16r <- recode(pmdata$sdo16, '1'=7, '2'=6, '3'=5, '4'=4, '5'=3, '6'=2, '7'=1)
pmdata$sdo <- (pmdata$sdo1 + pmdata$sdo2 + pmdata$sdo3 + pmdata$sdo4 + pmdata$sdo5r + pmdata$sdo6r + pmdata$sdo7r + pmdata$sdo8r + pmdata$sdo9 + pmdata$sdo10 + pmdata$sdo11 + pmdata$sdo12 + pmdata$sdo13r + pmdata$sdo14r + pmdata$sdo15r + pmdata$sdo16r)/16
right-wing authoritarianism (Zakrisson, 2005): higher scores indicate higher RWA endorsement; reverse scored sdo2,4,6,8,10,12,14 (even numbers)
pmdata$rwa2r <- recode(pmdata$rwa2, '1'=7, '2'=6, '3'=5, '4'=4, '5'=3, '6'=2, '7'=1)
pmdata$rwa4r <- recode(pmdata$rwa4, '1'=7, '2'=6, '3'=5, '4'=4, '5'=3, '6'=2, '7'=1)
pmdata$rwa6r <- recode(pmdata$rwa6, '1'=7, '2'=6, '3'=5, '4'=4, '5'=3, '6'=2, '7'=1)
pmdata$rwa8r <- recode(pmdata$rwa8, '1'=7, '2'=6, '3'=5, '4'=4, '5'=3, '6'=2, '7'=1)
pmdata$rwa10r <- recode(pmdata$rwa10, '1'=7, '2'=6, '3'=5, '4'=4, '5'=3, '6'=2, '7'=1)
pmdata$rwa12r <- recode(pmdata$rwa12, '1'=7, '2'=6, '3'=5, '4'=4, '5'=3, '6'=2, '7'=1)
pmdata$rwa14r <- recode(pmdata$rwa14, '1'=7, '2'=6, '3'=5, '4'=4, '5'=3, '6'=2, '7'=1)
pmdata$rwa <- (pmdata$rwa1 + pmdata$rwa2r + pmdata$rwa3 + pmdata$rwa4r + pmdata$rwa5 + pmdata$rwa6r + pmdata$rwa7 + pmdata$rwa8r + pmdata$rwa9 + pmdata$rwa10r + pmdata$rwa11 + pmdata$rwa12r + pmdata$rwa13 + pmdata$rwa14r + pmdata$rwa15)/15
police perceptions of how the community views them in terms of legitimacy (Bottoms & Tankebe, 2012; Jonathan-Zamir & Harpaz; Nix, 2017); higher scores mean the police believes that the community perceives them as legitimate; no reverse scored items
pmdata$legit <- (pmdata$legit1 + pmdata$legit2 + pmdata$legit3 + pmdata$legit4 + pmdata$legit5)/5
##ferg ferguson effect - negative impact of publicity on officers (Nix & Wolfe, 2016); higher scores mean more negative impact; no reversed scored items
pmdata$ferg <- (pmdata$ferg1 + pmdata$ferg2 + pmdata$ferg3 + pmdata$ferg4 + pmdata$ferg5+ pmdata$ferg6+ pmdata$ferg7+ pmdata$ferg8+ pmdata$ferg9 + pmdata$ferg10 + pmdata$ferg11 + pmdata$ferg12 + pmdata$ferg13+ pmdata$ferg14)/14
various goal pursuits (Wilkowski et al., 2021), higher scores mean more commitment towards a certain goal
pmdata$prom <- (pmdata$tipend1 + pmdata$tipend2 + pmdata$tipend3 + pmdata$tipend4 + pmdata$tipend5+ pmdata$tipend6+ pmdata$tipend7+ pmdata$tipend8+ pmdata$tipend9 + pmdata$tipend10 + pmdata$tipend11)/11
pmdata$neg <- (pmdata$tipend12 + pmdata$tipend13 + pmdata$tipend14 + pmdata$tipend15 + pmdata$tipend16+ pmdata$tipend17+ pmdata$tipend18+ pmdata$tipend19+ pmdata$tipend20 + pmdata$tipend21)/10
pmdata$trad <- (pmdata$tipend22 + pmdata$tipend23 + pmdata$tipend24 + pmdata$tipend25 + pmdata$tipend26+ pmdata$tipend27+ pmdata$tipend28+ pmdata$tipend29+ pmdata$tipend30 + pmdata$tipend31 + pmdata$tipend32)/11
pmdata$inclus <- (pmdata$tipend33 + pmdata$tipend34 + pmdata$tipend35 + pmdata$tipend36+ pmdata$tipend37+ pmdata$tipend38+ pmdata$tipend39+ pmdata$tipend40 + pmdata$tipend41 + pmdata$tipend42 + pmdata$tipend43)/11
pmdata$elite <- (pmdata$tipend44 + pmdata$tipend45 + pmdata$tipend46+ pmdata$tipend47+ pmdata$tipend48+ pmdata$tipend49+ pmdata$tipend50 + pmdata$tipend51 + pmdata$tipend52 + pmdata$tipend53 + pmdata$tipend54 + pmdata$tipend55 + pmdata$tipend56)/13
pmdata$disrep <- (pmdata$tipend57+ pmdata$tipend58+ pmdata$tipend59+ pmdata$tipend60 + pmdata$tipend61 + pmdata$tipend62 + pmdata$tipend63 + pmdata$tipend64 + pmdata$tipend65 + pmdata$tipend66 + pmdata$tipend67 + pmdata$tipend68)/12
pmdata$rebel <- (pmdata$tipend69+ pmdata$tipend70 + pmdata$tipend71 + pmdata$tipend72 + pmdata$tipend73 + pmdata$tipend74 + pmdata$tipend75 + pmdata$tipend76 + pmdata$tipend77 + pmdata$tipend78 + pmdata$tipend79 + pmdata$tipend80)/12
endorsement of reasonable use of force (Gerber & Jackson, 2017); higher scores indicate more endorsement of reasonable use of force
pmdata$reason <- (pmdata$useforce1 + pmdata$useforce2 + pmdata$useforce3 + pmdata$useforce4 + pmdata$useforce5)/5
endorsement of excessive use of force (Gerber & Jackson, 2017); higher scores indicate more endorsement of excessive use of force
pmdata$excess <- (pmdata$useforce6 + pmdata$useforce7 + pmdata$useforce8 + pmdata$useforce9 + pmdata$useforce10)/5
endorsement of procedural justice when dealing with civilians (Trinkner et al., 2019); higher score indicate more endorsement of procedural justice; reversed scored items: projust 9,10,16,17
pmdata$projust9r <- recode(pmdata$projust9, '1'=5, '2'=4, '3'=3, '4'=2, '5'=1)
pmdata$projust10r <- recode(pmdata$projust10, '1'=5, '2'=4, '3'=3, '4'=2, '5'=1)
pmdata$projust16r <- recode(pmdata$projust16, '1'=5, '2'=4, '3'=3, '4'=2, '5'=1)
pmdata$projust17r <- recode(pmdata$projust17, '1'=5, '2'=4, '3'=3, '4'=2, '5'=1)
pmdata$projust <- (pmdata$projust1 + pmdata$projust2 + pmdata$projust3 + pmdata$projust4 + pmdata$projust5 + pmdata$projust6 + pmdata$projust7 + pmdata$projust8+ pmdata$projust9r + pmdata$projust10r + pmdata$projust11 + pmdata$projust12 + pmdata$projust13+ pmdata$projust14+ pmdata$projust15+ pmdata$projust16r + pmdata$projust17r +pmdata$projust18 +pmdata$projust19)/19
loyalty towards fellow officers (Boke & Nalla, 2019); higher scores indicate more loyalty; there are no reverse scored items.
pmdata$loyal <- (pmdata$loyal1 + pmdata$loyal2 + pmdata$loyal3)/3
aggressive tendencies (???); higher scores indicate more aggressive tendencies; reverse scored bpaq4
pmdata$bpaq4r <- recode(pmdata$bpaq4, '1'=7, '2'=6, '3'=5, '4'=4, '5'=3, '6'=2, '7'=1)
pmdata$bpaq <- (pmdata$bpaq1 + pmdata$bpaq2 + pmdata$bpaq3 + pmdata$bpaq4r + pmdata$bpaq5 + pmdata$bpaq6 + pmdata$bpaq7 + pmdata$bpaq8 + pmdata$bpaq9 + pmdata$bpaq10 + pmdata$bpaq11 + pmdata$bpaq12)/12
social desirability (Greenberg & Weiss, 2012); higher scores ( 0 -> 1) indicate a more social desirability; reversed scored desirab 1, 2, 3, 4, 6, 8, 11, and 12
pmdata$desirab1r <- recode(pmdata$desirab1, '1'=2, '2'= 1)
pmdata$desirab2r <- recode(pmdata$desirab2, '1'=2, '2'= 1)
pmdata$desirab3r <- recode(pmdata$desirab3, '1'=2, '2'= 1)
pmdata$desirab4r <- recode(pmdata$desirab4, '1'=2, '2'= 1)
pmdata$desirab6r <- recode(pmdata$desirab6, '1'=2, '2'= 1)
pmdata$desirab8r <- recode(pmdata$desirab8, '1'=2, '2'= 1)
pmdata$desirab11r <- recode(pmdata$desirab11, '1'=2, '2'= 1)
pmdata$desirab12r <- recode(pmdata$desirab12, '1'=2, '2'= 1)
pmdata$desirab <- (pmdata$desirab1r + pmdata$desirab2r + pmdata$desirab3r + pmdata$desirab4r + pmdata$desirab5+ pmdata$desirab6r+ pmdata$desirab7+ pmdata$desirab8r+ pmdata$desirab9 + pmdata$desirab10 + pmdata$desirab11r + pmdata$desirab12r)/12
officers prioritize service over fighting (McLean et al., 2020); no reverse scored items
pmdata$guardian <- (pmdata$warrior1 + pmdata$warrior2 + pmdata$warrior3 + pmdata$warrior4 + pmdata$warrior5 + pmdata$warrior6)/6
officers prioritize crime fighting (McLean et al., 2020); no reverse scored items
pmdata$warrior <- (pmdata$warrior7 + pmdata$warrior8 + pmdata$warrior9)/3
IVs
sdo = social dominance orientation (e.g., we should not push for group equality)
rwa = right-wing authoritarianism (e.g., its better to accept bad literature than to censor it)
legit = police perceptions of how the community views them in terms of legitimacy (e.g., citizens in your community trust the police) ferg = the ferguson effect (negative impact of publicity on officers)
prom = commitment to prominence goals (e.g., glory, championship); TIP-END goals
neg = commitment to negativity prevention goals (e.g., abnormality, craziness); TIP-END goals
trad = commitment to tradition goals (e.g., faith, obedience); TIP-END goals
inclus = commitment to inclusiveness goals (e.g., diversity, comradery, equity); TIP-END goals
elite = commitment to elitism goals (e.g., authoritarianism, boastfulness); TIP-END goals
disrep = commitment to disrepute (e.g., addiction, corruption); TIP-END goals
rebel = commitment to rebellion (e.g., wildness; temptation); TIP-END goals
loyal = loyalty to fellow officers (e.g., If I violate a rule, I expect my fellow officer to protect me)
bpaq = Buss-Perry Aggression Questionnaire (e.g., Given enough provocation, I may hit another person)
guardian = police officers as guardians orientation (e.g., As a police officer, I see myself as a civil servant)
warrior = police officers as warriors orientation (e.g., My primary responsibility as a police officer is to fight crime)
DVs
reason = endorsement of reasonable use of force (e.g., A police officer uses guns and clubs to stop violent demonstrations)
excess = endorsement of excessive use of force (e.g., A police officer uses violence to control non-violent demonstrations)
projust = endorsement of procedural justice (e.g., When interacting with community residents, how important is it to show an interest in what they have to say?)
library(dplyr)
with(pmdata, cor(select(pmdata, sdo, rwa, legit, ferg, prom, neg, trad, inclus, elite, disrep, rebel, bpaq, guardian, warrior, reason, excess, projust, loyal,), use = "na.or.complete"))
## sdo rwa legit ferg prom
## sdo 1.00000000 0.251924276 -0.23666036 -0.1133284785 -0.204243145
## rwa 0.25192428 1.000000000 -0.30045178 0.1246915859 -0.002925446
## legit -0.23666036 -0.300451779 1.00000000 -0.1774192081 0.086985550
## ferg -0.11332848 0.124691586 -0.17741921 1.0000000000 0.059422744
## prom -0.20424315 -0.002925446 0.08698555 0.0594227445 1.000000000
## neg 0.03689308 0.088249477 -0.04306793 -0.0374657676 0.114104267
## trad -0.26784357 0.525742761 0.05727886 -0.0006340331 0.226085485
## inclus -0.46034411 -0.186421922 0.44499825 0.2960087869 0.136723425
## elite 0.09368809 -0.028825685 -0.03480835 -0.0604092911 0.299753998
## disrep 0.09352376 -0.105980673 -0.10101475 -0.0204776602 0.177064623
## rebel 0.13932136 -0.244008204 -0.10484413 0.1379711381 0.256061794
## bpaq 0.12955648 0.187015586 -0.26041190 0.1333272833 0.004074977
## guardian 0.10102487 -0.015941070 0.11047741 -0.2170324585 -0.089020331
## warrior 0.09058915 -0.024217323 -0.28130714 0.1914272989 -0.011185484
## reason 0.03557328 0.047863026 0.15880726 0.2317862659 0.244885698
## excess 0.30556598 -0.009303910 -0.20012011 -0.0840488987 0.184371192
## projust -0.30403768 0.034060122 0.31861299 0.2101054590 -0.070787686
## loyal 0.05420457 -0.085702602 0.07803678 -0.0748294634 -0.182184850
## neg trad inclus elite disrep
## sdo 0.03689308 -0.2678435730 -4.603441e-01 0.093688089 0.09352376
## rwa 0.08824948 0.5257427606 -1.864219e-01 -0.028825685 -0.10598067
## legit -0.04306793 0.0572788596 4.449982e-01 -0.034808350 -0.10101475
## ferg -0.03746577 -0.0006340331 2.960088e-01 -0.060409291 -0.02047766
## prom 0.11410427 0.2260854845 1.367234e-01 0.299753998 0.17706462
## neg 1.00000000 -0.2563160899 -2.637407e-01 0.619996839 0.75194448
## trad -0.25631609 1.0000000000 2.954905e-01 -0.250977653 -0.37694764
## inclus -0.26374070 0.2954905150 1.000000e+00 -0.172746760 -0.30510868
## elite 0.61999684 -0.2509776531 -1.727468e-01 1.000000000 0.73643689
## disrep 0.75194448 -0.3769476394 -3.051087e-01 0.736436894 1.00000000
## rebel 0.59337777 -0.5350736510 -1.735909e-01 0.671820623 0.71250808
## bpaq 0.26507483 -0.0890223097 -6.799656e-02 0.422958970 0.35596339
## guardian 0.21101857 -0.1461471548 6.886763e-02 -0.007377966 0.06909730
## warrior -0.06508821 -0.2491053063 -6.879722e-05 -0.104697158 -0.03855605
## reason -0.10281223 -0.0239199684 2.377423e-01 -0.021949709 -0.20920750
## excess 0.24061958 -0.4183457652 -3.096344e-01 0.352330273 0.32051045
## projust -0.27638887 0.3280145503 5.353845e-01 -0.288384450 -0.45962722
## loyal -0.30904347 -0.1147608147 -3.115924e-01 -0.008568595 -0.09809827
## rebel bpaq guardian warrior reason
## sdo 0.139321363 0.129556481 0.101024867 9.058915e-02 0.035573281
## rwa -0.244008204 0.187015586 -0.015941070 -2.421732e-02 0.047863026
## legit -0.104844126 -0.260411899 0.110477408 -2.813071e-01 0.158807262
## ferg 0.137971138 0.133327283 -0.217032459 1.914273e-01 0.231786266
## prom 0.256061794 0.004074977 -0.089020331 -1.118548e-02 0.244885698
## neg 0.593377770 0.265074834 0.211018571 -6.508821e-02 -0.102812234
## trad -0.535073651 -0.089022310 -0.146147155 -2.491053e-01 -0.023919968
## inclus -0.173590869 -0.067996563 0.068867628 -6.879722e-05 0.237742325
## elite 0.671820623 0.422958970 -0.007377966 -1.046972e-01 -0.021949709
## disrep 0.712508078 0.355963394 0.069097297 -3.855605e-02 -0.209207502
## rebel 1.000000000 0.234155552 0.004009085 2.039474e-01 -0.001885734
## bpaq 0.234155552 1.000000000 -0.209316738 1.024210e-01 -0.059952987
## guardian 0.004009085 -0.209316738 1.000000000 7.305920e-02 -0.020629911
## warrior 0.203947418 0.102421012 0.073059204 1.000000e+00 0.176351006
## reason -0.001885734 -0.059952987 -0.020629911 1.763510e-01 1.000000000
## excess 0.341483381 0.229839189 0.302797659 1.450185e-01 0.025353734
## projust -0.327078409 -0.216123744 -0.042571693 -6.452391e-03 0.040695169
## loyal -0.051143223 -0.115600952 -0.260626917 -1.390581e-01 -0.038498867
## excess projust loyal
## sdo 0.30556598 -0.304037681 0.054204574
## rwa -0.00930391 0.034060122 -0.085702602
## legit -0.20012011 0.318612994 0.078036778
## ferg -0.08404890 0.210105459 -0.074829463
## prom 0.18437119 -0.070787686 -0.182184850
## neg 0.24061958 -0.276388867 -0.309043471
## trad -0.41834577 0.328014550 -0.114760815
## inclus -0.30963444 0.535384456 -0.311592397
## elite 0.35233027 -0.288384450 -0.008568595
## disrep 0.32051045 -0.459627224 -0.098098273
## rebel 0.34148338 -0.327078409 -0.051143223
## bpaq 0.22983919 -0.216123744 -0.115600952
## guardian 0.30279766 -0.042571693 -0.260626917
## warrior 0.14501854 -0.006452391 -0.139058133
## reason 0.02535373 0.040695169 -0.038498867
## excess 1.00000000 -0.490597069 0.033896622
## projust -0.49059707 1.000000000 -0.180980266
## loyal 0.03389662 -0.180980266 1.000000000
stdysal = steady salary
benefits = good benefits
goodsal = good salary
jobsec = job security
retire = early retirement
jobstat = job status
jobfit = person-job fit
power = power/authority
faminlu = influence from family
excite = the excitement from job
service = service to others
dream = childhood dream
danger = dangerousness of job
library(psych)
motivedf <- with(pmdata, data.frame(stdysal, benefits, goodsal, jobsec, retire, jobstat, jobfit, power, faminflu, excite, service, dream, danger))
describeBy(motivedf)
## Warning in describeBy(motivedf): no grouping variable requested
po = political orientation
rankexp = years of experience in current rank
totalexp = total years of police-related experience
edu = education
marital = marital status
family = having family or relative as police officers nopoexp = non-police related experience
military = military experience
library(psych)
pmdata$age[pmdata$age == 0] <- NA
contdemodf <- with(pmdata, data.frame(age, po, rankexp, totalexp))
describeBy(contdemodf)
## Warning in describeBy(contdemodf): no grouping variable requested
library(summarytools)
summarytools::freq(pmdata$gender, order = "freq")
## Frequencies
## pmdata$gender
## Type: Character
##
## Freq % Valid % Valid Cum. % Total % Total Cum.
## ------------ ------ --------- -------------- --------- --------------
## male 46 85.19 85.19 85.19 85.19
## female 8 14.81 100.00 14.81 100.00
## <NA> 0 0.00 100.00
## Total 54 100.00 100.00 100.00 100.00
summarytools::freq(pmdata$race, order = "freq")
## Frequencies
## pmdata$race
## Type: Character
##
## Freq % Valid % Valid Cum. % Total % Total Cum.
## -------------- ------ --------- -------------- --------- --------------
## white 49 92.45 92.45 90.74 90.74
## hispanic 3 5.66 98.11 5.56 96.30
## black 1 1.89 100.00 1.85 98.15
## <NA> 1 1.85 100.00
## Total 54 100.00 100.00 100.00 100.00
summarytools::freq(pmdata$edu, order = "freq")
## Frequencies
## pmdata$edu
## Type: Character
##
## Freq % Valid % Valid Cum. % Total % Total Cum.
## ------------------ ------ --------- -------------- --------- --------------
## bachelors 30 55.56 55.56 55.56 55.56
## masters 9 16.67 72.22 16.67 72.22
## high school 7 12.96 85.19 12.96 85.19
## associates 6 11.11 96.30 11.11 96.30
## trade school 2 3.70 100.00 3.70 100.00
## <NA> 0 0.00 100.00
## Total 54 100.00 100.00 100.00 100.00
summarytools::freq(pmdata$marital, order = "freq")
## Frequencies
## pmdata$marital
## Type: Character
##
## Freq % Valid % Valid Cum. % Total % Total Cum.
## --------------- ------ --------- -------------- --------- --------------
## married 41 77.36 77.36 75.93 75.93
## single 5 9.43 86.79 9.26 85.19
## partnered 3 5.66 92.45 5.56 90.74
## separated 3 5.66 98.11 5.56 96.30
## widowed 1 1.89 100.00 1.85 98.15
## <NA> 1 1.85 100.00
## Total 54 100.00 100.00 100.00 100.00
summarytools::freq(pmdata$income, order = "freq")
## Frequencies
## pmdata$income
## Type: Character
##
## Freq % Valid % Valid Cum. % Total % Total Cum.
## -------------------- ------ --------- -------------- --------- --------------
## 50k to 99.9k 27 50.00 50.00 50.00 50.00
## 100k to 199.9k 23 42.59 92.59 42.59 92.59
## 25k to 49.9k 4 7.41 100.00 7.41 100.00
## <NA> 0 0.00 100.00
## Total 54 100.00 100.00 100.00 100.00
summarytools::freq(pmdata$religion, order = "freq")
## Frequencies
## pmdata$religion
## Type: Character
##
## Freq % Valid % Valid Cum. % Total % Total Cum.
## ------------------ ------ --------- -------------- --------- --------------
## christianity 39 72.22 72.22 72.22 72.22
## no affil 11 20.37 92.59 20.37 92.59
## other 3 5.56 98.15 5.56 98.15
## judaism 1 1.85 100.00 1.85 100.00
## <NA> 0 0.00 100.00
## Total 54 100.00 100.00 100.00 100.00
summarytools::freq(pmdata$rank, order = "freq")
## Frequencies
## pmdata$rank
## Type: Character
##
## Freq % Valid % Valid Cum. % Total % Total Cum.
## -------------------- ------ --------- -------------- --------- --------------
## sergeant 16 30.77 30.77 29.63 29.63
## police officer 15 28.85 59.62 27.78 57.41
## detective 8 15.38 75.00 14.81 72.22
## chief 4 7.69 82.69 7.41 79.63
## other rank 4 7.69 90.38 7.41 87.04
## captain 3 5.77 96.15 5.56 92.59
## deputy chief 1 1.92 98.08 1.85 94.44
## lieutenant 1 1.92 100.00 1.85 96.30
## <NA> 2 3.70 100.00
## Total 54 100.00 100.00 100.00 100.00
summarytools::freq(pmdata$family, order = "freq")
## Frequencies
## pmdata$family
## Type: Character
##
## Freq % Valid % Valid Cum. % Total % Total Cum.
## ----------- ------ --------- -------------- --------- --------------
## no 37 69.81 69.81 68.52 68.52
## yes 16 30.19 100.00 29.63 98.15
## <NA> 1 1.85 100.00
## Total 54 100.00 100.00 100.00 100.00
summarytools::freq(pmdata$nopoexp, order = "freq")
## Frequencies
## pmdata$nopoexp
## Type: Character
##
## Freq % Valid % Valid Cum. % Total % Total Cum.
## ----------- ------ --------- -------------- --------- --------------
## yes 38 70.37 70.37 70.37 70.37
## no 16 29.63 100.00 29.63 100.00
## <NA> 0 0.00 100.00
## Total 54 100.00 100.00 100.00 100.00
summarytools::freq(pmdata$military, order = "freq")
## Frequencies
## pmdata$military
## Type: Character
##
## Freq % Valid % Valid Cum. % Total % Total Cum.
## ----------- ------ --------- -------------- --------- --------------
## no 41 75.93 75.93 75.93 75.93
## yes 13 24.07 100.00 24.07 100.00
## <NA> 0 0.00 100.00
## Total 54 100.00 100.00 100.00 100.00