1 Overview

The original project included two aims: 1- investigating the frequency and distribution of GAS and 2- the surgical complication of GAS among TM and TF individuals enrolled in STRONG as a function of KP site and patient sociodemographic characteristics. Given the scope of a master’s thesis, the decision was made to pursue aim 1 exclusively.

1.1 Aim 1:

1.1.1 Primary outcome: (Any GAS)

The primary outcome of aim 1 is receipt of any gender-affirming surgery including mastectomy, vaginectomy, metaoidioplasty, phalloplasty or hysterectomy/oophorectomy for TM patients and augmentation mammaplasty, orchiectomy or vaginoplasty for TF patients.

  • GAS status (received or not)

1.1.2 Secondary outcome: (Definitive genital GAS)

The secondary outcome will be receipt of definitive genital surgery (with or without chest surgery) vs chest surgery only.

  • GAS type (top, bottom, other)

MG comment - I am not convinced the GAS categories of top/bottom/other are justifiable. To overcome this limitation, I would suggest two options: 1. Focus on top GAS in the TM cohort only (as we discussed before Christmas). 2. Use a binary variable “any GAS vs. no GAS” (as you did in the regression models)

1.1.3 Independent variables:

Independent variables will include KP site location as well as patient age, race/ethnicity, insurance type, TM vs TF status, and area-based measures of socioeconomic status (SES).

  • KP site
  • Age at index
  • Race/ethnicity
  • Transgender identity (TM vs TF)
  • Insurance type (Medicaid vs commercial)
  • Area-based SES (poverty)





2 Preparing the Data

2.1 Importing the Data

The original data is read in and copied to a new data frame. Data type is then confirmed for all character, factor, and date variables.

# Read in the data
Original_data <- read_excel("Original_data.xlsx")

# Pre-process the data to handle '#NULL!' values by replacing them with NA
Original_data <- Original_data %>%
  mutate(across(where(is.character), ~na_if(.x, "#NULL!")))

# Now ensure that all the data types are correct
data <- Original_data %>%
  mutate(
    # Converting character columns
    studyid = as.character(studyid),
    site = as.character(site),
    CODE = as.character(CODE),
    CODETYPE = as.character(CODETYPE),
    ENCTYPE = as.character(ENCTYPE),
    ENCOUNTER_SUBTYPE = as.character(ENCOUNTER_SUBTYPE),
    DEPT = as.character(DEPT),
    
    # Converting categorical columns to factors
    transgender = factor(transgender),
    procedure = factor(procedure),
    sex_natal = factor(sex_natal),
    RACE1 = factor(RACE1),
    RACE2 = factor(RACE2),
    HISPANIC = factor(HISPANIC),
    INS_MEDICAID = factor(INS_MEDICAID),
    
    # Converting date columns
    index_date = ymd(index_date),
    birth_date = ymd(birth_date),
    TRANS_CODE_ADATE = ymd(TRANS_CODE_ADATE),
    TRANS_CODE_PROCDATE = ymd(TRANS_CODE_PROCDATE),
    ENR_START = ymd(ENR_START),
    ENR_END = ymd(ENR_END),
  )



2.2 Cleaning the Data

Existing categorical variables including KP site, transgender status, natal sex, race/ethnicity, and insurance are re-coded for ease of readability.

data <- data %>%
  mutate(
    site = case_when(
      site == "GA" ~ "Georgia",
      site == "NC" ~ "Northern California",
      site == "SC" ~ "Southern California",
      TRUE ~ as.character(site)  # Keeps the original value if none of the above conditions are met
    ),
    transgender = if_else(transgender == 1, "Yes", "No"),
    sex_natal = case_when(
      sex_natal == "M" ~ "Male",
      sex_natal == "F" ~ "Female",
      TRUE ~ as.character(sex_natal)
    ),
    RACE1 = case_when(
      RACE1 == "AS" ~ "Asian",
      RACE1 == "BA" ~ "Black/African American",
      RACE1 == "HP" ~ "Hispanic/Latino- Native Hawaiian or Pacific Islander",
      RACE1 == "IN" ~ "American Indian or Alaskan Native",
      RACE1 == "MU" ~ "Multi-racial",
      RACE1 == "UN" ~ "Unknown",
      RACE1 == "WH" ~ "White",
      TRUE ~ as.character(RACE1)
    ),
    RACE2 = case_when(
      RACE2 == "AS" ~ "Asian",
      RACE2 == "BA" ~ "Black/African American",
      RACE2 == "IN" ~ "American Indian or Alaskan Native", # not in original data dictionary 
      RACE2 == "UN" ~ "Unknown",
      RACE2 == "WH" ~ "White",
      RACE2 == "OT" ~ "Other",
      TRUE ~ as.character(RACE2)
    ),
    HISPANIC = case_when(
      HISPANIC == "N" ~ "No",
      HISPANIC == "Y" ~ "Yes",
      HISPANIC == "U" ~ "Unknown",
      TRUE ~ as.character(HISPANIC)
    ),
    INS_MEDICAID = case_when(
      INS_MEDICAID == "Y" ~ "Medicaid",
      is.na(INS_MEDICAID) ~ "Commercial",
      TRUE ~ as.character(INS_MEDICAID)
    )
  )

# check coding 
table(data$site, Original_data$site)
table(data$transgender, Original_data$transgender)
table(data$RACE1, Original_data$RACE1)
table(data$RACE2, Original_data$RACE2)
table(data$HISPANIC, Original_data$HISPANIC)
table(data$INS_MEDICAID, Original_data$INS_MEDICAID)


New variables are then created based on existing variables. Transgender type (TM vs TF) is created based on natal sex. A binary GAS variable is created based on the procedure variable. Age at index is transformed into a new categorical variable. Finally, a categorical poverty variable is created. … confirm poverty variable is coded correctly


MG comment - I would combine race and ethnicity into a single variable: 1. Non-Hispanic White; 2. Non-Hispanic Black; 3. Non-Hispanic Asian/Hawaiian/Pacific Islander; 4. Hispanic; 5. Other/unknown


This code also makes a race_ethnicity variable using original RACE1 and HISPANIC variables. (HISPANIC originally coded as Yes, No, and Unknown. All with Yes are coded as Hispanic in new race/ethnicity variable. Those coded as No or Unknown are now coded as Non-Hispanic X based on race). The following RACE1 categories are consolidated into “Other/Unknown”

  • Hispanic/Latino- Native Hawaiian or Pacific Islander
  • American Indian or Alaskan Native
  • Multi-racial
  • Unknown
