Assessing Interprofessional Education (IPE) Facilitation Skills in Students

This analysis evaluates students’ facilitation skills in Interprofessional Education (IPE) using survey data collected before and after participating in the program. The pre-survey captures students’ competency levels prior to attending, while the post-survey assesses their skills after completing the program, providing insights into the program’s impact.

To begin, we first examine the demographics of students who participated in the pre-survey.

library(gtools)
## Warning: package 'gtools' was built under R version 4.3.3
library(ggplot2)
library(tidyr)
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
library(readxl)
library(plotly)
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
pre_survey <- read_excel('/Users/ramyaamudapakula/Desktop/School/SEM3/CEA/Julie Survey/Pre-Expand Interprofessional Facilitation Scale (IPFS) 24-25_March 4, 2025_14.47.xlsx', sheet = 1)
pre_survey <- pre_survey[-1, ]  #ignoring the first row(just a heading column)
pre_survey
## # A tibble: 43 × 35
##    StartDate   EndDate Status IPAddress Progress Duration (in seconds…¹ Finished
##    <chr>       <chr>   <chr>  <chr>     <chr>    <chr>                  <chr>   
##  1 45548.3879… 45548.… IP Ad… 134.68.2… 100      341                    True    
##  2 45549.4761… 45549.… IP Ad… 68.58.14… 100      8927                   True    
##  3 45550.6757… 45550.… IP Ad… 66.244.8… 100      52                     True    
##  4 45551.8686… 45551.… IP Ad… 68.38.14… 100      114                    True    
##  5 45551.9647… 45551.… IP Ad… 96.63.22… 100      122                    True    
##  6 45552.4622… 45552.… IP Ad… 149.163.… 100      46                     True    
##  7 45553.4262… 45553.… IP Ad… 68.50.72… 100      82                     True    
##  8 45553.8411… 45553.… IP Ad… 66.244.6… 100      40                     True    
##  9 45554.5264… 45554.… IP Ad… 38.124.1… 100      72                     True    
## 10 45558.5225… 45558.… IP Ad… 134.68.1… 100      155                    True    
## # ℹ 33 more rows
## # ℹ abbreviated name: ¹​`Duration (in seconds)`
## # ℹ 28 more variables: RecordedDate <chr>, ResponseId <chr>,
## #   LocationLatitude <chr>, LocationLongitude <chr>, DistributionChannel <chr>,
## #   UserLanguage <chr>, IPFS_1 <chr>, IPFS_2 <chr>, IPFS_3 <chr>, IPFS_4 <chr>,
## #   IPFS_5 <chr>, IPFS_6 <chr>, IPFS_7 <chr>, IPFS_8 <chr>, IPFS_9 <chr>,
## #   IPFS_10 <chr>, IPFS_11 <chr>, IPFS_12 <chr>, IPFS_13 <chr>, …

In the pre-survey, we received 43 responses. Since the only demographic-related question asked was about the students’ academic programs, let’s take a closer look at their distribution across different programs.

pre_survey_programs <- pre_survey %>%
  group_by(Program) %>%
  summarise(Count = n())
pre_survey_programs
## # A tibble: 4 × 2
##   Program                   Count
##   <chr>                     <int>
## 1 Medicine                      1
## 2 Nursing (Graduate)            7
## 3 Nursing (Traditional BSN)    34
## 4 Occupational Therapy          1

Let’s visualize our results for better interpretation

pre_survey_programs_plot <- ggplot(pre_survey_programs, aes(x = Program, y = Count, fill = Program))+
  geom_col()+
  labs(title = "Distribution of Pre-Survey Responses Across Programs",
       x = 'Programs',
       y = 'Number of Students')+
  theme_light()+
  theme(axis.text.x = element_text(angle = 45, hjust = 0.9))
pre_survey_programs_plot

Next, let’s examine the responses provided by students in the pre-survey for each of the IPE competencies, which are denoted by ‘IPFS’.

competency_data <- pre_survey %>%
  select(starts_with("IPFS")) %>%  #selecting only the columns starting with "IPFS" from the dataset
  #changing wide fromat to long format
  pivot_longer(
    cols = everything(),           
    names_to = "Competency",       
    values_to = "Response"
  )
