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

data_full <- read_dta("C:/Users/JH/OneDrive - Kitces.com/Desktop/JH/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
knitr::asis_output("Senior advisor compensation is concentrated in variable pay structures. Nearly half of senior advisors are compensated solely through net profits, with another one-fifth relying on revenue-based pay only, indicating substantial income variability at the senior level. Hybrid salary-plus-incentive models are present but less common, while purely fixed compensation is relatively rare.")

Senior advisor compensation is concentrated in variable pay structures. Nearly half of senior advisors are compensated solely through net profits, with another one-fifth relying on revenue-based pay only, indicating substantial income variability at the senior level. Hybrid salary-plus-incentive models are present but less common, while purely fixed compensation is relatively rare.

# 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 Wellbeing", "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 Wellbeing 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
knitr::asis_output("Average wellbeing scores are relatively high and tightly clustered across compensation structures, ranging roughly from 6.7 to 7.6 on the Cantril ladder. Senior advisors with profit-based and revenue-based compensation report well-being levels comparable to, or slightly higher than, those with salary-based arrangements. Notably, there is no clear well-being penalty associated with more variable compensation structures.")

Average wellbeing scores are relatively high and tightly clustered across compensation structures, ranging roughly from 6.7 to 7.6 on the Cantril ladder. Senior advisors with profit-based and revenue-based compensation report well-being levels comparable to, or slightly higher than, those with salary-based arrangements. Notably, there is no clear well-being penalty associated with more variable compensation structures.

# 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 Wellbeing", "Number of Advisors"),
 caption = "Wellbeing by Client-Facing Experience - Senior Advisors",
 align = c("l", "r", "r")
 )
Wellbeing by Client-Facing Experience - Senior Advisors
Client-Facing Experience Mean Wellbeing 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
knitr::asis_output("Average wellbeing increases modestly with client-facing experience, with the lowest scores among advisors with 5-9 years of experience and the highest among those with 20+ years. Advisors earlier in their careers report slightly lower wellbeing, while more experienced advisors appear to benefit from greater stability or role fit.")

Average wellbeing increases modestly with client-facing experience, with the lowest scores among advisors with 5-9 years of experience and the highest among those with 20+ years. Advisors earlier in their careers report slightly lower wellbeing, while more experienced advisors appear to benefit from greater stability or role fit.

# 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 Wellbeing", "Number of Advisors"),
  caption = "Wellbeing by Team Structure - Senior Advisors",
 align = c("l", "r", "r")
 )
Wellbeing by Team Structure - Senior Advisors
Team Structure / Support Level Mean Wellbeing Number of Advisors
Unsupported Solo 7.29 180
Supported Solo 7.45 169
Silo 7.42 88
Ensemble 7.60 211
knitr::asis_output("Wellbeing is lowest among unsupported solo advisors and highest among those in ensemble structures. Supported solo advisors report wellbeing levels comparable to ensemble firms, suggesting that access to support matters more than firm size alone. These patterns indicate that team context and structural support are meaningfully associated with senior advisor wellbeing.")

Wellbeing is lowest among unsupported solo advisors and highest among those in ensemble structures. Supported solo advisors report wellbeing levels comparable to ensemble firms, suggesting that access to support matters more than firm size alone. These patterns indicate that team context and structural support are meaningfully associated with senior advisor wellbeing.

# Table 5: Well-Being by Ownership Status (Partner/Owner vs Employee only) 
senior_advisors %>%
 filter(rspstatus %in% c(1, 2)) %>%  
 mutate(rspstatus = as_factor(rspstatus)) %>%
 group_by(rspstatus) %>%
 summarise(
 Mean_Wellbeing = round(mean(cantril_prsnt, na.rm = TRUE), 2),
 N = n(),
 .groups = "drop"
 ) %>%
 arrange(rspstatus) %>%
 kable(
 col.names = c("Ownership Status", "Mean Well-Being", "Number of Advisors"),
 caption = "Wellbeing by Ownership Status - Senior Advisors",
 align = c("l", "r", "r")
 )
Wellbeing by Ownership Status - Senior Advisors
Ownership Status Mean Well-Being Number of Advisors
Partner/Owner 7.56 517
Employee 7.03 102
knitr::asis_output("Owner/Partner senior advisors report higher well-being compared to Employees. This suggests ownership may contribute to greater satisfaction, purpose, or control among senior advisors.")

Owner/Partner senior advisors report higher well-being compared to Employees. This suggests ownership may contribute to greater satisfaction, purpose, or control among senior advisors.

# Chart: Well-Being by Ownership Status and Experience Group  
 senior_advisors %>%
 filter(rspstatus %in% c(1, 2)) %>%
 mutate(
rspstatus = as_factor(rspstatus),
exp_group = case_when(
rspfsexp <= 5 ~ "0–5 years",
rspfsexp <= 10 ~ "6–10 years",
rspfsexp <= 15 ~ "11–15 years",
TRUE ~ ">15 years"
 ),
exp_group = factor(exp_group, levels = c("0–5 years", "6–10 years", "11–15 years", ">15 years"))
 ) %>%
 group_by(rspstatus, exp_group) %>%
 summarise(
Mean_Wellbeing = round(mean(cantril_prsnt, na.rm = TRUE), 2),
N = n(),
.groups = "drop"
) %>%
ggplot(aes(x = exp_group, y = Mean_Wellbeing, fill = rspstatus)) +
geom_bar(stat = "identity", position = "dodge", width = 0.65) +
geom_text(aes(label = Mean_Wellbeing),
position = position_dodge(width = 0.65),
vjust = 1.2,
size = 2.8,
color = "white",
fontface = "bold") +
labs(
title = "Wellbeing by Ownership Status - Senior Advisors",
x = "Years of Experience",
y = "Mean Cantril Ladder Score (Present)",
fill = ""
) +
scale_fill_manual(values = c("Partner/Owner" = "#001F3F",
"Employee" = "#007BFF")) +
theme_minimal(base_size = 10) +
theme(
plot.title = element_text(hjust = 0, 
colour = "grey50", 
size = 10, 
face = "plain"),
axis.title = element_text(face = "bold"),
axis.text = element_text(size = 10),
legend.position = "bottom",
legend.title = element_text(size = 10, face = "bold"),
legend.text = element_text(size = 10),
legend.key.size = unit(1.3, "lines"),
legend.background = element_rect(fill = "white", colour = "grey80"),
plot.margin = margin(10, 10, 10, 10)
)

knitr::asis_output("Partners/Owners consistently report higher wellbeing than Employees across all experience groups. The advantage is most pronounced in the early career stage and remains stable in later years. This suggests ownership may provide greater purpose, autonomy, or financial security that supports life satisfaction from the start of a senior advisor's career.")

Partners/Owners consistently report higher wellbeing than Employees across all experience groups. The advantage is most pronounced in the early career stage and remains stable in later years. This suggests ownership may provide greater purpose, autonomy, or financial security that supports life satisfaction from the start of a senior advisor’s career.