# trans_type, age_at_index_group, poverty, poverty_cat
data <- data %>%
  mutate(
    trans_type = case_when(
      sex_natal == "Male" ~ "Transfeminine",
      sex_natal == "Female" ~ "Transmasculine",
      TRUE ~ NA_character_
    ),
    GAS_any = case_when(
      procedure == 1 ~ "Yes",
      procedure == 0 ~ "No",
      TRUE ~ NA_character_
    ),
    age_at_index_group = case_when(
      age_at_index < 18 ~ "<18",
      age_at_index >= 18 & age_at_index <= 34 ~ "18-34",
      age_at_index >= 35 & age_at_index <= 64 ~ "35-64",
      age_at_index >= 65 ~ "65+",
      TRUE ~ NA_character_
    ),
    poverty = pov_lt_50 + pov_50_74 + pov_75_99,
    poverty_cat = case_when(
      poverty < 0.1 ~ "<10%",
      poverty >= 0.1 & poverty < 0.2 ~ "10-20%",
      poverty >= 0.2 ~ ">20%",
      TRUE ~ NA_character_
    ), 
    race_ethnicity = case_when(
      HISPANIC == "Yes" ~ "Hispanic",
      HISPANIC != "Yes" & RACE1 == "White" ~ "Non-Hispanic White",
      HISPANIC != "Yes" & RACE1 == "Black/African American" ~ "Non-Hispanic Black",
      HISPANIC != "Yes" & RACE1 == "Asian" ~ "Non-Hispanic Asian",
      HISPANIC != "Yes" & RACE1 == "Hispanic/Latino- Native Hawaiian or Pacific Islander" ~ "Other/Unknown",
      HISPANIC != "Yes" & RACE1 == "American Indian or Alaskan Native" ~ "Other/Unknown",
      HISPANIC != "Yes" & RACE1 == "Multi-racial" ~ "Other/Unknown",
      HISPANIC != "Yes" & RACE1 == "Unknown" ~ "Other/Unknown",
      TRUE ~ NA_character_
    )
  )

# Set race_ethnicity to "Other/Unknown" if empty

data$race_ethnicity <- ifelse(is.na(data$race_ethnicity), "Other/Unknown", data$race_ethnicity)

# Check coding
# table(data$trans_type, data$sex_natal)
# table(data$procedure, data$GAS_any)
# table(data$poverty_cat)
# table(data$race_ethnicity, data$RACE1)


Confirm coding of new race/ethnicity variable by printing a cross tab with the original RACE1 and HISPANIC variables.

### Check coding of new race/ethnicity variable
data %>%
  select(RACE1, HISPANIC, race_ethnicity) %>%
  mutate(
    RACE1 = factor(RACE1, levels = c("White", "Black/African American", "Asian", "Hispanic/Latino- Native Hawaiian or Pacific Islander", "American Indian or Alaskan Native", "Multi-racial", "Unknown")),
    HISPANIC = factor(HISPANIC, levels = c("Yes", "No", "Unknown")),
    race_ethnicity = factor(race_ethnicity, levels = c("Hispanic", "Non-Hispanic White", "Non-Hispanic Black", "Non-Hispanic Asian", "Other/Unknown"))
  ) %>%
  tbl_summary(by = race_ethnicity,
              missing_text = "Missing") %>%
  modify_spanning_header(c("stat_1", "stat_2", "stat_3", "stat_4", "stat_5") ~ "**New Race/Ethnicity Variable**") %>%
  bold_labels()
Characteristic New Race/Ethnicity Variable
Hispanic, N = 3,5031 Non-Hispanic White, N = 8,5071 Non-Hispanic Black, N = 1,0661 Non-Hispanic Asian, N = 1,5061 Other/Unknown, N = 9821
RACE1




    White 1,664 (48%) 8,507 (100%) 0 (0%) 0 (0%) 0 (0%)
    Black/African American 64 (1.8%) 0 (0%) 1,066 (100%) 0 (0%) 0 (0%)
    Asian 100 (2.9%) 0 (0%) 0 (0%) 1,506 (100%) 0 (0%)
    Hispanic/Latino- Native Hawaiian or Pacific Islander 13 (0.4%) 0 (0%) 0 (0%) 0 (0%) 122 (12%)
    American Indian or Alaskan Native 43 (1.2%) 0 (0%) 0 (0%) 0 (0%) 105 (11%)
    Multi-racial 14 (0.4%) 0 (0%) 0 (0%) 0 (0%) 1 (0.1%)
    Unknown 1,605 (46%) 0 (0%) 0 (0%) 0 (0%) 752 (77%)
    Missing 0 0 0 0 2
HISPANIC




    Yes 3,503 (100%) 0 (0%) 0 (0%) 0 (0%) 0 (0%)
    No 0 (0%) 1,784 (21%) 258 (24%) 376 (25%) 94 (9.6%)
    Unknown 0 (0%) 6,723 (79%) 808 (76%) 1,130 (75%) 886 (90%)
    Missing 0 0 0 0 2
1 n (%)



data %>% 
  select(race_ethnicity) %>%
  tbl_summary(missing_text = "Missing")
Characteristic N = 15,5641
race_ethnicity
    Hispanic 3,503 (23%)
    Non-Hispanic Asian 1,506 (9.7%)
    Non-Hispanic Black 1,066 (6.8%)
    Non-Hispanic White 8,507 (55%)
    Other/Unknown 982 (6.3%)
1 n (%)



2.3 Procedure Coding

A code lookup sheet is read in and used to create code description and GAS type variables based on code. GAS type includes top, bottom, and other. An additional GAS_surgery variable is created to specifically identify gender-affirming surgeries (includes top, bottom, bony facial surgeries; excludes soft tissue face/body procedures (ie. blepharoplasties, rhytidectomies, liposuction/lipectomies), fillers, and hair removal) Finally, a binary GAS_bottom variable is created.

# Create list of all unique values for the CODE variable
code_list <- data.frame(unique(data$CODE))
                        
# Read in procedure lookup table
code_lookup <- read_excel("Code_Details.xlsx")
# view(code_lookup)

# Ensure that the 'CODE' column in both data frames are of the same type
data$CODE <- as.character(data$CODE)
code_lookup$CODE <- as.character(code_lookup$CODE)

# Join the lookup table with main data frame using a left join
data <- data %>%
  left_join(code_lookup, by = "CODE")

# New GAS_bottom variable
data <- data %>%
  mutate(
    GAS_bottom = case_when(
      GAS_type == "Bottom" ~ "Yes",
      !is.na(GAS_type) & GAS_type != "Bottom" ~ "No",
      is.na(GAS_type) ~ NA_character_
    )
  )

# Set GAS_surgery to "No" if empty
unique(data$GAS_surgery)
data$GAS_surgery <- ifelse(is.na(data$GAS_surgery), "No", data$GAS_surgery)
unique(data$GAS_surgery)
table(data$GAS_surgery)



2.4 Adding Variable Labels

Labels are added to all variables to improve formatting and readability.