print(competency_data)
## # A tibble: 774 × 2
##    Competency Response 
##    <chr>      <chr>    
##  1 IPFS_1     Excellent
##  2 IPFS_2     Excellent
##  3 IPFS_3     Good     
##  4 IPFS_4     Good     
##  5 IPFS_5     Excellent
##  6 IPFS_6     Fair     
##  7 IPFS_7     Good     
##  8 IPFS_8     Excellent
##  9 IPFS_9     Excellent
## 10 IPFS_10    Good     
## # ℹ 764 more rows

Now, let’s group and count the responses for each competency.

#sorting the Competency column alphabetically and making sure that the competencies are ordered correctly(or else 'IPFS_10' occurs before 'IPFS_2'.)
competency_data <- competency_data %>%
  mutate(Competency = factor(Competency, levels = mixedsort(unique(Competency))))
#grouping and counting the responses for each competency
summary <- competency_data %>%
  group_by(Competency, Response) %>%
  summarise(Count = n(), .groups = "drop") %>%
  mutate(Percentage = (Count / sum(Count)) * 100)
summary
## # A tibble: 61 × 4
##    Competency Response  Count Percentage
##    <fct>      <chr>     <int>      <dbl>
##  1 IPFS_1     Excellent    16      2.07 
##  2 IPFS_1     Fair          2      0.258
##  3 IPFS_1     Good         25      3.23 
##  4 IPFS_2     Excellent    18      2.33 
##  5 IPFS_2     Fair          2      0.258
##  6 IPFS_2     Good         23      2.97 
##  7 IPFS_3     Excellent    14      1.81 
##  8 IPFS_3     Fair          8      1.03 
##  9 IPFS_3     Good         21      2.71 
## 10 IPFS_4     Excellent     9      1.16 
## # ℹ 51 more rows

Now, let’s visualize the responses for each competency provided by students in the pre-survey.

pre_competency_data_plot <- ggplot(summary, aes(x = Competency, y = Count, fill = Response)) +
  geom_bar(stat = "identity", position = "dodge") +
  scale_x_discrete(limits = sort(unique(summary$Competency))) + 
  labs(title = "Student Responses for Each Competency in Pre-Survey",
       x = "Competency",
       y = "Count") +
  theme_minimal() +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

#Using plotly for a more interactive plot(to include hover data)
pre_competency_data_plot <- ggplotly(pre_competency_data_plot, tooltip = c("Competency", "Response", "Count", "Percentage"))

pre_competency_data_plot

From the graph, we can see that the need for the program arises from the fact that most students rated their competencies as “Good,” with some even selecting “Poor.” This indicates a clear opportunity for improvement, making the program crucial in enhancing students’ skills and proficiency in IPE.

Next, let’s compare the pre-survey and post-survey data.

We will only include the responses from students who completed both the pre and post surveys to eliminate any potential bias in our analysis. This will allow us to accurately evaluate whether the program had an impact on students’ performance.

Loading the Datasets

(Only considering the students who have responded to both pre and post surveys to exclude any biased results in our analysis)

Pre-Survey Data

pre <- read_excel('/Users/ramyaamudapakula/Desktop/School/SEM3/CEA/Julie Survey/Pre-Expand Interprofessional Facilitation Scale (IPFS) 24-25_March 4, 2025_14.47.xlsx', sheet = 2)
#ignoring the first row(just a heading column)
pre <- pre[-1, ]
pre
## # A tibble: 16 × 35
##    StartDate   EndDate Status IPAddress Progress Duration (in seconds…¹ Finished
##    <chr>       <chr>   <chr>  <chr>     <chr>    <chr>                  <chr>   
##  1 45551.9647… 45551.… IP Ad… 96.63.22… 100      122                    True    
##  2 45552.4622… 45552.… IP Ad… 149.163.… 100      46                     True    
##  3 45554.5264… 45554.… IP Ad… 38.124.1… 100      72                     True    
##  4 45563.9086… 45563.… IP Ad… 73.146.1… 100      92                     True    
##  5 45572.8801… 45572.… IP Ad… 96.64.13… 100      175                    True    
##  6 45581.4943… 45581.… IP Ad… 104.28.1… 100      108                    True    
##  7 45587.6090… 45587.… IP Ad… 68.38.14… 100      143                    True    
##  8 45589.5094… 45589.… IP Ad… 38.124.1… 100      7968                   True    
##  9 45593.7648… 45593.… IP Ad… 134.6.13… 100      146                    True    
## 10 45594.5773… 45594.… IP Ad… 153.33.2… 100      433                    True    
## 11 45599.7229… 45599.… IP Ad… 174.226.… 100      145                    True    
## 12 45602.5363… 45602.… IP Ad… 96.63.22… 100      751                    True    
## 13 45677.3681… 45677.… IP Ad… 162.142.… 100      2747                   True    
## 14 45677.9225… 45677.… IP Ad… 68.51.11… 100      417                    True    
## 15 45682.4986… 45682.… IP Ad… 131.187.… 100      142                    True    
## 16 45688.4014… 45688.… IP Ad… 68.44.17… 100      125                    True    
## # ℹ abbreviated name: ¹​`Duration (in seconds)`
## # ℹ 28 more variables: RecordedDate <chr>, ResponseId <chr>,
## #   LocationLatitude <chr>, LocationLongitude <chr>, DistributionChannel <chr>,
## #   UserLanguage <chr>, IPFS_1 <chr>, IPFS_2 <chr>, IPFS_3 <chr>, IPFS_4 <chr>,
## #   IPFS_5 <chr>, IPFS_6 <chr>, IPFS_7 <chr>, IPFS_8 <chr>, IPFS_9 <chr>,
## #   IPFS_10 <chr>, IPFS_11 <chr>, IPFS_12 <chr>, IPFS_13 <chr>, IPFS_14 <chr>,
## #   IPFS_15 <chr>, IPFS_16 <chr>, IPFS_17 <chr>, IPFS_18 <chr>, First <chr>, …

