Analysis of Prostate Data

This is the prostate data set. The preop therapy mean is 0.1203 and the recurrence mean is 0.1709.

Headline about Prostate Data

There is a lot of data to be listed. The mean of the time to recurrence is 32.918.

prostate %>% 
  mutate(aa = factor(aa, levels = c(0,1), 
                     labels = c("White", "African-American"))) %>% 
  mutate(fam_hx = factor(fam_hx, levels = c(0,1), 
      labels = c("No Family History", "FHx of Prostate Cancer"))) ->
prostate_factors
prostate %>% 
  select(age, p_vol, preop_psa, aa, fam_hx) %>% 
  group_by(aa, fam_hx) %>% 
  summarize(across(age:preop_psa, ~ mean(.x, na.rm=TRUE)))
## `summarise()` has regrouped the output.
## ℹ Summaries were computed grouped by aa and fam_hx.
## ℹ Output is grouped by aa.
## ℹ Use `summarise(.groups = "drop_last")` to silence this message.
## ℹ Use `summarise(.by = c(aa, fam_hx))` for per-operation grouping
##   (`?dplyr::dplyr_by`) instead.
## # A tibble: 4 × 5
## # Groups:   aa [2]
##      aa fam_hx   age p_vol preop_psa
##   <dbl>  <dbl> <dbl> <dbl>     <dbl>
## 1     0      0  61.8  56.9      8.06
## 2     0      1  59.5  57.3      7.22
## 3     1      0  60.7  54.3      9.90
## 4     1      1  60.1  51.4      8.71

White and no family history had mean age of 61.8. It can be hypothesized that white have a lower p_vol than african american. and also that those with family history have lower preop_psa. An ANOVA can be done to look at the effect of different factors. ## Including Plots

You can also embed plots, for example:

## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 11 rows containing non-finite outside the scale range
## (`stat_smooth()`).
## Warning: Removed 11 rows containing missing values or values outside the scale range
## (`geom_point()`).

The slopes of the linear regressions appear to be lower for African Americans and no family history.

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.

Statistical Testing

It looks like the African-American patients has a higher preoperative PSA level.

prostate %>% 
  t_test(formula = preop_psa ~ aa,
         detailed = TRUE)
## # A tibble: 1 × 15
##   estimate estimate1 estimate2 .y.    group1 group2    n1    n2 statistic      p
## *    <dbl>     <dbl>     <dbl> <chr>  <chr>  <chr>  <int> <int>     <dbl>  <dbl>
## 1    -1.89      7.86      9.75 preop… 0      1        259    54     -1.96 0.0534
## # ℹ 5 more variables: df <dbl>, conf.low <dbl>, conf.high <dbl>, method <chr>,
## #   alternative <chr>

The p-value is greater than 0.05, so there is not statistically significant difference between the pre-op PSA levels between African American patients and whites.