label(data$studyid) <- "Participant study ID"
label(data$site) <- "KP site"
label(data$transgender) <- "Transgender Status"
label(data$procedure) <- "Gender Affirming Procedure"
label(data$index_date) <- "Index Date"
label(data$age_at_index) <- "Age at Index"
label(data$birth_date) <- "Date of Birth"
label(data$sex_natal) <- "Natal Sex"
label(data$RACE1) <- "Race 1 (if known)"
label(data$RACE2) <- "Race 2 (if known)"
label(data$HISPANIC) <- "Hispanic origin (ethnicity)"
label(data$trans_type) <- "TM vs TF status"
label(data$age_at_index_group) <- "Age at Index Group"
label(data$TRANS_CODE_ADATE) <- "Admission date of the encounter where the transition procedure code was recorded"
label(data$TRANS_CODE_PROCDATE) <- "Actual date the procedure was performed (if available)"
label(data$CODE) <- "Code identifying the transition procedure"
label(data$CODETYPE) <- "Type of code (CPT, HCPCS, ICD9, ICD10, etc) of the transition procedure"
label(data$PXCNT) <- "Number of times that the procedure was performed"
label(data$ENCTYPE) <- "Type of encounter where the procedure was performed"
label(data$ENCOUNTER_SUBTYPE) <- "Subtype of encounter where the procedure was performed"
label(data$DEPT) <- "Department where the procedure was performed"
label(data$GAS_type) <- "Type of GAS"
label(data$GAS_bottom) <- "Received Genital Surgery"
label(data$ENR_START) <- "Medicaid Enrollment Start Date"
label(data$ENR_END) <- "Medicaid Enrollment End Date"
label(data$INS_MEDICAID) <- "Type of Insurance"
label(data$LOC_START) <- "LOC_START"
label(data$LOC_END) <- "LOC_END"
label(data$GEOCODE_BOUNDARY_YEAR) <- "GEOCODE_BOUNDARY_YEAR"
label(data$location_days_from_index) <- "DAYS_DIFF"
label(data$CENSUS_YEAR) <- "CENSUS_YEAR"
label(data$education1) <- "EDUCATION1"
label(data$education2) <- "EDUCATION2"
label(data$education3) <- "EDUCATION3"
label(data$education4) <- "EDUCATION4"
label(data$education5) <- "EDUCATION5"
label(data$education6) <- "EDUCATION6"
label(data$education7) <- "EDUCATION7"
label(data$education8) <- "EDUCATION8"
label(data$fampoverty) <- "FAMPOVERTY"
label(data$houspoverty) <- "HOUSPOVERTY"
label(data$pov_lt_50) <- "Poverty less than 5%"
label(data$pov_50_74) <- "Poverty 5-7.5%"
label(data$pov_75_99) <- "Poverty 7.5-9.9%"
label(data$pov_100_124) <- "Poverty 10-12.4%"
label(data$pov_125_149) <- "Poverty 12.5-14.9%"
label(data$pov_150_174) <- "Poverty 15-17.4%"
label(data$pov_175_184) <- "Poverty 17.5-18.4%"
label(data$pov_185_199) <- "Poverty 18.5-19.9%"
label(data$pov_gt_200) <- "Poverty greater than 20%"
label(data$poverty) <- "Poverty Sum (sum of 5%-9.9%)"
label(data$poverty_cat) <- "Percent living below poverty"
label(data$GAS_any) <- "Received GAS (*any procedure*)"
label(data$code_description) <- "Procedure code description"
label(data$GAS_surgery) <- "Received Gender Affirming Surgery (top, bottom, or bony face)"
label(data$race_ethnicity) <- "Race/Ethnicity"

# Check labels
# cbind(label(data))



2.5 Creating additional cohorts (TM/TF only, those who receive GAS/P)

MG comment - I am not convinced the GAS categories of top/bottom/other are justifiable. To overcome this limitation, I would suggest two options: 1. Focus on top GAS in the TM cohort only (as we discussed before Christmas). 2. Use a binary variable “any GAS vs. no GAS” (as you did in the regression models)


Create new data frame with TF cohort only. Create another new data frame with TM cohort only and new “top” variable indicating receipt of top surgery. Finally, create a data frame for those who receive any procedure.

data_TF <- data[data$trans_type == "Transfeminine", ] # new TF data frame
data_TM <- data[data$trans_type == "Transmasculine", ] # new TM data frame
data_GAS <- data[data$GAS_any == "Yes", ] # new cohort for those who received any GAS/procedure


data_TM <- data_TM %>% # add binary top variable for TM data frame
  mutate(
    top = case_when(
      GAS_type == "Top" ~ "Yes",
      !is.na(GAS_type) & GAS_type != "Top" ~ "No",
      is.na(GAS_type) ~ NA_character_
    )
  )


# Set top to "No" if empty
unique(data_TM$top)
data_TM$top <- ifelse(is.na(data_TM$top), "No", data_TM$top)
unique(data_TM$top)


# Add label for new variable
label(data_TM$top) <- "Received Top Surgery"

#Check coding and label:
# table(data_TM$GAS_type, data_TM$top)
# cbind(label(data_TM))





3 Exploring the data

Results in this section are hidden. Delete include=FALSE in code chunk options to show on knit.

3.1 Frequency Tables


Here is a similar table using more simplified code:


Lastly, assess the normality of the one continuous variable, age at index.



3.2 Data Visualization

Results in this section are hidden. Delete include=FALSE in code chunk options to show on knit.






4 Table 1

4.1 Simple tables

These tables look at the distribution of variables by TM/TF status, any Procedure, and any surgery.

data %>%
  select(age_at_index, age_at_index_group, race_ethnicity, site, trans_type, 
         INS_MEDICAID, poverty_cat, GAS_any, GAS_surgery) %>%
  mutate(GAS_any = factor(GAS_any, labels = c("No procedures", "Procedures"))) %>%
  mutate(GAS_surgery = factor(GAS_surgery, labels = c("No surgery", "Surgery"))) %>%
  tbl_summary( by = trans_type,
               missing = "no",
               type = list(where(is.logical) ~ "categorical")) %>%
  bold_labels()
Characteristic Transfeminine, N = 7,2781 Transmasculine, N = 8,2861
Age at Index 28 (20, 42) 22 (16, 30)
Age at Index Group

    <18 1,188 (16%) 2,786 (34%)
    18-34 3,517 (48%) 4,155 (50%)
    35-64 2,355 (32%) 1,299 (16%)
    65+ 218 (3.0%) 46 (0.6%)
Race/Ethnicity

    Hispanic 1,556 (21%) 1,947 (23%)
    Non-Hispanic Asian 817 (11%) 689 (8.3%)
    Non-Hispanic Black 428 (5.9%) 638 (7.7%)
    Non-Hispanic White 4,007 (55%) 4,500 (54%)
    Other/Unknown 470 (6.5%) 512 (6.2%)
KP site

    Georgia 92 (1.3%) 76 (0.9%)
    Northern California 4,692 (64%) 5,363 (65%)
    Southern California 2,494 (34%) 2,847 (34%)
Type of Insurance

    Commercial 5,699 (78%) 6,299 (76%)
    Medicaid 1,579 (22%) 1,987 (24%)
Percent living below poverty

    <10% 4,581 (66%) 5,212 (64%)
    >20% 831 (12%) 1,052 (13%)
    10-20% 1,574 (23%) 1,899 (23%)
GAS_any

    No procedures 3,790 (52%) 4,849 (59%)
    Procedures 3,488 (48%) 3,437 (41%)
GAS_surgery

    No surgery 5,908 (81%) 5,518 (67%)
    Surgery 1,370 (19%) 2,768 (33%)
1 Median (IQR); n (%)
data %>%
  select(age_at_index, age_at_index_group, race_ethnicity, site, trans_type, 
         INS_MEDICAID, poverty_cat, GAS_any, GAS_surgery) %>%
  mutate(GAS_any = factor(GAS_any, labels = c("No procedures", "Procedures"))) %>%
  mutate(GAS_surgery = factor(GAS_surgery, labels = c("No surgery", "Surgery"))) %>%
  tbl_summary( by = GAS_any,
               missing = "no",
               type = list(where(is.logical) ~ "categorical")) %>%
  bold_labels()
Characteristic No procedures, N = 8,6391 Procedures, N = 6,9251
Age at Index 22 (16, 32) 27 (20, 37)
Age at Index Group

    <18 2,969 (34%) 1,005 (15%)
    18-34 3,793 (44%) 3,879 (56%)
    35-64 1,737 (20%) 1,917 (28%)
    65+ 140 (1.6%) 124 (1.8%)