Post-Survey Data

post <- read_excel('/Users/ramyaamudapakula/Desktop/School/SEM3/CEA/Julie Survey/Post-Expand Interprofessional Facilitation Scale (IPFS) & CQI 24-25_March 4, 2025_14.44.xlsx', sheet = 2)
post <- post[-1, ]
post
## # A tibble: 16 × 46
##    StartDate   EndDate Status IPAddress Progress Duration (in seconds…¹ Finished
##    <chr>       <chr>   <chr>  <chr>     <chr>    <chr>                  <chr>   
##  1 45554.5664… 45554.… IP Ad… 38.124.1… 100      53                     True    
##  2 45563.9407… 45563.… IP Ad… 73.146.1… 100      50                     True    
##  3 45568.5139… 45568.… IP Ad… 74.136.1… 100      81                     True    
##  4 45580.6218… 45580.… IP Ad… 149.163.… 100      103                    True    
##  5 45587.5550… 45587.… IP Ad… 174.218.… 100      113                    True    
##  6 45587.8244… 45587.… IP Ad… 96.64.13… 100      133                    True    
##  7 45588.5359… 45588.… IP Ad… 68.57.21… 100      88                     True    
##  8 45589.6170… 45589.… IP Ad… 38.124.1… 100      47                     True    
##  9 45594.4703… 45594.… IP Ad… 134.6.13… 100      133                    True    
## 10 45594.7355… 45594.… IP Ad… 129.79.1… 100      131                    True    
## 11 45602.5754… 45602.… IP Ad… 96.63.22… 100      116                    True    
## 12 45645.96    45645.… IP Ad… 47.227.1… 100      279                    True    
## 13 45677.6521… 45677.… IP Ad… 162.142.… 100      800                    True    
## 14 45681.8213… 45681.… IP Ad… 68.51.11… 100      174                    True    
## 15 45683.7993… 45683.… IP Ad… 174.219.… 100      147                    True    
## 16 45690.9058… 45690.… IP Ad… 68.44.17… 100      168                    True    
## # ℹ abbreviated name: ¹​`Duration (in seconds)`
## # ℹ 39 more variables: RecordedDate <chr>, ResponseId <chr>,
## #   LocationLatitude <chr>, LocationLongitude <chr>, DistributionChannel <chr>,
## #   UserLanguage <chr>, Q8_1 <chr>, Q8_2 <chr>, Q8_3 <chr>, Q8_4 <chr>,
## #   Q8_5 <chr>, Q8_6 <chr>, Q8_7 <chr>, Q8_8 <chr>, Q8_9 <chr>, Q9 <chr>,
## #   Q10 <chr>, First <chr>, Last <chr>, Email <chr>, Program <chr>,
## #   IPFS_1 <chr>, IPFS_2 <chr>, IPFS_3 <chr>, IPFS_4 <chr>, IPFS_5 <chr>, …

Next, let’s compare the responses for each competency between the pre and post surveys using the new data (i.e., only considering the students who took both the pre and post surveys and excluding those who completed only one, to ensure a fair comparison).

Responses for pre:

pre_competency_data <- pre %>%
  select(starts_with("IPFS")) %>%  #selecting only the columns starting with "IPFS"
  pivot_longer(
    cols = everything(),           #applying pivot_longer to all selected columns
    names_to = "Competency",       
    values_to = "Response"
  )
print(pre_competency_data)
## # A tibble: 288 × 2
##    Competency Response 
##    <chr>      <chr>    
##  1 IPFS_1     Excellent
##  2 IPFS_2     Excellent
##  3 IPFS_3     Excellent
##  4 IPFS_4     Good     
##  5 IPFS_5     Excellent
##  6 IPFS_6     Excellent
##  7 IPFS_7     Excellent
##  8 IPFS_8     Good     
##  9 IPFS_9     Excellent
## 10 IPFS_10    Excellent
## # ℹ 278 more rows
#sorting the Competency column alphabetically and making sure that the competencies are ordered correctly(or else 'IPFS_10' occurs before 'IPFS_2'.)
pre_competency_data <- pre_competency_data %>%
  mutate(Competency = factor(Competency, levels = mixedsort(unique(Competency))))

Grouping and counting the responses for each competency

pre_summary <- pre_competency_data %>%
  group_by(Competency, Response) %>%
  summarise(Count = n(), .groups = "drop") %>%
  mutate(Percentage = (Count / sum(Count)) * 100)
pre_summary
## # A tibble: 57 × 4
##    Competency Response  Count Percentage
##    <fct>      <chr>     <int>      <dbl>
##  1 IPFS_1     Excellent     5      1.74 
##  2 IPFS_1     Good         11      3.82 
##  3 IPFS_2     Excellent     6      2.08 
##  4 IPFS_2     Good         10      3.47 
##  5 IPFS_3     Excellent     6      2.08 
##  6 IPFS_3     Fair          4      1.39 
##  7 IPFS_3     Good          6      2.08 
##  8 IPFS_4     Excellent     2      0.694
##  9 IPFS_4     Fair          5      1.74 
## 10 IPFS_4     Good          9      3.12 
## # ℹ 47 more rows

Now, let’s visualize the responses for each competency provided by students in the pre-survey.

new_pre_competency_data_plot <- ggplot(pre_summary, aes(x = Competency, y = Count, fill = Response)) +
  geom_bar(stat = "identity", position = "dodge") +
  scale_x_discrete(limits = sort(unique(pre_summary$Competency))) + 
  labs(title = "Student Competency Levels",
       x = "Competency",
       y = "Count") +
  theme_minimal() +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

#Using plotly for a more interactive plot(to include hover data)
new_pre_competency_data_plot1 <- ggplotly(new_pre_competency_data_plot, tooltip = c("Competency", "Response", "Count", "Percentage"))

new_pre_competency_data_plot1

Responses for post:

post_competency_data <- post %>%
  select(starts_with("IPFS")) %>%  
  pivot_longer(
    cols = everything(),           
    names_to = "Competency",    
    values_to = "Response"
  )
print(post_competency_data)
## # A tibble: 288 × 2
##    Competency Response 
##    <chr>      <chr>    
##  1 IPFS_1     Excellent
##  2 IPFS_2     Excellent
##  3 IPFS_3     Excellent
##  4 IPFS_4     Excellent
##  5 IPFS_5     Excellent
##  6 IPFS_6     Excellent
##  7 IPFS_7     Excellent
##  8 IPFS_8     Excellent
##  9 IPFS_9     Excellent
## 10 IPFS_10    Excellent
## # ℹ 278 more rows
post_competency_data <- post_competency_data %>%
  mutate(Competency = factor(Competency, levels = mixedsort(unique(Competency))))
post_summary <- post_competency_data %>%
  group_by(Competency, Response) %>%
  summarise(Count = n(), .groups = "drop") %>%
  mutate(Percentage = (Count / sum(Count)) * 100)
post_summary
## # A tibble: 46 × 4
##    Competency Response  Count Percentage
##    <fct>      <chr>     <int>      <dbl>
##  1 IPFS_1     Excellent    13      4.51 
##  2 IPFS_1     Good          3      1.04 
##  3 IPFS_2     Excellent    12      4.17 
##  4 IPFS_2     Good          4      1.39 
##  5 IPFS_3     Excellent     9      3.12 
##  6 IPFS_3     Good          6      2.08 
##  7 IPFS_3     Poor          1      0.347
##  8 IPFS_4     Excellent     9      3.12 
##  9 IPFS_4     Good          6      2.08 
## 10 IPFS_4     Poor          1      0.347
## # ℹ 36 more rows
post_competency_data_plot <- ggplot(post_summary, aes(x = Competency, y = Count, fill = Response)) +
  geom_bar(stat = "identity", position = "dodge") +
  scale_x_discrete(limits = sort(unique(post_summary$Competency))) +  # Enforce order
  labs(title = "Student Competency Levels",
       x = "Competency",
       y = "Count") +
  theme_minimal() +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

