Skip to content

Commit

Permalink
results section; juts "rank" on x-axis
Browse files Browse the repository at this point in the history
  • Loading branch information
wibeasley committed Apr 26, 2020
1 parent 17938f5 commit ce7ec79
Show file tree
Hide file tree
Showing 38 changed files with 295 additions and 311 deletions.
Binary file modified analysis/survey-response-2/figure-png/3-predictor-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified analysis/survey-response-2/figure-png/3-predictor-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified analysis/survey-response-2/figure-png/3-predictor-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified analysis/survey-response-2/figure-png/3-predictor-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified analysis/survey-response-2/figure-png/billet-intercept-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified analysis/survey-response-2/figure-png/by-billet-and-rate-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified analysis/survey-response-2/figure-png/by-billet_current-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified analysis/survey-response-2/figure-png/by-bonus-pay-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified analysis/survey-response-2/figure-png/by-critical_war-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified analysis/survey-response-2/figure-png/by-rank-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified analysis/survey-response-2/figure-png/marginals-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified analysis/survey-response-2/figure-png/marginals-10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified analysis/survey-response-2/figure-png/marginals-11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified analysis/survey-response-2/figure-png/marginals-12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified analysis/survey-response-2/figure-png/marginals-13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified analysis/survey-response-2/figure-png/marginals-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified analysis/survey-response-2/figure-png/marginals-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified analysis/survey-response-2/figure-png/marginals-4.png
Binary file modified analysis/survey-response-2/figure-png/marginals-5.png
Binary file modified analysis/survey-response-2/figure-png/marginals-6.png
Binary file modified analysis/survey-response-2/figure-png/marginals-7.png
Binary file modified analysis/survey-response-2/figure-png/marginals-8.png
Binary file modified analysis/survey-response-2/figure-png/marginals-9.png
Binary file modified analysis/survey-response-2/figure-png/specialty-intercept-1.png
17 changes: 13 additions & 4 deletions analysis/survey-response-2/survey-response-2.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ config <- config::get()
include_year_first <- 2012L
size_mean_diamond <- 3

labels_officer_rate <- c(
`3` = "LT (3)",
`4` = "LCDR (4)",
`5` = "CDR (5)",
`6` = "CAPT (6)"
)

theme_report <- theme_bw() +
theme(axis.ticks.length = grid::unit(0, "cm")) +
theme(axis.text = element_text(colour="gray40")) +
Expand Down Expand Up @@ -599,15 +606,16 @@ ds_no_other_or_unknown %>%
geom_point(position=position_jitterdodge(jitter.width=0.4, jitter.height =.2, dodge.width=.75), size=1.5, shape=21, na.rm=T, show.legend = T) +
# geom_smooth(method = lm, se=F, formula = y~ x + 1) +
geom_abline(data=ds_trajectory, aes(intercept=intercept, slope=slope, color=billet_current), size=1, alpha=.5) +
scale_x_continuous(labels = labels_officer_rate, breaks = as.integer(names(labels_officer_rate))) +
scale_color_manual(values = palette_billet) +
scale_fill_manual(values = palette_billet_light) +
guides(color = guide_legend(override.aes = list(size = 3))) +
theme_report +
labs(
x = "Officer Rate",
x = "Officer Rank",
y = "Satisfaction",
color = "Current Billet",
fill = "Current Billet"
color = "Current Billet\nCategory",
fill = "Current Billet\nCategory"
)

# ---- specialty-intercept ------------------------------------------------------
Expand Down Expand Up @@ -663,11 +671,12 @@ ds_no_other_or_unknown %>%
# geom_smooth(method = lm, se=F, formula = y~ x + 1) +
geom_abline(data=ds_trajectory_specialty, aes(intercept=intercept, slope=slope, color=specialty_type), size=1, alpha=.5) +
scale_color_manual(values = palette_specialty) +
scale_x_continuous(labels = labels_officer_rate, breaks = as.integer(names(labels_officer_rate))) +
scale_fill_manual(values = palette_specialty_light) +
guides(color = guide_legend(override.aes = list(size = 3))) +
theme_report +
labs(
x = "Officer Rate",
x = "Officer Rank",
y = "Satisfaction",
color = "Specialty Type",
fill = "Specialty Type"
Expand Down
11 changes: 10 additions & 1 deletion analysis/survey-response-2/survey-response-2.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ output:

This report covers the survey about attitudes collected by Richard Childers, MD and Joel Schofer, MD.


Overall satisfaction was treated as a continuous response variable in a multiple regression. The best fitting model included the three predictor variables of (a) specialty type, (b) officer rank, and (c) billet category, and no interaction terms. Additional variables such as (d) bonus pay, (e) deployment rate, and (f) staffing status did not improve the model fit significantly, and therefore were removed.

Among the five levels in billet category, CONUS MTF had the highest values of satisfaction, and served as the reference group. The CONUS Operational, OCONUS MTF, and Non-operational/non-clinical types were roughly .4 units less satisfied than CONUS MTF (after holding the other two predictors constant). Similarly, physicians currently assigned to OCONUS operational were 1.1 units less satisfied than CONUS MTF.

Among the five levels in specialty type, the non-surgical physicians were most satisfied, and served as the reference group. Residents were .2 units less satisfied, which was not significantly different. However, the difference was significant between the nonsurgical type and the surgical (.3 units), family practice (.4 units) and operational (.7 units) types.

Officer rank was a continuous variable and had a significant positive slope: satisfaction increased with seniority. Note that this does not necessarily mean an officer is expected to grow more satisfied as seniority increases; an alternate explanation is that less-satisfied officers leave the Navy while the more-satisfied officer remain and are promoted. Longitudinal studies are needed to evaluate these competing explanations.

<!-- Set the working directory to the repository's base directory; this assumes the report is nested inside of two directories.-->
```{r, echo=F, message=F}
# cat("Working directory: ", getwd())
Expand All @@ -26,7 +35,7 @@ opts_chunk$set(
results = 'show',
comment = NA,
tidy = FALSE,
# dpi = 400,
# dpi = 1200,
# out.width = "650px", #This affects only the markdown, not the underlying png file. The height will be scaled appropriately.
fig.width = 7,
fig.height = 4,
Expand Down
320 changes: 139 additions & 181 deletions analysis/survey-response-2/survey-response-2.html

Large diffs are not rendered by default.

258 changes: 133 additions & 125 deletions analysis/survey-response-2/survey-response-2.md

Large diffs are not rendered by default.

0 comments on commit ce7ec79

Please sign in to comment.