Race/Ethnicity

    Hispanic 2,018 (23%) 1,485 (21%)
    Non-Hispanic Asian 828 (9.6%) 678 (9.8%)
    Non-Hispanic Black 567 (6.6%) 499 (7.2%)
    Non-Hispanic White 4,530 (52%) 3,977 (57%)
    Other/Unknown 696 (8.1%) 286 (4.1%)
KP site

    Georgia 125 (1.4%) 43 (0.6%)
    Northern California 5,475 (63%) 4,580 (66%)
    Southern California 3,039 (35%) 2,302 (33%)
TM vs TF status

    Transfeminine 3,790 (44%) 3,488 (50%)
    Transmasculine 4,849 (56%) 3,437 (50%)
Type of Insurance

    Commercial 6,743 (78%) 5,255 (76%)
    Medicaid 1,896 (22%) 1,670 (24%)
Percent living below poverty

    <10% 5,501 (65%) 4,292 (64%)
    >20% 1,023 (12%) 860 (13%)
    10-20% 1,884 (22%) 1,589 (24%)
GAS_surgery

    No surgery 8,639 (100%) 2,787 (40%)
    Surgery 0 (0%) 4,138 (60%)
1 Median (IQR); n (%)
data %>%
  select(age_at_index, age_at_index_group, race_ethnicity, site, trans_type, 
         INS_MEDICAID, poverty_cat, GAS_any, GAS_surgery) %>%
  mutate(GAS_any = factor(GAS_any, labels = c("No procedures", "Procedures"))) %>%
  mutate(GAS_surgery = factor(GAS_surgery, labels = c("No surgery", "Surgery"))) %>%
  tbl_summary( by = GAS_surgery,
               missing = "no",
               type = list(where(is.logical) ~ "categorical")) %>%
  bold_labels()
Characteristic No surgery, N = 11,4261 Surgery, N = 4,1381
Age at Index 23 (17, 34) 27 (20, 38)
Age at Index Group

    <18 3,294 (29%) 680 (16%)
    18-34 5,467 (48%) 2,205 (53%)
    35-64 2,492 (22%) 1,162 (28%)
    65+ 173 (1.5%) 91 (2.2%)
Race/Ethnicity

    Hispanic 2,641 (23%) 862 (21%)
    Non-Hispanic Asian 1,092 (9.6%) 414 (10%)
    Non-Hispanic Black 737 (6.5%) 329 (8.0%)
    Non-Hispanic White 6,135 (54%) 2,372 (57%)
    Other/Unknown 821 (7.2%) 161 (3.9%)
KP site

    Georgia 128 (1.1%) 40 (1.0%)
    Northern California 7,213 (63%) 2,842 (69%)
    Southern California 4,085 (36%) 1,256 (30%)
TM vs TF status

    Transfeminine 5,908 (52%) 1,370 (33%)
    Transmasculine 5,518 (48%) 2,768 (67%)
Type of Insurance

    Commercial 8,831 (77%) 3,167 (77%)
    Medicaid 2,595 (23%) 971 (23%)
Percent living below poverty

    <10% 7,293 (65%) 2,500 (62%)
    >20% 1,330 (12%) 553 (14%)
    10-20% 2,513 (23%) 960 (24%)
GAS_any

    No procedures 8,639 (76%) 0 (0%)
    Procedures 2,787 (24%) 4,138 (100%)
1 Median (IQR); n (%)



4.2 By TM/TF status and PROCEDURE

Now look at the distribution of patients who received any PROCEDURE.

table1_proc <- data %>%
  select(age_at_index, age_at_index_group, race_ethnicity, site, trans_type, 
         INS_MEDICAID, poverty_cat, GAS_any) %>%
  mutate(GAS_any = factor(GAS_any, labels = c("No procedures", "Procedures"))) %>%
  tbl_strata(
    strata = trans_type,
    .tbl_fun =
      ~ .x %>%
        tbl_summary(by = GAS_any, 
                    missing = "no",
                    type = list(where(is.logical) ~ "categorical")) %>%
        add_p() %>%
        bold_p() %>%
        add_n(),
    .header = "**{strata}**, (N = {n})"
  ) %>%
  bold_labels() %>% 
  modify_header(all_stat_cols() ~ "**{level}**<br>N = {n}") %>%
  modify_caption("<div style='text-align: left; font-weight: bold; color: grey'>Table 1. Descriptive characteristics of TM and TF study participants by PROCEURE status</div>")

table1_proc
Table 1. Descriptive characteristics of TM and TF study participants by PROCEURE status
Characteristic Transfeminine, (N = 7278) Transmasculine, (N = 8286)
N No procedures
N = 37901
Procedures
N = 34881
p-value2 N No procedures
N = 48491
Procedures
N = 34371
p-value2
Age at Index 7,278 25 (18, 41) 30 (23, 42) <0.001 8,286 19 (15, 28) 24 (18, 32) <0.001
Age at Index Group 7,278

<0.001 8,286

<0.001
    <18
935 (25%) 253 (7.3%)

2,034 (42%) 752 (22%)
    18-34
1,612 (43%) 1,905 (55%)

2,181 (45%) 1,974 (57%)
    35-64
1,126 (30%) 1,229 (35%)

611 (13%) 688 (20%)
    65+
117 (3.1%) 101 (2.9%)

23 (0.5%) 23 (0.7%)
Race/Ethnicity 7,278

<0.001 8,286

<0.001
    Hispanic
826 (22%) 730 (21%)

1,192 (25%) 755 (22%)
    Non-Hispanic Asian
428 (11%) 389 (11%)

400 (8.2%) 289 (8.4%)
    Non-Hispanic Black
224 (5.9%) 204 (5.8%)

343 (7.1%) 295 (8.6%)
    Non-Hispanic White
2,000 (53%) 2,007 (58%)

2,530 (52%) 1,970 (57%)
    Other/Unknown
312 (8.2%) 158 (4.5%)

384 (7.9%) 128 (3.7%)
KP site 7,278

<0.001 8,286

0.004
    Georgia
67 (1.8%) 25 (0.7%)

58 (1.2%) 18 (0.5%)
    Northern California
2,369 (63%) 2,323 (67%)

3,106 (64%) 2,257 (66%)
    Southern California
1,354 (36%) 1,140 (33%)

1,685 (35%) 1,162 (34%)
Type of Insurance 7,278

<0.001 8,286

0.5
    Commercial
3,044 (80%) 2,655 (76%)

3,699 (76%) 2,600 (76%)
    Medicaid
746 (20%) 833 (24%)

1,150 (24%) 837 (24%)
Percent living below poverty 6,986

0.6 8,163

0.042
    <10%
2,395 (66%) 2,186 (65%)

3,106 (65%) 2,106 (62%)
    >20%
419 (12%) 412 (12%)

604 (13%) 448 (13%)
    10-20%
812 (22%) 762 (23%)

1,072 (22%) 827 (24%)
1 Median (IQR); n (%)
2 Wilcoxon rank sum test; Pearson’s Chi-squared test



4.3 By TM/TF status and SURGERY

Repeat table w but for any SURGERY.