#Using plotly for a more interactive plot(to include hover data)
post_competency_data_plot1 <- ggplotly(post_competency_data_plot, tooltip = c("Competency", "Response", "Count", "Percentage"))

post_competency_data_plot1

From both the plots, we can observe that the responses have improved in the post-survey, suggesting that the program was helpful and effective. Specifically, we see a higher number of “Excellent” responses compared to the pre-survey.

Now, let’s test our hypothesis!

We will perform statistical tests to determine if the program had a significant effect on the students’ competency levels.

#converting the responses to numeric values
response_levels <- c("Poor" = 1, "Fair" = 2, "Good" = 3, "Excellent" = 4)

#again chnaging data to long format
final_data <- bind_rows(
  pre %>% mutate(Time = "Pre"),
  post %>% mutate(Time = "Post")
) %>%
  pivot_longer(cols = starts_with("IPFS_"), names_to = "Competency", values_to = "Response") %>%
  mutate(Response = as.numeric(recode(Response, !!!response_levels)))  #converting to numeric datatype

We will now compute the medians of the responses from both the pre and post surveys to compare the overall change in competency levels. This will help us understand if there has been a shift in the students’ competency levels after participating in the program.

#medians for Pre and Post
median_scores <- final_data %>%
  group_by(Competency, Time) %>%
  summarise(Median_Response = median(Response), .groups = "drop") %>%
  pivot_wider(names_from = Time, values_from = Median_Response, names_prefix = "Median_")

#another column to indicate whether performance improved or declined
median_scores <- median_scores %>%
  mutate(Change = case_when(
    Median_Post > Median_Pre ~ "Improved",
    Median_Post < Median_Pre ~ "Declined",
    TRUE ~ "No Change"
  ))

print(median_scores)
## # A tibble: 18 × 4
##    Competency Median_Post Median_Pre Change   
##    <chr>            <dbl>      <dbl> <chr>    
##  1 IPFS_1             4          3   Improved 
##  2 IPFS_10            4          3   Improved 
##  3 IPFS_11            4          3   Improved 
##  4 IPFS_12            4          3   Improved 
##  5 IPFS_13            4          3   Improved 
##  6 IPFS_14            4          4   No Change
##  7 IPFS_15            4          3   Improved 
##  8 IPFS_16            4          3   Improved 
##  9 IPFS_17            4          3   Improved 
## 10 IPFS_18            3          2.5 Improved 
## 11 IPFS_2             4          3   Improved 
## 12 IPFS_3             4          3   Improved 
## 13 IPFS_4             4          3   Improved 
## 14 IPFS_5             4          3   Improved 
## 15 IPFS_6             3.5        3   Improved 
## 16 IPFS_7             4          3   Improved 
## 17 IPFS_8             3.5        3   Improved 
## 18 IPFS_9             4          4   No Change

Plotting the ‘Change’ - Difference between the median scores of Pre and Post

median_scores_plot <- ggplot(median_scores, aes(x = Change, fill = Change)) +
  geom_bar() +
  labs(title = "Overall Change in Competency Levels",
       x = "Change",
       y = "Number of Competencies",
       fill = "Change Type") +
  scale_fill_manual(values = c("Improved" = "lightpink2","No Change" = "palegreen4")) +
  theme_minimal()
median_scores_plot

We can observe that there was no change in only 2 of the competencies, while the rest show an improvement. This suggests that the program helped in enhancing students’ competency levels.

However, to confirm this, we will perform statistical tests to determine if there was a significant difference between the pre and post survey responses. We will also analyze whether the change is positive (indicating improvement) or negative (indicating a decline).

Using Wilcoxon signed-rank test since we are comparing ordinal paired data

#performing wilcoxon test for each competency
wilcoxon_results <- final_data %>%
  group_by(Competency) %>%
  summarise(
    p_value = wilcox.test(Response[Time == "Pre"], Response[Time == "Post"], paired = TRUE)$p.value
  )
