#Read the dataset into R
library (tidyverse)
## Warning: package 'ggplot2' was built under R version 4.3.3
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1
## ✔ lubridate 1.9.3 ✔ tidyr 1.3.1
## ✔ purrr 1.0.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(dlookr)
## Warning: package 'dlookr' was built under R version 4.3.3
## Registered S3 methods overwritten by 'dlookr':
## method from
## plot.transform scales
## print.transform scales
##
## Attaching package: 'dlookr'
##
## The following object is masked from 'package:tidyr':
##
## extract
##
## The following object is masked from 'package:base':
##
## transform
library(caret)
## Warning: package 'caret' was built under R version 4.3.3
## Loading required package: lattice
##
## Attaching package: 'caret'
##
## The following object is masked from 'package:purrr':
##
## lift
library(flextable)
## Warning: package 'flextable' was built under R version 4.3.3
##
## Attaching package: 'flextable'
##
## The following object is masked from 'package:purrr':
##
## compose
library(gtsummary)
## Warning: package 'gtsummary' was built under R version 4.3.3
## #Uighur
##
## Attaching package: 'gtsummary'
##
## The following objects are masked from 'package:flextable':
##
## as_flextable, continuous_summary
library(factoextra)
## Warning: package 'factoextra' was built under R version 4.3.3
## Welcome! Want to learn more? See two factoextra-related books at https://goo.gl/ve3WBa
library(FactoMineR)
## Warning: package 'FactoMineR' was built under R version 4.3.3
library(readxl)
calculateddata <- read_excel("C:/Users/Michael/Desktop/calculateddata.xlsx", skip = 1)
#head(calculateddata)
#dim(calculateddata)
Data consists of 756 rows and 82 columns
#The first column 'JakesNEWCODE' is a row column. Convert the column to row
df <- calculateddata %>% column_to_rownames (var = "JakesNEWCODE")
#head(df)
#look at the colnames
#colnames(df)
The demographic data begins from column 1 to column 44
demo <- df %>% select(1:44)
#head(demo)
#Replace the column names for the demographics with these
colnames(demo) <- c("CurrentlyHaveMentor", "ServeAsMentor", "PC_ServeAsMentor", "PrimaryJobFunction", "C5", "InstitutionRepresentation", "C7", "JobPath", "C9", "EmploymentStatus", "CurrentPosLevel", "ManagementExp_Years", "YearsToRetirement", "Age", "C15", "C16", "HighestEducationAttained", "C18", "C19", "C20", "C21", "C22", "C23", "C24", "C25", "C26", "C27", "C28", "C29", "C30", "C31", "C32", "C33", "C34", "C35", "C36", "C37", "C38", "C39", "C40", "C41", "Continent", "C43", "C44")
Some columns in the data contains missing values
subset <- demo %>% select(1, 2, 3, 4, 6, 8, 10, 11, 12, 13, 14, 17, 42)
head(subset)
## CurrentlyHaveMentor ServeAsMentor PC_ServeAsMentor PrimaryJobFunction
## 1 Yes I do Yes I do Yes I have Facility Operations
## 2 No I don't No I don't No I have not Facility Operations
## 3 Yes I do Yes I do Yes I have Facility Operations
## 4 Maybe / not sure Yes I do Yes I have Facility Operations
## 5 Yes I do Yes I do Yes I have Facility Operations
## 6 Yes I do Yes I do Yes I have Facility Operations
## InstitutionRepresentation
## 1 Educational (Training Center, K-12, College / University)
## 2 Educational (Training Center, K-12, College / University)
## 3 Federal Government
## 4 Educational (Training Center, K-12, College / University)
## 5 Insurance (Health, Life, Auto, Mutual, Casualty, Flood)
## 6 Educational (Training Center, K-12, College / University)
## JobPath
## 1 Managerial (e.g. supervising people, budgets, and/or projects)
## 2 Managerial (e.g. supervising people, budgets, and/or projects)
## 3 Managerial (e.g. supervising people, budgets, and/or projects)
## 4 Managerial (e.g. supervising people, budgets, and/or projects)
## 5 Managerial (e.g. supervising people, budgets, and/or projects)
## 6 Managerial (e.g. supervising people, budgets, and/or projects)
## EmploymentStatus
## 1 In-house - I am employed directly by the facility owner
## 2 In-house - I am employed directly by the facility owner
## 3 In-house - I am employed directly by the facility owner
## 4 In-house - I am employed directly by the facility owner
## 5 Outsourced - I am employed by a contractor to provide services to the facility owner
## 6 In-house - I am employed directly by the facility owner
## CurrentPosLevel ManagementExp_Years
## 1 Level 3 - Manage supervisor who manage others 11-15 years
## 2 Level 4 - Manage two or more levels of supervisors More than 30 years
## 3 Level 4 - Manage two or more levels of supervisors 16-20 years
## 4 Level 4 - Manage two or more levels of supervisors More than 30 years
## 5 Level 2 - Manage employees but do not manage supervisors <NA>
## 6 Level 4 - Manage two or more levels of supervisors 26-30 years
## YearsToRetirement Age HighestEducationAttained Continent
## 1 More than 5 years 1979 - 1997 Bachelor's degree Africa
## 2 More than 5 years 1946 - 1964 Bachelor's degree South America
## 3 More than 5 years 1979 - 1997 Bachelor's degree Asia
## 4 More than 5 years 1965 - 1978 Bachelor's degree Asia
## 5 3-5 years 1965 - 1978 Bachelor's degree North America
## 6 More than 5 years 1965 - 1978 Bachelor's degree North America
#Summarise the subsetted data.
-99 has to be removed
subset %>% tbl_summary()
| Characteristic | N = 7561 |
|---|---|
| CurrentlyHaveMentor | |
| Â Â Â Â -99 | 3 (0.4%) |
| Â Â Â Â Maybe / not sure | 67 (8.9%) |
| Â Â Â Â No I don't | 468 (62%) |
| Â Â Â Â Yes I do | 218 (29%) |
| ServeAsMentor | |
| Â Â Â Â -99 | 7 (0.9%) |
| Â Â Â Â Maybe / not sure | 93 (12%) |
| Â Â Â Â No I don't | 272 (36%) |
| Â Â Â Â Yes I do | 384 (51%) |
| PC_ServeAsMentor | |
| Â Â Â Â Maybe / not sure | 53 (7.0%) |
| Â Â Â Â No I have not | 118 (16%) |
| Â Â Â Â Yes I have | 585 (77%) |
| PrimaryJobFunction | |
| Â Â Â Â Architecture | 2 (0.3%) |
| Â Â Â Â Construction/Project Management | 49 (6.5%) |
| Â Â Â Â Consulting | 38 (5.0%) |
| Â Â Â Â Education | 13 (1.7%) |
| Â Â Â Â Engineering | 18 (2.4%) |
| Â Â Â Â Environmental Health and Safety | 1 (0.1%) |
| Â Â Â Â Facility Operations | 545 (72%) |
| Â Â Â Â Information Technology | 6 (0.8%) |
| Â Â Â Â Interior Design/Space Planning | 8 (1.1%) |
| Â Â Â Â Janitorial | 4 (0.5%) |
| Â Â Â Â Other | 44 (5.8%) |
| Â Â Â Â Real Estate | 20 (2.6%) |
| Â Â Â Â Sales | 8 (1.1%) |
| InstitutionRepresentation | |
| Â Â Â Â Aircraft/Industrial (industrial Equipment, Aerospace) | 9 (1.2%) |
| Â Â Â Â Association (Association, Federation, Non-Profit Foundation, Society) | 25 (3.3%) |
| Â Â Â Â Banking (Consumer, Commercial, Savings, Credit Unions) | 40 (5.3%) |
| Â Â Â Â Building/Construction (Building, Construction Materials) | 21 (2.8%) |
| Â Â Â Â Charitable Foundation | 11 (1.5%) |
| Â Â Â Â Chemical/Pharmaceutical (Chemical, Pharmaceutical, Biotech) | 21 (2.8%) |
| Â Â Â Â City/County Government (Law Enforcement, Library, Parks / Public Open Space) | 56 (7.4%) |
| Â Â Â Â Computer (Computer hardware or software) | 8 (1.1%) |
| Â Â Â Â Consumer Products (Food, Paper, or related) | 9 (1.2%) |
| Â Â Â Â Corrections (private, state, federal, city, county) | 1 (0.1%) |
| Â Â Â Â Cultural Facilities (Private, Institutions, Government) | 28 (3.7%) |
| Â Â Â Â Educational (Training Center, K-12, College / University) | 85 (11%) |
| Â Â Â Â Electronics (Electronics, Telecommunications Equipment) | 7 (0.9%) |
| Â Â Â Â Energy (Energy related, mining, or distribution) | 12 (1.6%) |
| Â Â Â Â Federal Government | 30 (4.0%) |
| Â Â Â Â Health Care | 43 (5.7%) |
| Â Â Â Â Hospitality (Hotel, Restaurants, Hospitality-Related) | 23 (3.0%) |
| Â Â Â Â Information Services (Data Processing, Information Services, E-Commerce) | 18 (2.4%) |
| Â Â Â Â Insurance (Health, Life, Auto, Mutual, Casualty, Flood) | 25 (3.3%) |
| Â Â Â Â Investment Services (Securities and Investment Services) | 5 (0.7%) |
| Â Â Â Â Media (Broadcasting, Entertainment, Gaming, Media, Publishing) | 12 (1.6%) |
| Â Â Â Â Military | 2 (0.3%) |
| Â Â Â Â Motor Vehicles | 6 (0.8%) |
| Â Â Â Â Other Institution: | 76 (10%) |
| Â Â Â Â Professional Services (Legal, Accounting, Consulting, Engineering, Architecture) | 80 (11%) |
| Â Â Â Â Religious | 12 (1.6%) |
| Â Â Â Â Research | 17 (2.2%) |
| Â Â Â Â Special Districts/ Quasi-government (Transportation Authorities, School Boards) | 3 (0.4%) |
| Â Â Â Â State/Provincial Government | 13 (1.7%) |
| Â Â Â Â Telecommunications (Telecommunication, Internet Services/Products) | 16 (2.1%) |
| Â Â Â Â Trade (Wholesale, Retail) | 15 (2.0%) |
| Â Â Â Â Transportation (Transportation, Freight) | 9 (1.2%) |
| Â Â Â Â Utilities (Water, Gas, Electric, Energy Management) | 18 (2.4%) |
| JobPath | |
| Â Â Â Â Managerial (e.g. supervising people, budgets, and/or projects) | 675 (89%) |
| Â Â Â Â Other | 40 (5.3%) |
| Â Â Â Â Technical (e.g. mechanical or systems focus - do not manage people of budgets) | 40 (5.3%) |
| Â Â Â Â Unknown | 1 |
| EmploymentStatus | |
| Â Â Â Â In-house - I am employed directly by the facility owner | 580 (81%) |
| Â Â Â Â Outsourced - I am employed by a contractor to provide services to the facility owner | 138 (19%) |
| Â Â Â Â Unknown | 38 |
| CurrentPosLevel | |
| Â Â Â Â Level 1 - Professional specialist (manage no employees) | 55 (8.3%) |
| Â Â Â Â Level 2 - Manage employees but do not manage supervisors | 136 (21%) |
| Â Â Â Â Level 3 - Manage supervisor who manage others | 174 (26%) |
| Â Â Â Â Level 4 - Manage two or more levels of supervisors | 167 (25%) |
| Â Â Â Â Level 5 - Senior executive | 129 (20%) |
| Â Â Â Â Unknown | 95 |
| ManagementExp_Years | |
| Â Â Â Â 1-2 years | 19 (4.2%) |
| Â Â Â Â 11-15 years | 90 (20%) |
| Â Â Â Â 16-20 years | 74 (16%) |
| Â Â Â Â 21-25 years | 67 (15%) |
| Â Â Â Â 26-30 years | 30 (6.6%) |
| Â Â Â Â 3-5 years | 38 (8.4%) |
| Â Â Â Â 6-10 years | 85 (19%) |
| Â Â Â Â More than 30 years | 49 (11%) |
| Â Â Â Â Unknown | 304 |
| YearsToRetirement | |
| Â Â Â Â 1-2 years | 31 (4.1%) |
| Â Â Â Â 3-5 years | 106 (14%) |
| Â Â Â Â More than 5 years | 580 (77%) |
| Â Â Â Â Within the next year | 36 (4.8%) |
| Â Â Â Â Unknown | 3 |
| Age | |
| Â Â Â Â 1946 - 1964 | 193 (26%) |
| Â Â Â Â 1965 - 1978 | 319 (42%) |
| Â Â Â Â 1979 - 1997 | 232 (31%) |
| Â Â Â Â 1998 or later | 7 (0.9%) |
| Â Â Â Â Prior to 1946 | 1 (0.1%) |
| Â Â Â Â Unknown | 4 |
| HighestEducationAttained | |
| Â Â Â Â Associate's degree | 43 (5.7%) |
| Â Â Â Â Bachelor's degree | 289 (38%) |
| Â Â Â Â Doctorate degree | 12 (1.6%) |
| Â Â Â Â High school graduate or equivalent | 30 (4.0%) |
| Â Â Â Â Master's degree | 239 (32%) |
| Â Â Â Â Other | 5 (0.7%) |
| Â Â Â Â Some college, no degree | 87 (12%) |
| Â Â Â Â Vocational certificate, no degree | 50 (6.6%) |
| Â Â Â Â Unknown | 1 |
| Continent | |
| Â Â Â Â Africa | 35 (4.6%) |
| Â Â Â Â Asia | 80 (11%) |
| Â Â Â Â Australia | 5 (0.7%) |
| Â Â Â Â Europe | 48 (6.4%) |
| Â Â Â Â North America | 568 (75%) |
| Â Â Â Â South America | 19 (2.5%) |
| Â Â Â Â Unknown | 1 |
| 1 n (%) | |
subset %>%
tbl_summary(by = CurrentPosLevel)
## 95 observations missing `CurrentPosLevel` have been removed. To include these observations, use `forcats::fct_na_value_to_level()` on `CurrentPosLevel` column before passing to `tbl_summary()`.
| Characteristic | Level 1 - Professional specialist (manage no employees), N = 551 | Level 2 - Manage employees but do not manage supervisors, N = 1361 | Level 3 - Manage supervisor who manage others, N = 1741 | Level 4 - Manage two or more levels of supervisors, N = 1671 | Level 5 - Senior executive, N = 1291 |
|---|---|---|---|---|---|
| CurrentlyHaveMentor | |||||
| Â Â Â Â -99 | 0 (0%) | 0 (0%) | 2 (1.1%) | 1 (0.6%) | 0 (0%) |
| Â Â Â Â Maybe / not sure | 4 (7.3%) | 17 (13%) | 17 (9.8%) | 13 (7.8%) | 9 (7.0%) |
| Â Â Â Â No I don't | 37 (67%) | 83 (61%) | 111 (64%) | 96 (57%) | 78 (60%) |
| Â Â Â Â Yes I do | 14 (25%) | 36 (26%) | 44 (25%) | 57 (34%) | 42 (33%) |
| ServeAsMentor | |||||
| Â Â Â Â -99 | 0 (0%) | 1 (0.7%) | 2 (1.1%) | 0 (0%) | 2 (1.6%) |
| Â Â Â Â Maybe / not sure | 8 (15%) | 23 (17%) | 22 (13%) | 16 (9.6%) | 14 (11%) |
| Â Â Â Â No I don't | 29 (53%) | 62 (46%) | 65 (37%) | 46 (28%) | 25 (19%) |
| Â Â Â Â Yes I do | 18 (33%) | 50 (37%) | 85 (49%) | 105 (63%) | 88 (68%) |
| PC_ServeAsMentor | |||||
| Â Â Â Â Maybe / not sure | 8 (15%) | 16 (12%) | 10 (5.7%) | 6 (3.6%) | 4 (3.1%) |
| Â Â Â Â No I have not | 12 (22%) | 31 (23%) | 32 (18%) | 14 (8.4%) | 8 (6.2%) |
| Â Â Â Â Yes I have | 35 (64%) | 89 (65%) | 132 (76%) | 147 (88%) | 117 (91%) |
| PrimaryJobFunction | |||||
| Â Â Â Â Architecture | 1 (1.8%) | 0 (0%) | 1 (0.6%) | 0 (0%) | 0 (0%) |
| Â Â Â Â Construction/Project Management | 9 (16%) | 8 (5.9%) | 14 (8.0%) | 8 (4.8%) | 5 (3.9%) |
| Â Â Â Â Consulting | 7 (13%) | 2 (1.5%) | 5 (2.9%) | 2 (1.2%) | 14 (11%) |
| Â Â Â Â Education | 2 (3.6%) | 1 (0.7%) | 1 (0.6%) | 1 (0.6%) | 1 (0.8%) |
| Â Â Â Â Engineering | 0 (0%) | 2 (1.5%) | 3 (1.7%) | 2 (1.2%) | 4 (3.1%) |
| Â Â Â Â Environmental Health and Safety | 0 (0%) | 0 (0%) | 0 (0%) | 0 (0%) | 1 (0.8%) |
| Â Â Â Â Facility Operations | 30 (55%) | 109 (80%) | 134 (77%) | 138 (83%) | 84 (65%) |
| Â Â Â Â Information Technology | 0 (0%) | 2 (1.5%) | 1 (0.6%) | 0 (0%) | 1 (0.8%) |
| Â Â Â Â Interior Design/Space Planning | 0 (0%) | 3 (2.2%) | 2 (1.1%) | 2 (1.2%) | 0 (0%) |
| Â Â Â Â Janitorial | 0 (0%) | 0 (0%) | 1 (0.6%) | 1 (0.6%) | 1 (0.8%) |
| Â Â Â Â Other | 3 (5.5%) | 6 (4.4%) | 10 (5.7%) | 6 (3.6%) | 10 (7.8%) |
| Â Â Â Â Real Estate | 1 (1.8%) | 0 (0%) | 2 (1.1%) | 7 (4.2%) | 8 (6.2%) |
| Â Â Â Â Sales | 2 (3.6%) | 3 (2.2%) | 0 (0%) | 0 (0%) | 0 (0%) |
| InstitutionRepresentation | |||||
| Â Â Â Â Aircraft/Industrial (industrial Equipment, Aerospace) | 0 (0%) | 0 (0%) | 4 (2.3%) | 5 (3.0%) | 0 (0%) |
| Â Â Â Â Association (Association, Federation, Non-Profit Foundation, Society) | 0 (0%) | 3 (2.2%) | 8 (4.6%) | 9 (5.4%) | 4 (3.1%) |
| Â Â Â Â Banking (Consumer, Commercial, Savings, Credit Unions) | 5 (9.1%) | 9 (6.6%) | 9 (5.2%) | 5 (3.0%) | 8 (6.2%) |
| Â Â Â Â Building/Construction (Building, Construction Materials) | 0 (0%) | 4 (2.9%) | 4 (2.3%) | 4 (2.4%) | 3 (2.3%) |
| Â Â Â Â Charitable Foundation | 1 (1.8%) | 2 (1.5%) | 6 (3.4%) | 0 (0%) | 0 (0%) |
| Â Â Â Â Chemical/Pharmaceutical (Chemical, Pharmaceutical, Biotech) | 1 (1.8%) | 6 (4.4%) | 4 (2.3%) | 6 (3.6%) | 3 (2.3%) |
| Â Â Â Â City/County Government (Law Enforcement, Library, Parks / Public Open Space) | 3 (5.5%) | 6 (4.4%) | 16 (9.2%) | 21 (13%) | 8 (6.2%) |
| Â Â Â Â Computer (Computer hardware or software) | 2 (3.6%) | 3 (2.2%) | 1 (0.6%) | 0 (0%) | 1 (0.8%) |
| Â Â Â Â Consumer Products (Food, Paper, or related) | 3 (5.5%) | 3 (2.2%) | 2 (1.1%) | 0 (0%) | 0 (0%) |
| Â Â Â Â Corrections (private, state, federal, city, county) | 0 (0%) | 0 (0%) | 1 (0.6%) | 0 (0%) | 0 (0%) |
| Â Â Â Â Cultural Facilities (Private, Institutions, Government) | 0 (0%) | 8 (5.9%) | 5 (2.9%) | 5 (3.0%) | 6 (4.7%) |
| Â Â Â Â Educational (Training Center, K-12, College / University) | 4 (7.3%) | 10 (7.4%) | 17 (9.8%) | 27 (16%) | 16 (12%) |
| Â Â Â Â Electronics (Electronics, Telecommunications Equipment) | 0 (0%) | 0 (0%) | 4 (2.3%) | 2 (1.2%) | 1 (0.8%) |
| Â Â Â Â Energy (Energy related, mining, or distribution) | 1 (1.8%) | 4 (2.9%) | 1 (0.6%) | 1 (0.6%) | 1 (0.8%) |
| Â Â Â Â Federal Government | 4 (7.3%) | 4 (2.9%) | 6 (3.4%) | 9 (5.4%) | 3 (2.3%) |
| Â Â Â Â Health Care | 3 (5.5%) | 3 (2.2%) | 9 (5.2%) | 13 (7.8%) | 12 (9.3%) |
| Â Â Â Â Hospitality (Hotel, Restaurants, Hospitality-Related) | 1 (1.8%) | 1 (0.7%) | 7 (4.0%) | 6 (3.6%) | 6 (4.7%) |
| Â Â Â Â Information Services (Data Processing, Information Services, E-Commerce) | 1 (1.8%) | 8 (5.9%) | 6 (3.4%) | 1 (0.6%) | 2 (1.6%) |
| Â Â Â Â Insurance (Health, Life, Auto, Mutual, Casualty, Flood) | 1 (1.8%) | 8 (5.9%) | 6 (3.4%) | 4 (2.4%) | 3 (2.3%) |
| Â Â Â Â Investment Services (Securities and Investment Services) | 1 (1.8%) | 0 (0%) | 2 (1.1%) | 0 (0%) | 1 (0.8%) |
| Â Â Â Â Media (Broadcasting, Entertainment, Gaming, Media, Publishing) | 1 (1.8%) | 0 (0%) | 1 (0.6%) | 1 (0.6%) | 5 (3.9%) |
| Â Â Â Â Military | 0 (0%) | 0 (0%) | 1 (0.6%) | 0 (0%) | 1 (0.8%) |
| Â Â Â Â Motor Vehicles | 0 (0%) | 1 (0.7%) | 1 (0.6%) | 3 (1.8%) | 1 (0.8%) |
| Â Â Â Â Other Institution: | 6 (11%) | 10 (7.4%) | 13 (7.5%) | 15 (9.0%) | 12 (9.3%) |
| Â Â Â Â Professional Services (Legal, Accounting, Consulting, Engineering, Architecture) | 12 (22%) | 13 (9.6%) | 13 (7.5%) | 11 (6.6%) | 21 (16%) |
| Â Â Â Â Religious | 0 (0%) | 5 (3.7%) | 4 (2.3%) | 2 (1.2%) | 0 (0%) |
| Â Â Â Â Research | 1 (1.8%) | 4 (2.9%) | 4 (2.3%) | 3 (1.8%) | 2 (1.6%) |
| Â Â Â Â Special Districts/ Quasi-government (Transportation Authorities, School Boards) | 0 (0%) | 1 (0.7%) | 0 (0%) | 1 (0.6%) | 1 (0.8%) |
| Â Â Â Â State/Provincial Government | 1 (1.8%) | 4 (2.9%) | 3 (1.7%) | 1 (0.6%) | 1 (0.8%) |
| Â Â Â Â Telecommunications (Telecommunication, Internet Services/Products) | 1 (1.8%) | 3 (2.2%) | 3 (1.7%) | 4 (2.4%) | 3 (2.3%) |
| Â Â Â Â Trade (Wholesale, Retail) | 1 (1.8%) | 4 (2.9%) | 7 (4.0%) | 2 (1.2%) | 0 (0%) |
| Â Â Â Â Transportation (Transportation, Freight) | 0 (0%) | 2 (1.5%) | 3 (1.7%) | 3 (1.8%) | 0 (0%) |
| Â Â Â Â Utilities (Water, Gas, Electric, Energy Management) | 1 (1.8%) | 7 (5.1%) | 3 (1.7%) | 3 (1.8%) | 4 (3.1%) |
| JobPath | |||||
| Â Â Â Â Managerial (e.g. supervising people, budgets, and/or projects) | 55 (100%) | 136 (100%) | 174 (100%) | 167 (100%) | 129 (100%) |
| EmploymentStatus | |||||
| Â Â Â Â In-house - I am employed directly by the facility owner | 38 (76%) | 111 (86%) | 139 (82%) | 133 (81%) | 98 (80%) |
| Â Â Â Â Outsourced - I am employed by a contractor to provide services to the facility owner | 12 (24%) | 18 (14%) | 31 (18%) | 32 (19%) | 25 (20%) |
| Â Â Â Â Unknown | 5 | 7 | 4 | 2 | 6 |
| ManagementExp_Years | |||||
| Â Â Â Â 1-2 years | 5 (18%) | 7 (7.5%) | 3 (2.5%) | 3 (2.4%) | 0 (0%) |
| Â Â Â Â 11-15 years | 7 (25%) | 16 (17%) | 28 (23%) | 30 (24%) | 8 (11%) |
| Â Â Â Â 16-20 years | 3 (11%) | 9 (9.7%) | 18 (15%) | 30 (24%) | 13 (17%) |
| Â Â Â Â 21-25 years | 1 (3.6%) | 8 (8.6%) | 14 (12%) | 22 (17%) | 19 (25%) |
| Â Â Â Â 26-30 years | 1 (3.6%) | 3 (3.2%) | 7 (5.8%) | 11 (8.7%) | 8 (11%) |
| Â Â Â Â 3-5 years | 1 (3.6%) | 20 (22%) | 11 (9.1%) | 2 (1.6%) | 4 (5.3%) |
| Â Â Â Â 6-10 years | 8 (29%) | 23 (25%) | 33 (27%) | 12 (9.4%) | 8 (11%) |
| Â Â Â Â More than 30 years | 2 (7.1%) | 7 (7.5%) | 7 (5.8%) | 17 (13%) | 16 (21%) |
| Â Â Â Â Unknown | 27 | 43 | 53 | 40 | 53 |
| YearsToRetirement | |||||
| Â Â Â Â 1-2 years | 1 (1.8%) | 6 (4.4%) | 7 (4.0%) | 7 (4.2%) | 7 (5.5%) |
| Â Â Â Â 3-5 years | 8 (15%) | 10 (7.4%) | 23 (13%) | 31 (19%) | 23 (18%) |
| Â Â Â Â More than 5 years | 43 (78%) | 116 (85%) | 138 (79%) | 120 (73%) | 88 (69%) |
| Â Â Â Â Within the next year | 3 (5.5%) | 4 (2.9%) | 6 (3.4%) | 7 (4.2%) | 10 (7.8%) |
| Â Â Â Â Unknown | 0 | 0 | 0 | 2 | 1 |
| Age | |||||
| Â Â Â Â 1946 - 1964 | 11 (20%) | 23 (17%) | 38 (22%) | 49 (30%) | 50 (39%) |
| Â Â Â Â 1965 - 1978 | 16 (30%) | 57 (42%) | 78 (45%) | 67 (41%) | 61 (47%) |
| Â Â Â Â 1979 - 1997 | 24 (44%) | 54 (40%) | 57 (33%) | 48 (29%) | 17 (13%) |
| Â Â Â Â 1998 or later | 3 (5.6%) | 2 (1.5%) | 0 (0%) | 1 (0.6%) | 0 (0%) |
| Â Â Â Â Prior to 1946 | 0 (0%) | 0 (0%) | 0 (0%) | 0 (0%) | 1 (0.8%) |
| Â Â Â Â Unknown | 1 | 0 | 1 | 2 | 0 |
| HighestEducationAttained | |||||
| Â Â Â Â Associate's degree | 2 (3.6%) | 6 (4.4%) | 7 (4.0%) | 13 (7.8%) | 9 (7.0%) |
| Â Â Â Â Bachelor's degree | 23 (42%) | 60 (44%) | 71 (41%) | 62 (37%) | 36 (28%) |
| Â Â Â Â Doctorate degree | 0 (0%) | 0 (0%) | 1 (0.6%) | 0 (0%) | 8 (6.2%) |
| Â Â Â Â High school graduate or equivalent | 3 (5.5%) | 5 (3.7%) | 6 (3.4%) | 6 (3.6%) | 3 (2.3%) |
| Â Â Â Â Master's degree | 15 (27%) | 30 (22%) | 51 (29%) | 57 (34%) | 63 (49%) |
| Â Â Â Â Other | 1 (1.8%) | 3 (2.2%) | 1 (0.6%) | 0 (0%) | 0 (0%) |
| Â Â Â Â Some college, no degree | 9 (16%) | 24 (18%) | 20 (11%) | 21 (13%) | 3 (2.3%) |
| Â Â Â Â Vocational certificate, no degree | 2 (3.6%) | 8 (5.9%) | 17 (9.8%) | 7 (4.2%) | 7 (5.4%) |
| Â Â Â Â Unknown | 0 | 0 | 0 | 1 | 0 |
| Continent | |||||
| Â Â Â Â Africa | 2 (3.6%) | 4 (3.0%) | 5 (2.9%) | 13 (7.8%) | 5 (3.9%) |
| Â Â Â Â Asia | 4 (7.3%) | 8 (5.9%) | 17 (9.8%) | 19 (11%) | 24 (19%) |
| Â Â Â Â Australia | 1 (1.8%) | 1 (0.7%) | 1 (0.6%) | 2 (1.2%) | 0 (0%) |
| Â Â Â Â Europe | 5 (9.1%) | 9 (6.7%) | 7 (4.0%) | 7 (4.2%) | 16 (12%) |
| Â Â Â Â North America | 43 (78%) | 109 (81%) | 137 (79%) | 121 (72%) | 82 (64%) |
| Â Â Â Â South America | 0 (0%) | 4 (3.0%) | 7 (4.0%) | 5 (3.0%) | 2 (1.6%) |
| Â Â Â Â Unknown | 0 | 1 | 0 | 0 | 0 |
| 1 n (%) | |||||
#Lets explore the Hexaco data**
hexaco <- df %>% select(49,54,59,64,69,74)
head(hexaco)
## Honesty/Humility Emotionality Extraversion Agreeableness Conscientiousness
## 1 4.42 3.17 3.42 4.67 4.54
## 2 4.25 2.54 4.04 3.38 4.71
## 3 4.29 1.96 3.71 4.13 3.92
## 4 3.79 2.96 3.21 3.38 3.42
## 5 4.08 2.71 3.67 3.58 4.42
## 6 3.79 2.13 3.29 3.58 4.33
## Openness to Experience
## 1 3.33
## 2 3.88
## 3 4.04
## 4 2.54
## 5 2.58
## 6 2.71
#Summary of hexaco data
flextable(describe(hexaco) %>% select(1,2,3,4,5))
described_variables | n | na | mean | sd |
|---|---|---|---|---|
Honesty/Humility | 756 | 0 | 3.907831 | 0.4800359 |
Emotionality | 756 | 0 | 2.782368 | 0.5519061 |
Extraversion | 756 | 0 | 3.568135 | 0.5464286 |
Agreeableness | 756 | 0 | 3.412407 | 0.5211523 |
Conscientiousness | 756 | 0 | 4.063968 | 0.4541863 |
Openness to Experience | 756 | 0 | 3.184894 | 0.4951469 |
hexaco %>% tbl_summary(statistic = list(
all_continuous() ~ "{mean} ({sd})"))
| Characteristic | N = 7561 |
|---|---|
| Honesty/Humility | 3.91 (0.48) |
| Emotionality | 2.78 (0.55) |
| Extraversion | 3.57 (0.55) |
| Agreeableness | 3.41 (0.52) |
| Conscientiousness | 4.06 (0.45) |
| Openness to Experience | 3.18 (0.50) |
| 1 Mean (SD) | |
#Comparison between CurrentPoslevel personality traits.
hexaco_level <- df %>% select(49,54,59,64,69,74)
head(hexaco_level)
## Honesty/Humility Emotionality Extraversion Agreeableness Conscientiousness
## 1 4.42 3.17 3.42 4.67 4.54
## 2 4.25 2.54 4.04 3.38 4.71
## 3 4.29 1.96 3.71 4.13 3.92
## 4 3.79 2.96 3.21 3.38 3.42
## 5 4.08 2.71 3.67 3.58 4.42
## 6 3.79 2.13 3.29 3.58 4.33
## Openness to Experience
## 1 3.33
## 2 3.88
## 3 4.04
## 4 2.54
## 5 2.58
## 6 2.71
hexaco_level$CurrentPosLevel <- demo$CurrentPosLevel # add gender column to the hexaco data
head(hexaco_level)
## Honesty/Humility Emotionality Extraversion Agreeableness Conscientiousness
## 1 4.42 3.17 3.42 4.67 4.54
## 2 4.25 2.54 4.04 3.38 4.71
## 3 4.29 1.96 3.71 4.13 3.92
## 4 3.79 2.96 3.21 3.38 3.42
## 5 4.08 2.71 3.67 3.58 4.42
## 6 3.79 2.13 3.29 3.58 4.33
## Openness to Experience
## 1 3.33
## 2 3.88
## 3 4.04
## 4 2.54
## 5 2.58
## 6 2.71
## CurrentPosLevel
## 1 Level 3 - Manage supervisor who manage others
## 2 Level 4 - Manage two or more levels of supervisors
## 3 Level 4 - Manage two or more levels of supervisors
## 4 Level 4 - Manage two or more levels of supervisors
## 5 Level 2 - Manage employees but do not manage supervisors
## 6 Level 4 - Manage two or more levels of supervisors
hexaco_level %>%
tbl_summary(
by = CurrentPosLevel,
statistic = list(
all_continuous() ~ "{mean} ({sd})",
all_categorical() ~ "{n} / {N} ({p}%)"
),
digits = all_continuous() ~ 2,
) %>% add_p()
## 95 observations missing `CurrentPosLevel` have been removed. To include these observations, use `forcats::fct_na_value_to_level()` on `CurrentPosLevel` column before passing to `tbl_summary()`.
| Characteristic | Level 1 - Professional specialist (manage no employees), N = 551 | Level 2 - Manage employees but do not manage supervisors, N = 1361 | Level 3 - Manage supervisor who manage others, N = 1741 | Level 4 - Manage two or more levels of supervisors, N = 1671 | Level 5 - Senior executive, N = 1291 | p-value2 |
|---|---|---|---|---|---|---|
| Honesty/Humility | 3.81 (0.61) | 3.91 (0.48) | 3.91 (0.48) | 3.93 (0.45) | 3.94 (0.47) | >0.9 |
| Emotionality | 2.96 (0.55) | 2.82 (0.57) | 2.76 (0.58) | 2.69 (0.50) | 2.74 (0.56) | 0.031 |
| Extraversion | 3.43 (0.64) | 3.48 (0.52) | 3.52 (0.55) | 3.65 (0.49) | 3.74 (0.48) | <0.001 |
| Agreeableness | 3.29 (0.57) | 3.35 (0.57) | 3.45 (0.47) | 3.44 (0.50) | 3.47 (0.49) | 0.3 |
| Conscientiousness | 4.01 (0.47) | 4.02 (0.45) | 4.00 (0.49) | 4.10 (0.42) | 4.16 (0.45) | 0.018 |
| Openness to Experience | 3.18 (0.50) | 3.15 (0.45) | 3.19 (0.52) | 3.20 (0.51) | 3.22 (0.45) | 0.5 |
| 1 Mean (SD) | ||||||
| 2 Kruskal-Wallis rank sum test | ||||||
#Impact of Hexaco on Emotional intelligence
hexaco_EQ <- df %>% select(49,54,59,64,69,74,78)
head(hexaco_EQ)
## Honesty/Humility Emotionality Extraversion Agreeableness Conscientiousness
## 1 4.42 3.17 3.42 4.67 4.54
## 2 4.25 2.54 4.04 3.38 4.71
## 3 4.29 1.96 3.71 4.13 3.92
## 4 3.79 2.96 3.21 3.38 3.42
## 5 4.08 2.71 3.67 3.58 4.42
## 6 3.79 2.13 3.29 3.58 4.33
## Openness to Experience Overall EQ
## 1 3.33 87
## 2 3.88 88
## 3 4.04 86
## 4 2.54 79
## 5 2.58 84
## 6 2.71 72
library(metan)
## Warning: package 'metan' was built under R version 4.3.3
## Registered S3 method overwritten by 'GGally':
## method from
## +.gg ggplot2
## Warning in check_dep_version(): ABI version mismatch:
## lme4 was built with Matrix ABI version 1
## Current Matrix ABI version is 0
## Please re-install lme4 from source or restore original 'Matrix' package
## |=========================================================|
## | Multi-Environment Trial Analysis (metan) v1.18.0 |
## | Author: Tiago Olivoto |
## | Type 'citation('metan')' to know how to cite metan |
## | Type 'vignette('metan_start')' for a short tutorial |
## | Visit 'https://bit.ly/pkgmetan' for a complete tutorial |
## |=========================================================|
##
## Attaching package: 'metan'
## The following object is masked from 'package:factoextra':
##
## get_dist
## The following object is masked from 'package:caret':
##
## progress
## The following object is masked from 'package:dlookr':
##
## find_outliers
## The following object is masked from 'package:forcats':
##
## as_factor
## The following object is masked from 'package:dplyr':
##
## recode_factor
## The following object is masked from 'package:tidyr':
##
## replace_na
## The following objects are masked from 'package:tibble':
##
## column_to_rownames, remove_rownames, rownames_to_column
corr <- corr_coef(hexaco_EQ)
plot(corr)