table1_surg <- data %>%
  select(age_at_index, age_at_index_group, race_ethnicity, site, trans_type, 
         INS_MEDICAID, poverty_cat, GAS_surgery) %>%
  mutate(GAS_surgery = factor(GAS_surgery, labels = c("No surgery", "Surgery"))) %>%
  tbl_strata(
    strata = trans_type,
    .tbl_fun =
      ~ .x %>%
        tbl_summary(by = GAS_surgery, 
                    missing = "no",
                    type = list(where(is.logical) ~ "categorical")) %>%
        add_p() %>%
        bold_p() %>%
        add_n(),
    .header = "**{strata}**, (N = {n})"
  ) %>%
  bold_labels() %>% 
  modify_header(all_stat_cols() ~ "**{level}**<br>N = {n}") %>%
  modify_caption("<div style='text-align: left; font-weight: bold; color: grey'>Table 1. Descriptive characteristics of TM and TF study participants by SURGERY status</div>")

table1_surg
Table 1. Descriptive characteristics of TM and TF study participants by SURGERY status
Characteristic Transfeminine, (N = 7278) Transmasculine, (N = 8286)
N No surgery
N = 59081
Surgery
N = 13701
p-value2 N No surgery
N = 55181
Surgery
N = 27681
p-value2
Age at Index 7,278 27 (19, 39) 34 (24, 48) <0.001 8,286 20 (15, 28) 25 (18, 33) <0.001
Age at Index Group 7,278

<0.001 8,286

<0.001
    <18
1,093 (19%) 95 (6.9%)

2,201 (40%) 585 (21%)
    18-34
2,906 (49%) 611 (45%)

2,561 (46%) 1,594 (58%)
    35-64
1,763 (30%) 592 (43%)

729 (13%) 570 (21%)
    65+
146 (2.5%) 72 (5.3%)

27 (0.5%) 19 (0.7%)
Race/Ethnicity 7,278

0.001 8,286

<0.001
    Hispanic
1,295 (22%) 261 (19%)

1,346 (24%) 601 (22%)
    Non-Hispanic Asian
639 (11%) 178 (13%)

453 (8.2%) 236 (8.5%)
    Non-Hispanic Black
333 (5.6%) 95 (6.9%)

404 (7.3%) 234 (8.5%)
    Non-Hispanic White
3,240 (55%) 767 (56%)

2,895 (52%) 1,605 (58%)
    Other/Unknown
401 (6.8%) 69 (5.0%)

420 (7.6%) 92 (3.3%)
KP site 7,278

0.001 8,286

<0.001
    Georgia
68 (1.2%) 24 (1.8%)

60 (1.1%) 16 (0.6%)
    Northern California
3,762 (64%) 930 (68%)

3,451 (63%) 1,912 (69%)
    Southern California
2,078 (35%) 416 (30%)

2,007 (36%) 840 (30%)
Type of Insurance 7,278

0.2 8,286

0.7
    Commercial
4,644 (79%) 1,055 (77%)

4,187 (76%) 2,112 (76%)
    Medicaid
1,264 (21%) 315 (23%)

1,331 (24%) 656 (24%)
Percent living below poverty 6,986

0.051 8,163

0.018
    <10%
3,763 (66%) 818 (64%)

3,530 (65%) 1,682 (62%)
    >20%
653 (11%) 178 (14%)

677 (12%) 375 (14%)
    10-20%
1,282 (22%) 292 (23%)

1,231 (23%) 668 (25%)
1 Median (IQR); n (%)
2 Wilcoxon rank sum test; Pearson’s Chi-squared test



4.4 TM only by Top

Make table for TM cohort top surgery.

table1_TM <- data_TM %>%
  select(age_at_index, age_at_index_group, race_ethnicity, site, INS_MEDICAID, poverty_cat, top) %>%
  tbl_summary(by = top, 
                    missing = "no",
                    type = list(where(is.logical) ~ "categorical")) %>%
  add_p() %>%
  bold_p() %>%
  add_n() %>%
  bold_labels() %>% 
  modify_spanning_header(c("stat_1", "stat_2") ~ "**Received Top Surgery**") %>%
  modify_header(all_stat_cols() ~ "**{level}**<br>N = {n}") %>%
  modify_caption("<div style='text-align: left; font-weight: bold; color: grey'>Table 1 (TM). Descriptive characteristics of TM study participants by GAS top surgery status</div>")

table1_TM
Table 1 (TM). Descriptive characteristics of TM study participants by GAS top surgery status
Characteristic N Received Top Surgery p-value2
No
N = 68041
Yes
N = 14821
Age at Index 8,286 21 (15, 30) 22 (17, 30) <0.001
Age at Index Group 8,286

<0.001
    <18
2,409 (35%) 377 (25%)
    18-34
3,282 (48%) 873 (59%)
    35-64
1,073 (16%) 226 (15%)
    65+
40 (0.6%) 6 (0.4%)
Race/Ethnicity 8,286

<0.001
    Hispanic
1,574 (23%) 373 (25%)
    Non-Hispanic Asian
561 (8.2%) 128 (8.6%)
    Non-Hispanic Black
504 (7.4%) 134 (9.0%)
    Non-Hispanic White
3,698 (54%) 802 (54%)
    Other/Unknown
467 (6.9%) 45 (3.0%)
KP site 8,286

<0.001
    Georgia
75 (1.1%) 1 (<0.1%)
    Northern California
4,392 (65%) 971 (66%)
    Southern California
2,337 (34%) 510 (34%)
Type of Insurance 8,286

0.3
    Commercial
5,156 (76%) 1,143 (77%)
    Medicaid
1,648 (24%) 339 (23%)
Percent living below poverty 8,163

0.7
    <10%
4,283 (64%) 929 (63%)
    >20%
867 (13%) 185 (13%)
    10-20%
1,546 (23%) 353 (24%)
1 Median (IQR); n (%)
2 Wilcoxon rank sum test; Pearson’s Chi-squared test






5 Univariate Models

5.1 Univariate - Procedures

Univariate model for any PROCEDURE

# make new binary variable for GAS_any coded as 0 and 1
data$GAS_any_binary <- ifelse(data$GAS_any == "Yes", 1, 0)

# check coding of new binary variable
# table(data$GAS_any_binary,data$GAS_any)


# Univariate models: univariable regression results for multiple variables
table2_uni_proc <- 
  data %>%
  select (age_at_index, age_at_index_group, race_ethnicity, site, trans_type, INS_MEDICAID, poverty_cat, GAS_any_binary) %>%
  tbl_uvregression(
    method = glm,
    y = GAS_any_binary,
    exponentiate = TRUE
  ) %>%
  add_global_p() %>%
  bold_labels() %>%
  modify_header(estimate ~ "**OR**" ) %>%
  modify_caption("<div style='text-align: left; font-weight: bold; color: grey'> Table 3a.  Univariate Statistics for Receipt of Any PROCEDURE") %>%
  as_gt() %>%
  gt::tab_header("Univariate Models - Procedures")
 
table2_uni_proc
Table 3a. Univariate Statistics for Receipt of Any PROCEDURE
Univariate Models - Procedures
Characteristic N OR 95% CI1 p-value
Age at Index 15,564 1.01 1.01, 1.01 <0.001
Age at Index Group 15,564

<0.001
    <18
— —
    18-34
1.29 1.26, 1.31
    35-64
1.31 1.28, 1.34
    65+
1.24 1.17, 1.32
Race/Ethnicity 15,564

<0.001
    Hispanic
— —
    Non-Hispanic Asian
1.03 1.00, 1.06
    Non-Hispanic Black