## Warning: There were 36 warnings in `summarise()`.
## The first warning was:
## ℹ In argument: `p_value = `$`(...)`.
## ℹ In group 1: `Competency = "IPFS_1"`.
## Caused by warning in `wilcox.test.default()`:
## ! cannot compute exact p-value with ties
## ℹ Run `dplyr::last_dplyr_warnings()` to see the 35 remaining warnings.
print(wilcoxon_results)
## # A tibble: 18 × 2
##    Competency p_value
##    <chr>        <dbl>
##  1 IPFS_1     0.00596
##  2 IPFS_10    0.0401 
##  3 IPFS_11    0.0650 
##  4 IPFS_12    0.0246 
##  5 IPFS_13    0.0232 
##  6 IPFS_14    0.203  
##  7 IPFS_15    0.0232 
##  8 IPFS_16    0.155  
##  9 IPFS_17    0.341  
## 10 IPFS_18    0.0439 
## 11 IPFS_2     0.0411 
## 12 IPFS_3     0.245  
## 13 IPFS_4     0.0290 
## 14 IPFS_5     0.0753 
## 15 IPFS_6     0.155  
## 16 IPFS_7     0.0150 
## 17 IPFS_8     0.0616 
## 18 IPFS_9     0.374

Visualizing the Results for Better Interpretation

To better understand the impact of the program, we will visualize the results. If the p-value is less than 0.05, it indicates a significant difference between pre- and post-survey responses. If the p-value is greater than 0.05, it means there is no significant difference.

wilcoxon_results <- wilcoxon_results %>%
  mutate(Competency = factor(Competency, levels = mixedsort(unique(Competency)))) #maintaing order

wilcoxon_results_plot <- ggplot(wilcoxon_results, aes(x = Competency, y = p_value, fill = p_value < 0.05)) +
  geom_col() +
  geom_hline(yintercept = 0.05, linetype = "dashed", color = "red") +
  labs(title = "Wilcoxon Test Results for Competency Levels",
       x = "Competency",
       y = "P-Value",
       fill = "Significant Difference (p < 0.05)") +
  scale_fill_manual(values = c("TRUE" = "palegreen4", "FALSE" = "lightpink2")) +
  theme_minimal() +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

wilcoxon_results_plot

We can see from the results and the plot that 9 out of 18 competencies showed a significant difference based on the p-values from our test.

Now, let’s determine whether this difference indicates an improvement or a decline by analyzing the direction of change in competency levels(checking the median scores against the p-values).

#medians for Pre and Post
median_scores <- final_data %>%
  group_by(Competency, Time) %>%
  summarise(Median_Response = median(Response), .groups = "drop") %>%
  pivot_wider(names_from = Time, values_from = Median_Response, names_prefix = "Median_")

#another column to indicate whether performance improved or declined
median_scores <- median_scores %>%
  mutate(Change = case_when(
    Median_Post > Median_Pre ~ "Improved",
    Median_Post < Median_Pre ~ "Declined",
    TRUE ~ "No Change"
  ))
new_wilcoxon_results <- wilcoxon_results %>%
  left_join(median_scores, by = "Competency")

print(new_wilcoxon_results)
## # A tibble: 18 × 5
##    Competency p_value Median_Post Median_Pre Change   
##    <chr>        <dbl>       <dbl>      <dbl> <chr>    
##  1 IPFS_1     0.00596         4          3   Improved 
##  2 IPFS_10    0.0401          4          3   Improved 
##  3 IPFS_11    0.0650          4          3   Improved 
##  4 IPFS_12    0.0246          4          3   Improved 
##  5 IPFS_13    0.0232          4          3   Improved 
##  6 IPFS_14    0.203           4          4   No Change
##  7 IPFS_15    0.0232          4          3   Improved 
##  8 IPFS_16    0.155           4          3   Improved 
##  9 IPFS_17    0.341           4          3   Improved 
## 10 IPFS_18    0.0439          3          2.5 Improved 
## 11 IPFS_2     0.0411          4          3   Improved 
## 12 IPFS_3     0.245           4          3   Improved 
## 13 IPFS_4     0.0290          4          3   Improved 
## 14 IPFS_5     0.0753          4          3   Improved 
## 15 IPFS_6     0.155           3.5        3   Improved 
## 16 IPFS_7     0.0150          4          3   Improved 
## 17 IPFS_8     0.0616          3.5        3   Improved 
## 18 IPFS_9     0.374           4          4   No Change