# Load and prepare data
suppressPackageStartupMessages(library(dplyr))
library(dplyr)
library(haven)
library(knitr)

data_full <- read_dta("C:/Users/JH/OneDrive - Kitces.com/Desktop/Research_Ticket/Stata_WellBeing_2025/Stata/Master_Well_Being_2025.dta")

# Filter
senior_advisors <- data_full %>% filter(rspbizrole == 2)

# Table 1: Distribution of Compensation Mix
senior_advisors %>%
 mutate(rsppaystruc = as_factor(rsppaystruc)) %>%   
 count(rsppaystruc, name = "Count") %>%
 mutate(
Percent = round(Count / sum(Count) * 100, 1)
 ) %>%
 arrange(rsppaystruc) %>%
 kable(
 caption = "Distribution of Compensation Mix – Senior Advisors",
 col.names = c("Compensation Mix", "Count", "Percent (%)"),
 align = c("l", "r", "r")
 )
Distribution of Compensation Mix – Senior Advisors
Compensation Mix Count Percent (%)
Fixed salary only 32 4.9
Salary as draw 13 2.0
Salary with revenue incentive 109 16.8
Salary with non-revenue incentive 37 5.7
Revenue-based only 124 19.1
Net profits only 301 46.5
Other 31 4.8
NA 1 0.2
# Table 2: Well-Being by Compensation Mix
senior_advisors %>%
 mutate(rsppaystruc = as_factor(rsppaystruc)) %>%   
 group_by(rsppaystruc) %>%
 summarise(
 Mean_Wellbeing = round(mean(cantril_prsnt, na.rm = TRUE), 2),
 N = n(),
 .groups = "drop"
 ) %>%
 arrange(rsppaystruc) %>%
 kable(
 col.names = c("Compensation Mix", "Mean Well-Being", "Number of Advisors"),
 caption = "Average Present Cantril Ladder Score by Compensation Structure",
 align = c("l", "r", "r")
 )
Average Present Cantril Ladder Score by Compensation Structure
Compensation Mix Mean Well-Being Number of Advisors
Fixed salary only 7.12 32
Salary as draw 6.69 13
Salary with revenue incentive 7.43 109
Salary with non-revenue incentive 7.11 37
Revenue-based only 7.31 124
Net profits only 7.64 301
Other 7.29 31
NA 8.00 1
# Table 3: Well-Being by Client-Facing Experience
senior_advisors %>%
 mutate(grpclexp = as_factor(grpclexp)) %>%    
 group_by(grpclexp) %>%
 summarise(
 Mean_Wellbeing = round(mean(cantril_prsnt, na.rm = TRUE), 2),
 N = n(),
 .groups = "drop"
 ) %>%
 arrange(grpclexp) %>%
 kable(
 col.names = c("Client-Facing Experience", "Mean Well-Being", "Number of Advisors"),
 caption = "Well-Being by Client-Facing Experience – Senior Advisors",
 align = c("l", "r", "r")
 )
Well-Being by Client-Facing Experience – Senior Advisors
Client-Facing Experience Mean Well-Being Number of Advisors
<5 yrs 7.27 65
5 to 9 6.99 112
10 to 19 7.35 189
20+ yrs 7.75 274
NA 7.50 8
# Table 4: Well-Being by Team Structure / Support Level
senior_advisors %>%
 mutate(pstructure = as_factor(pstructure)) %>%  
 group_by(pstructure) %>%
 summarise(
  Mean_Wellbeing = round(mean(cantril_prsnt, na.rm = TRUE), 2),
  N = n(),
  .groups = "drop"
  ) %>%
  arrange(pstructure) %>%
  kable(
 col.names = c("Team Structure / Support Level", "Mean Well-Being", "Number of Advisors"),
  caption = "Well-Being by Team Structure – Senior Advisors",
 align = c("l", "r", "r")
 )
Well-Being by Team Structure – Senior Advisors
Team Structure / Support Level Mean Well-Being Number of Advisors
Unsupported Solo 7.29 180
Supported Solo 7.45 169
Silo 7.42 88
Ensemble 7.60 211