1.05 1.01, 1.08
    Non-Hispanic White
1.04 1.02, 1.07
    Other/Unknown
0.88 0.85, 0.91
KP site 15,564

<0.001
    Georgia
— —
    Northern California
1.22 1.13, 1.32
    Southern California
1.19 1.10, 1.29
TM vs TF status 15,564

<0.001
    Transfeminine
— —
    Transmasculine
0.94 0.92, 0.95
Type of Insurance 15,564

0.001
    Commercial
— —
    Medicaid
1.03 1.01, 1.05
Percent living below poverty 15,149

0.080
    <10%
— —
    >20%
1.02 0.99, 1.04
    10-20%
1.02 1.00, 1.04
1 CI = Confidence Interval



5.2 Univariate - Surgery

Univariate model for any SURGERY.

# make new binary variable for GAS_surgery coded as 0 and 1
data$GAS_surgery_binary <- ifelse(data$GAS_surgery == "Yes", 1, 0)

# check coding of new binary variable
# table(data$GAS_surgery_binary, data$GAS_surgery)

# Univariate models: univariable regression results for multiple variables
table2_uni_surg <- 
  data %>%
  select (age_at_index, age_at_index_group, race_ethnicity, site, trans_type, INS_MEDICAID, poverty_cat, GAS_surgery_binary) %>%
  tbl_uvregression(
    method = glm,
    y = GAS_surgery_binary,
    exponentiate = TRUE
  ) %>%
  add_global_p() %>%
  bold_labels() %>%
  modify_header(estimate ~ "**OR**" ) %>%
  modify_caption("<div style='text-align: left; font-weight: bold; color: grey'> Table 3a.  Univariate Statistics for Receipt of Any SURGERY") %>%
  as_gt() %>%
  gt::tab_header("Univariate Models - Surgery")
 
table2_uni_surg
Table 3a. Univariate Statistics for Receipt of Any SURGERY
Univariate Models - Surgery
Characteristic N OR 95% CI1 p-value
Age at Index 15,564 1.00 1.00, 1.00 <0.001
Age at Index Group 15,564

<0.001
    <18
— —
    18-34
1.12 1.10, 1.14
    35-64
1.16 1.14, 1.18
    65+
1.19 1.13, 1.26
Race/Ethnicity 15,564

<0.001
    Hispanic
— —
    Non-Hispanic Asian
1.03 1.00, 1.06
    Non-Hispanic Black
1.06 1.03, 1.10
    Non-Hispanic White
1.03 1.02, 1.05
    Other/Unknown
0.92 0.89, 0.95
KP site 15,564

<0.001
    Georgia
— —
    Northern California
1.05 0.98, 1.12
    Southern California
1.00 0.93, 1.07
TM vs TF status 15,564

<0.001
    Transfeminine
— —
    Transmasculine
1.16 1.14, 1.17
Type of Insurance 15,564

0.3
    Commercial
— —
    Medicaid
1.01 0.99, 1.03
Percent living below poverty 15,149

<0.001
    <10%
— —
    >20%
1.04 1.02, 1.06
    10-20%
1.02 1.00, 1.04
1 CI = Confidence Interval





6 Multivariate Models

6.1 Multivariate - Procedures

Multivariate model for any PROCEDURE ….Age group doesn’t look right…

# Model 1 = Logistic regression (outcome = any GAS, covariates = all)
m1_proc <- glm(
  GAS_any_binary ~ age_at_index_group + race_ethnicity + site + trans_type + INS_MEDICAID + poverty_cat,
  data = data,
  family = binomial(link="logit")
)

# Run Logistic Regression
table3_multi_proc <- 
  tbl_regression(
    m1_proc,
    exponentiate = TRUE) %>%
  add_global_p() %>%
  bold_labels() %>%
  modify_caption("<div style='text-align: left; font-weight: bold; color: grey'> Table 3b.  Multivariate Statistics for Receipt of Any PROCEDURE") %>%
  as_gt() %>%
  gt::tab_header("Multivariate Model - Procedures")
  
table3_multi_proc
Table 3b. Multivariate Statistics for Receipt of Any PROCEDURE
Multivariate Model - Procedures
Characteristic OR1 95% CI1 p-value
Age at Index Group

<0.001
    <18 — —
    18-34 3.10 2.84, 3.38
    35-64 3.32 3.00, 3.68
    65+ 2.46 1.89, 3.21
Race/Ethnicity

<0.001
    Hispanic — —
    Non-Hispanic Asian 1.00 0.88, 1.14
    Non-Hispanic Black 1.08 0.93, 1.25
    Non-Hispanic White 1.12 1.02, 1.22
    Other/Unknown 0.50 0.42, 0.59
KP site

<0.001
    Georgia — —
    Northern California 2.51 1.77, 3.62
    Southern California 2.30 1.62, 3.34
TM vs TF status

0.003
    Transfeminine — —
    Transmasculine 0.90 0.84, 0.97
Type of Insurance

<0.001
    Commercial — —
    Medicaid 1.23 1.14, 1.34
Percent living below poverty

0.7
    <10% — —
    >20% 0.98 0.88, 1.09
    10-20% 1.03 0.95, 1.12
1 OR = Odds Ratio, CI = Confidence Interval



6.2 Multivariate - Surgery

Multivariate model for any SURGERY ….Age group doesn’t look right…

# Model 1 = Logistic regression (outcome = any GAS, covariates = all)
m1_surg <- glm(
  GAS_surgery_binary ~ age_at_index_group + race_ethnicity + site + trans_type + INS_MEDICAID + poverty_cat,
  data = data,
  family = binomial(link="logit")
)

# Run Logistic Regression
table3_multi_surg <- 
  tbl_regression(
    m1_surg,
    exponentiate = TRUE) %>%
  add_global_p() %>%
  bold_labels() %>%
  modify_caption("<div style='text-align: left; font-weight: bold; color: grey'> Table 3b.  Multivariate Statistics for Receipt of Any SURGERY") %>%
  as_gt() %>%
  gt::tab_header("Multivariate Model - Surgeries")
  
table3_multi_surg
Table 3b. Multivariate Statistics for Receipt of Any SURGERY
Multivariate Model - Surgeries
Characteristic OR1 95% CI1 p-value
Age at Index Group

<0.001
    <18 — —
    18-34 2.35 2.13, 2.60
    35-64 3.21 2.85, 3.61
    65+ 4.38 3.27, 5.82
Race/Ethnicity

<0.001
    Hispanic — —
    Non-Hispanic Asian 1.15 0.99, 1.33
    Non-Hispanic Black 1.11 0.95, 1.30
    Non-Hispanic White 1.07 0.97, 1.18
    Other/Unknown 0.52 0.43, 0.63
KP site

<0.001
    Georgia — —
    Northern California 1.26 0.87, 1.86
    Southern California 0.95 0.66, 1.40
TM vs TF status

<0.001
    Transfeminine — —
    Transmasculine 2.79 2.57, 3.02
Type of Insurance

0.011
    Commercial — —
    Medicaid 1.13 1.03, 1.23
Percent living below poverty

0.087
    <10% — —
    >20% 1.12 1.00, 1.26
    10-20% 1.07 0.98, 1.17
1 OR = Odds Ratio, CI = Confidence Interval





7 Interaction Terms

7.1 Interaction - Procedure

Explore all two-way interactions between TM/TF status and other variables (outcome = any PROCEDURE)

m1_interaction_proc <- glm(
  GAS_any_binary ~ 
    trans_type * age_at_index_group +
    trans_type * race_ethnicity +
    trans_type * site +
    trans_type * INS_MEDICAID +
    trans_type * poverty_cat,
  data = data,
  family = binomial(link = "logit")
)

table4_interaction_proc <- 
  tbl_regression(
      m1_interaction_proc,
      exponentiate = TRUE) %>%
    add_global_p() %>%
    bold_labels() %>%
    modify_caption("<div style='text-align: left; font-weight: bold; color: grey'> Table X.  Multivariate Statistics for Receipt of Any PROCEDURE - including interaction terms") %>%
    as_gt() %>%
    gt::tab_header("Multivariate Models - Procedures + Interaction")

table4_interaction_proc
Table X. Multivariate Statistics for Receipt of Any PROCEDURE - including interaction terms
Multivariate Models - Procedures + Interaction
Characteristic OR1 95% CI1 p-value
TM vs TF status

0.8
    Transfeminine — —
    Transmasculine 1.12 0.52, 2.38
Age at Index Group

<0.001
    <18 — —
    18-34 4.68 4.01, 5.49
    35-64 4.40 3.73, 5.20
    65+ 3.26 2.38, 4.45
Race/Ethnicity

<0.001
    Hispanic — —
    Non-Hispanic Asian 0.91 0.76, 1.09
    Non-Hispanic Black 0.94 0.75, 1.19
    Non-Hispanic White 1.06 0.93, 1.20
    Other/Unknown 0.51 0.41, 0.64
KP site

<0.001
    Georgia — —
    Northern California 2.41 1.51, 3.94
    Southern California 2.00 1.25, 3.30
Type of Insurance

<0.001
    Commercial — —
    Medicaid 1.41 1.25, 1.60
Percent living below poverty

>0.9
    <10% — —
    >20% 0.99 0.84, 1.15
    10-20% 0.98 0.87, 1.11
TM vs TF status * Age at Index Group

<0.001
    Transmasculine * 18-34 0.53 0.44, 0.65
    Transmasculine * 35-64 0.70 0.56, 0.88
    Transmasculine * 65+ 0.86 0.43, 1.73
TM vs TF status * Race/Ethnicity

0.3
    Transmasculine * Non-Hispanic Asian 1.20 0.92, 1.55
    Transmasculine * Non-Hispanic Black 1.28 0.95, 1.72
    Transmasculine * Non-Hispanic White 1.10 0.93, 1.32
    Transmasculine * Other/Unknown 0.93 0.67, 1.28
TM vs TF status * KP site

0.052
    Transmasculine * Northern California 1.12 0.55, 2.34
    Transmasculine * Southern California 1.34 0.65, 2.82
TM vs TF status * Type of Insurance

0.004
    Transmasculine * Medicaid 0.78 0.67, 0.92
TM vs TF status * Percent living below poverty

0.6
    Transmasculine * >20% 0.99 0.80, 1.22
    Transmasculine * 10-20% 1.09 0.93, 1.28
1 OR = Odds Ratio, CI = Confidence Interval



7.2 Interaction - Surgery

Explore all two-way interactions between TM/TF status and other variables (outcome = any SURGERY)

m1_interaction_surg <- glm(
  GAS_surgery_binary ~ 
    trans_type * age_at_index_group +
    trans_type * race_ethnicity +
    trans_type * site +
    trans_type * INS_MEDICAID +
    trans_type * poverty_cat,
  data = data,
  family = binomial(link = "logit")
)

table4_interaction_surg <- 
  tbl_regression(
      m1_interaction_surg,
      exponentiate = TRUE) %>%
    add_global_p() %>%
    bold_labels() %>%
    modify_caption("<div style='text-align: left; font-weight: bold; color: grey'> Table X.  Multivariate Statistics for Receipt of Any SURGERY - including interaction terms") %>%
    as_gt() %>%
    gt::tab_header("Multivariate Models - Surgery + Interaction")

table4_interaction_surg
Table X. Multivariate Statistics for Receipt of Any SURGERY - including interaction terms
Multivariate Models - Surgery + Interaction
Characteristic OR1 95% CI1 p-value
TM vs TF status

>0.9
    Transfeminine — —
    Transmasculine 0.96 0.43, 2.13
Age at Index Group

<0.001
    <18 — —
    18-34 2.45 1.95, 3.10
    35-64 3.79 3.01, 4.83
    65+ 5.55 3.84, 8.00
Race/Ethnicity

0.004
    Hispanic — —
    Non-Hispanic Asian 1.31 1.05, 1.64
    Non-Hispanic Black 1.26 0.95, 1.66
    Non-Hispanic White 1.03 0.87, 1.22
    Other/Unknown 0.76 0.56, 1.02
KP site

<0.001
    Georgia — —
    Northern California 0.69 0.43, 1.14
    Southern California 0.50 0.31, 0.83
Type of Insurance

0.002
    Commercial — —
    Medicaid 1.27 1.09, 1.47
Percent living below poverty

0.2
    <10% — —
    >20% 1.19 0.98, 1.43
    10-20% 1.02 0.88, 1.19
TM vs TF status * Age at Index Group

0.020
    Transmasculine * 18-34 0.97 0.75, 1.25
    Transmasculine * 35-64 0.76 0.58, 1.00
    Transmasculine * 65+ 0.52 0.25, 1.06
TM vs TF status * Race/Ethnicity

0.002
    Transmasculine * Non-Hispanic Asian 0.79 0.59, 1.07
    Transmasculine * Non-Hispanic Black 0.85 0.61, 1.20
    Transmasculine * Non-Hispanic White 1.07 0.87, 1.32
    Transmasculine * Other/Unknown 0.55 0.37, 0.82
TM vs TF status * KP site

0.003
    Transmasculine * Northern California 3.40 1.62, 7.28
    Transmasculine * Southern California 3.63 1.71, 7.84
TM vs TF status * Type of Insurance

0.054
    Transmasculine * Medicaid 0.83 0.69, 1.00
TM vs TF status * Percent living below poverty

0.5
    Transmasculine * >20% 0.92 0.72, 1.16
    Transmasculine * 10-20% 1.08 0.89, 1.31
1 OR = Odds Ratio, CI = Confidence Interval






8 Revised Multivariate Models (stratified by TM/TF)


8.1 Revised Multivariate - Procedures


8.1.1 TM cohort Multivariate model for any PROCEDURE in TM only cohort

….Age group doesn’t look right…

#redo the TM / TF dataframes so they are updated 
data_TF <- data[data$trans_type == "Transfeminine", ] 
data_TM <- data[data$trans_type == "Transmasculine", ] 


# Model 1 = Logistic regression (outcome = any GAS, covariates = all)
m1_proc_TM <- glm(
  GAS_any_binary ~ age_at_index_group + race_ethnicity + site + INS_MEDICAID + poverty_cat,
  data = data_TM,
  family = binomial(link="logit")
)

# Run Logistic Regression
table3_multi_proc_TM <- 
  tbl_regression(
    m1_proc_TM,
    exponentiate = TRUE) %>%
  add_global_p() %>%
  bold_labels() %>%
  modify_caption("<div style='text-align: left; font-weight: bold; color: grey'> Table 3b.  Multivariate Statistics for Receipt of Any PROCEDURE in TM only") %>%
  as_gt() %>%
  gt::tab_header("Multivariate Model - Procedures (TM)")
  
table3_multi_proc_TM
Table 3b. Multivariate Statistics for Receipt of Any PROCEDURE in TM only
Multivariate Model - Procedures (TM)
Characteristic OR1 95% CI1 p-value
Age at Index Group

<0.001
    <18 — —
    18-34 2.50 2.25, 2.78
    35-64 3.09 2.68, 3.57
    65+ 2.82 1.52, 5.22
Race/Ethnicity

<0.001
    Hispanic — —
    Non-Hispanic Asian 1.08 0.90, 1.31
    Non-Hispanic Black 1.20 0.99, 1.45
    Non-Hispanic White 1.16 1.04, 1.31
    Other/Unknown 0.48 0.38, 0.60
KP site

<0.001
    Georgia — —
    Northern California 2.70 1.60, 4.78
    Southern California 2.69 1.58, 4.78
Type of Insurance

0.060
    Commercial — —
    Medicaid 1.11 1.00, 1.24
Percent living below poverty

0.4
    <10% — —
    >20% 0.98 0.85, 1.13
    10-20% 1.07 0.96, 1.20
1 OR = Odds Ratio, CI = Confidence Interval



8.1.2 TF cohort

Multivariate model for any PROCEDURE in TF only cohort ….Age group doesn’t look right…

# Model 1 = Logistic regression (outcome = any GAS, covariates = all)
m1_proc_TF <- glm(
  GAS_any_binary ~ age_at_index_group + race_ethnicity + site + INS_MEDICAID + poverty_cat,
  data = data_TF,
  family = binomial(link="logit")
)

# Run Logistic Regression
table3_multi_proc_TF <- 
  tbl_regression(
    m1_proc_TF,
    exponentiate = TRUE) %>%
  add_global_p() %>%
  bold_labels() %>%
  modify_caption("<div style='text-align: left; font-weight: bold; color: grey'> Table 3b.  Multivariate Statistics for Receipt of Any PROCEDURE in TF only") %>%
  as_gt() %>%
  gt::tab_header("Multivariate Model - Procedures (TF)")
  
table3_multi_proc_TF
Table 3b. Multivariate Statistics for Receipt of Any PROCEDURE in TF only
Multivariate Model - Procedures (TF)
Characteristic OR1 95% CI1 p-value
Age at Index Group

<0.001
    <18 — —
    18-34 4.68 4.01, 5.49
    35-64 4.40 3.73, 5.20
    65+ 3.26 2.38, 4.45
Race/Ethnicity

<0.001
    Hispanic — —
    Non-Hispanic Asian 0.91 0.76, 1.09
    Non-Hispanic Black 0.94 0.75, 1.19
    Non-Hispanic White 1.06 0.93, 1.20
    Other/Unknown 0.51 0.41, 0.64
KP site

<0.001
    Georgia — —
    Northern California 2.41 1.51, 3.94
    Southern California 2.00 1.25, 3.30
Type of Insurance

<0.001
    Commercial — —
    Medicaid 1.41 1.25, 1.60
Percent living below poverty

>0.9
    <10% — —
    >20% 0.99 0.84, 1.15
    10-20% 0.98 0.87, 1.11
1 OR = Odds Ratio, CI = Confidence Interval



8.2 Revised Multivariate - Surgery

8.2.1 TM cohort

Multivariate model for any SURGERY in TM only cohort ….Age group doesn’t look right…

# Model 1 = Logistic regression (outcome = any GAS, covariates = all)
m1_surg_TM <- glm(
  GAS_surgery_binary ~ age_at_index_group + race_ethnicity + site + INS_MEDICAID + poverty_cat,
  data = data_TM,
  family = binomial(link="logit")
)

# Run Logistic Regression
table3_multi_surg_TM <- 
  tbl_regression(
    m1_surg_TM,
    exponentiate = TRUE) %>%
  add_global_p() %>%
  bold_labels() %>%
  modify_caption("<div style='text-align: left; font-weight: bold; color: grey'> Table 3b.  Multivariate Statistics for Receipt of Any SURGERY in TM only") %>%
  as_gt() %>%
  gt::tab_header("Multivariate Model - Surgeries (TM)")
  
table3_multi_surg_TM
Table 3b. Multivariate Statistics for Receipt of Any SURGERY in TM only
Multivariate Model - Surgeries (TM)
Characteristic OR1 95% CI1 p-value
Age at Index Group

<0.001
    <18 — —
    18-34 2.38 2.13, 2.67
    35-64 2.89 2.50, 3.36
    65+ 2.86 1.52, 5.30
Race/Ethnicity

<0.001
    Hispanic — —
    Non-Hispanic Asian 1.04 0.86, 1.26
    Non-Hispanic Black 1.08 0.88, 1.31
    Non-Hispanic White 1.10 0.98, 1.25
    Other/Unknown 0.42 0.32, 0.53
KP site

<0.001
    Georgia — —
    Northern California 2.35 1.37, 4.29
    Southern California 1.81 1.04, 3.31
Type of Insurance

0.4
    Commercial — —
    Medicaid 1.05 0.94, 1.18
Percent living below poverty

0.2
    <10% — —
    >20% 1.09 0.94, 1.26
    10-20% 1.10 0.98, 1.24
1 OR = Odds Ratio, CI = Confidence Interval




8.2.2 TF cohort Multivariate model for any SURGERY in TF only cohort

….Age group doesn’t look right…

# Model 1 = Logistic regression (outcome = any GAS, covariates = all)
m1_surg_TF <- glm(
  GAS_surgery_binary ~ age_at_index_group + race_ethnicity + site + INS_MEDICAID + poverty_cat,
  data = data_TF,
  family = binomial(link="logit")
)

# Run Logistic Regression
table3_multi_surg_TF <- 
  tbl_regression(
    m1_surg_TF,
    exponentiate = TRUE) %>%
  add_global_p() %>%
  bold_labels() %>%
  modify_caption("<div style='text-align: left; font-weight: bold; color: grey'> Table 3b.  Multivariate Statistics for Receipt of Any SURGERY in TF only") %>%
  as_gt() %>%
  gt::tab_header("Multivariate Model - Surgeries (TF)")
  
table3_multi_surg_TF
Table 3b. Multivariate Statistics for Receipt of Any SURGERY in TF only
Multivariate Model - Surgeries (TF)
Characteristic OR1 95% CI1 p-value
Age at Index Group

<0.001
    <18 — —
    18-34 2.45 1.95, 3.10
    35-64 3.79 3.01, 4.83
    65+ 5.55 3.84, 8.00
Race/Ethnicity

0.004
    Hispanic — —
    Non-Hispanic Asian 1.31 1.05, 1.64
    Non-Hispanic Black 1.26 0.95, 1.66
    Non-Hispanic White 1.03 0.87, 1.22
    Other/Unknown 0.76 0.56, 1.02
KP site

<0.001
    Georgia — —
    Northern California 0.69 0.43, 1.14
    Southern California 0.50 0.31, 0.83
Type of Insurance

0.002
    Commercial — —
    Medicaid 1.27 1.09, 1.47
Percent living below poverty

0.2
    <10% — —
    >20% 1.19 0.98, 1.43
    10-20% 1.02 0.88, 1.19
1 OR = Odds Ratio, CI = Confidence Interval