Last updated: 2021-03-27

Checks: 7 0

Knit directory: emlr_mod_v_XXX/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20200707) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version b1706de. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/

Untracked files:
    Untracked:  2_Pac_zon_em.png
    Untracked:  so_Pac_zon_off.png

Unstaged changes:
    Deleted:    README.md
    Deleted:    a.png
    Modified:   data/auxillary/params_local.rds

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/eMLR_model_fitting.Rmd) and HTML (docs/eMLR_model_fitting.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd b1706de Donghe-Zhu 2021-03-27 local rebuild
html 3061a0b Donghe-Zhu 2021-03-27 Build site.
html b883157 Donghe-Zhu 2021-03-27 Build site.
html 0c20513 Donghe-Zhu 2021-03-26 Build site.
html d19654d Donghe-Zhu 2021-03-26 Build site.
Rmd 921c9db Donghe-Zhu 2021-03-26 local rebuild
html 6c53dbf Donghe-Zhu 2021-03-25 Build site.
Rmd 195db95 Donghe-Zhu 2021-03-24 local rebuild
html 1914a11 Donghe-Zhu 2021-03-24 Build site.
Rmd e32af14 Donghe-Zhu 2021-03-24 local rebuild
html 8be810e Donghe-Zhu 2021-03-23 Build site.
Rmd 85274db Donghe-Zhu 2021-03-23 local rebuild
html bf19764 Donghe-Zhu 2021-03-22 Build site.
html 3ec9d3d Donghe-Zhu 2021-03-22 Build site.
Rmd 073fa6a Donghe-Zhu 2021-03-22 local rebuild
html 134ace1 Donghe-Zhu 2021-03-22 Build site.
html f6d70a4 Donghe-Zhu 2021-03-22 Build site.
html 183443b Donghe-Zhu 2021-03-21 Build site.
Rmd adca794 Donghe-Zhu 2021-03-21 local rebuild
html 2e6976b Donghe-Zhu 2021-03-21 Build site.
Rmd 4e7de35 Donghe-Zhu 2021-03-21 local rebuild
html 51a42bd Donghe-Zhu 2021-03-16 Build site.
html f745381 Donghe-Zhu 2021-03-16 Build site.
html aecbf75 Donghe-Zhu 2021-03-14 Build site.
html 1b2a0c2 Donghe-Zhu 2021-03-14 Build site.
html 6733e48 Donghe-Zhu 2021-03-12 Build site.
html ba71e6a Donghe-Zhu 2021-03-12 Build site.
html 9dbf5bd Donghe-Zhu 2021-03-11 Build site.
html a49df30 Donghe-Zhu 2021-03-11 Build site.
html b3348a5 Donghe-Zhu 2021-03-11 Build site.
Rmd 026c061 Donghe-Zhu 2021-03-11 local rebuild
html 1c24ff7 Donghe-Zhu 2021-03-10 Build site.
Rmd dbd8ff8 Donghe-Zhu 2021-03-10 local rebuild
html 94ce5a8 Donghe-Zhu 2021-03-10 Build site.
html db33928 Donghe-Zhu 2021-03-10 Build site.
html 3d1f470 Donghe-Zhu 2021-03-10 Build site.
html 9b7bc66 Donghe-Zhu 2021-03-10 Build site.
Rmd 498be1d Donghe-Zhu 2021-03-10 local rebuild
html 4168b43 Donghe-Zhu 2021-03-10 Build site.
html 5365f80 Donghe-Zhu 2021-03-10 Build site.
html 2b6c392 Donghe-Zhu 2021-03-10 Build site.
html 9f58753 Donghe-Zhu 2021-03-10 Build site.
Rmd e255177 Donghe-Zhu 2021-03-10 local rebuild
html f2a7146 Donghe-Zhu 2021-03-10 Build site.
html fd528ed Donghe-Zhu 2021-03-10 Build site.
html 9d5a62c Donghe-Zhu 2021-03-10 Build site.
Rmd 09b27ef Donghe-Zhu 2021-03-10 local rebuild
html 5d1e70b Donghe-Zhu 2021-03-10 Build site.
Rmd 6125b2d Donghe-Zhu 2021-03-10 local rebuild
html 2093979 Donghe-Zhu 2021-03-10 Build site.
Rmd 558d285 Donghe-Zhu 2021-03-10 local rebuild
html b865899 Donghe-Zhu 2021-03-10 Build site.
html cc2a956 Donghe-Zhu 2021-03-10 Build site.
Rmd 2a633bd Donghe-Zhu 2021-03-10 local rebuild
html 60689fb Donghe-Zhu 2021-03-10 Build site.
html 9230b52 Donghe-Zhu 2021-03-10 Build site.
html dba33c8 Donghe-Zhu 2021-03-09 Build site.
Rmd 6a60e02 Donghe-Zhu 2021-03-09 local rebuild
html 17f1c4a Donghe-Zhu 2021-03-09 Build site.
Rmd 4a4a400 Donghe-Zhu 2021-03-09 local rebuild
html c024d1a Donghe-Zhu 2021-03-09 Build site.
Rmd 34744ec Donghe-Zhu 2021-03-09 local rebuild
html 02f7242 Donghe-Zhu 2021-03-09 Build site.
html 6f50bc6 Donghe-Zhu 2021-03-09 Build site.
Rmd 88f0729 Donghe-Zhu 2021-03-09 local rebuild
html 1691156 Donghe-Zhu 2021-03-08 Build site.
html c0ceaf8 Donghe-Zhu 2021-03-08 Build site.
html 058e0a1 Donghe-Zhu 2021-03-08 Build site.
html 112dea0 Donghe-Zhu 2021-03-08 Build site.
html 1843412 Donghe-Zhu 2021-03-08 Build site.
Rmd d709f6c Donghe-Zhu 2021-03-08 local rebuild
html 65b0cef Donghe-Zhu 2021-03-07 Build site.
html 4083a6c Donghe-Zhu 2021-03-07 Build site.
html 3fbbfa4 Donghe-Zhu 2021-03-07 Build site.
html 627c8fb Donghe-Zhu 2021-03-07 Build site.
html 3607f4d Donghe-Zhu 2021-03-07 Build site.
html 9ef3222 Donghe-Zhu 2021-03-05 Build site.
Rmd 2be54f9 Donghe-Zhu 2021-03-05 local rebuild
html 8c1e978 Donghe-Zhu 2021-03-05 Build site.
html 865f68c Donghe-Zhu 2021-03-05 Build site.
html ee69bc1 Donghe-Zhu 2021-03-05 Build site.
html a79291f Donghe-Zhu 2021-03-05 Build site.
html e8c6f30 Donghe-Zhu 2021-03-04 Build site.
html 59288fe Donghe-Zhu 2021-03-04 Build site.
html 731abc8 Donghe-Zhu 2021-03-04 Build site.
html e2a5a33 Donghe-Zhu 2021-03-04 Build site.
html c7892c1 Donghe-Zhu 2021-03-04 Build site.
html 924430b Donghe-Zhu 2021-03-03 Build site.
html 0d0bca1 Donghe-Zhu 2021-03-03 Build site.
html cb63c16 Donghe-Zhu 2021-03-03 Build site.
html ffda45a Donghe-Zhu 2021-03-03 Build site.
html 691ba81 Donghe-Zhu 2021-03-03 Build site.
html c5e45a2 Donghe-Zhu 2021-03-03 Build site.
html 89c3e58 Donghe-Zhu 2021-03-03 Build site.
html c407a50 Donghe-Zhu 2021-03-03 Build site.
html c911669 Donghe-Zhu 2021-03-03 Build site.
Rmd e1f9d21 Donghe-Zhu 2021-03-03 local rebuild
html b71c719 Donghe-Zhu 2021-03-01 Build site.
html 13666ca Donghe-Zhu 2021-03-01 Build site.
Rmd c3195f4 Donghe-Zhu 2021-03-01 local rebuild
html c6e60fe Donghe-Zhu 2021-03-01 Build site.
Rmd 8ef147d Donghe-Zhu 2021-03-01 local rebuild
html 7a388f7 Donghe-Zhu 2021-03-01 Build site.
html 799e913 Donghe-Zhu 2021-03-01 Build site.
Rmd aa780a7 Donghe-Zhu 2021-03-01 local rebuild
html 66ff99f Donghe-Zhu 2021-03-01 Build site.
html ac9bb7a Donghe-Zhu 2021-02-28 Build site.
html efdc047 Donghe-Zhu 2021-02-28 Build site.
html e9a7418 Donghe-Zhu 2021-02-28 Build site.
Rmd eac1b0e Donghe-Zhu 2021-02-28 local rebuild
html e152917 Donghe-Zhu 2021-02-28 Build site.
html feb991c Donghe-Zhu 2021-02-27 Build site.
Rmd 4563314 Donghe-Zhu 2021-02-27 local rebuild
html 287123c Donghe-Zhu 2021-02-27 Build site.
Rmd 764a9c2 Donghe-Zhu 2021-02-27 local rebuild
html 54d5b5b Donghe-Zhu 2021-02-27 Build site.
Rmd 2e836bf Donghe-Zhu 2021-02-27 local rebuild
html 330f064 Donghe-Zhu 2021-02-27 Build site.
Rmd f360282 Donghe-Zhu 2021-02-27 local rebuild
html adbc9bc Donghe-Zhu 2021-02-27 Build site.
Rmd a8a8f9c Donghe-Zhu 2021-02-27 local rebuild
html 5937141 Donghe-Zhu 2021-02-27 Build site.
Rmd 5f0bfca Donghe-Zhu 2021-02-27 local rebuild
html 4414bbf Donghe-Zhu 2021-02-27 Build site.
html a265efb Donghe-Zhu 2021-02-27 Build site.
html 19edd1e Donghe-Zhu 2021-02-27 Build site.
Rmd 1ae5bb4 Donghe-Zhu 2021-02-27 local rebuild
html f20483f Donghe-Zhu 2021-02-26 Build site.
html 6a2c7b3 Donghe-Zhu 2021-02-25 Build site.
html 02b976d Donghe-Zhu 2021-02-24 Build site.
html 354c224 Donghe-Zhu 2021-02-24 Build site.
Rmd d910d39 Donghe-Zhu 2021-02-24 local rebuild
html 1a0a88a Donghe-Zhu 2021-02-24 Build site.
Rmd 663e891 Donghe-Zhu 2021-02-24 local rebuild
html 57f701e Donghe-Zhu 2021-02-24 Build site.
html 06f3149 Donghe-Zhu 2021-02-16 Build site.
html 401eab3 Donghe-Zhu 2021-02-15 Build site.
html e3bba84 Donghe-Zhu 2021-02-15 Build site.
html 5dce4b1 Donghe-Zhu 2021-02-15 Build site.
Rmd 35b0f2e Donghe-Zhu 2021-02-15 local rebuild
html 4469a0c Donghe-Zhu 2021-02-13 Build site.
Rmd 8186d57 Donghe-Zhu 2021-02-10 apply nr_obs
html 5ae6a69 Donghe-Zhu 2021-02-10 Build site.
Rmd eeb6557 Donghe-Zhu 2021-02-10 local rebuild
html 05385dc Donghe-Zhu 2021-02-10 Build site.
html f791ae4 Donghe-Zhu 2021-02-09 Build site.
html f71ae34 Donghe-Zhu 2021-02-09 Build site.
html c011832 Donghe-Zhu 2021-02-09 Build site.
html a145fa7 Donghe-Zhu 2021-02-09 Build site.
Rmd 37a41c8 Donghe-Zhu 2021-02-09 local rebuild
html c344e42 Donghe-Zhu 2021-02-08 Build site.
Rmd 8f5fa79 Donghe-Zhu 2021-02-08 local rebuild
html 2f095d7 Donghe-Zhu 2021-02-07 Build site.
html 2305044 Donghe-Zhu 2021-02-07 Build site.
Rmd c3638c1 Donghe-Zhu 2021-02-07 local rebuild
html 1fad5f1 Donghe-Zhu 2021-02-07 Build site.
html ca03c39 Donghe-Zhu 2021-02-07 Build site.
html e2ffc14 Donghe-Zhu 2021-02-05 Build site.
html cd7c52c Donghe-Zhu 2021-02-04 Build site.
Rmd bcf91a8 jens-daniel-mueller 2021-02-04 separate MLR tables, added plot residuals vs location
html bcf84f4 Donghe-Zhu 2021-02-02 Build site.
html a518739 Donghe-Zhu 2021-02-01 Build site.
html 61666de Donghe-Zhu 2021-01-31 Build site.
html 865b582 Donghe-Zhu 2021-01-31 Build site.
html 3e68089 Donghe-Zhu 2021-01-31 Build site.
html ecf335c Donghe-Zhu 2021-01-31 Build site.
html a618965 Donghe-Zhu 2021-01-31 Build site.
html 59e006e Donghe-Zhu 2021-01-31 Build site.
html a1c8f87 Donghe-Zhu 2021-01-31 Build site.
html ae5c18f Donghe-Zhu 2021-01-31 Build site.
html b50fe52 Donghe-Zhu 2021-01-31 Build site.
Rmd ac99ae5 jens-daniel-mueller 2021-01-29 code review
html ac99ae5 jens-daniel-mueller 2021-01-29 code review
html b5bdcaf Donghe-Zhu 2021-01-29 Build site.
Rmd b234505 Donghe-Zhu 2021-01-29 MLR approach across all depth
html 442010d Donghe-Zhu 2021-01-29 Build site.
Rmd e67e7dd Donghe-Zhu 2021-01-29 surface equilibrium approach across all latitudes irrespective of gamma
html 372adf5 Donghe-Zhu 2021-01-29 Build site.
html af8788e Donghe-Zhu 2021-01-29 Build site.
html 21c91c9 Donghe-Zhu 2021-01-29 Build site.
html eded038 Donghe-Zhu 2021-01-29 Build site.
html 541d4dd Donghe-Zhu 2021-01-29 Build site.
html 6a75576 Donghe-Zhu 2021-01-28 Build site.
html 16fba40 Donghe-Zhu 2021-01-28 Build site.
Rmd aecf0c6 Donghe-Zhu 2021-01-28 diagnostic ploting
Rmd a02684e Donghe-Zhu 2021-01-28 error
Rmd 4584be9 Donghe-Zhu 2021-01-28 latest
html 12bc567 Donghe-Zhu 2021-01-27 Build site.
html ceed31b Donghe-Zhu 2021-01-27 Build site.
html 342402d Donghe-Zhu 2021-01-27 Build site.
html 5bad5c2 Donghe-Zhu 2021-01-27 Build site.
Rmd c2c9529 Donghe-Zhu 2021-01-27 random subsetting based on lat
html 61efb56 Donghe-Zhu 2021-01-25 Build site.
html 48f638e Donghe-Zhu 2021-01-25 Build site.
html c1cec47 Donghe-Zhu 2021-01-25 Build site.
html 05ffb0c Donghe-Zhu 2021-01-25 Build site.
html 8b97165 Donghe-Zhu 2021-01-25 Build site.
html c569946 Donghe-Zhu 2021-01-24 Build site.
html a2f0d56 Donghe-Zhu 2021-01-23 Build site.
html 28509fc Donghe-Zhu 2021-01-23 Build site.
html 4c28e4a Donghe-Zhu 2021-01-22 Build site.
html 24cc264 jens-daniel-mueller 2021-01-22 cleaned /docs before creating copies
html 88eb28f Donghe-Zhu 2021-01-21 Build site.
html 2679490 Donghe-Zhu 2021-01-21 Build site.
html 7891955 Donghe-Zhu 2021-01-21 Build site.
html d4cf1cb Donghe-Zhu 2021-01-21 Build site.
Rmd 167eeec Donghe-Zhu 2021-01-21 surface DIC calculation with atmospheric equilibrium option
html 1f3e5b6 jens-daniel-mueller 2021-01-20 Build site.
html 0e7bdf1 jens-daniel-mueller 2021-01-15 cleaning template repository
html 73cbef3 jens-daniel-mueller 2021-01-15 Build site.
html 4571843 jens-daniel-mueller 2021-01-14 revision and html deleted for template copying
html 23151cd jens-daniel-mueller 2021-01-14 Build site.
html b3564aa jens-daniel-mueller 2021-01-14 Build site.
html 8d032c3 jens-daniel-mueller 2021-01-14 Build site.
html 022871c Donghe-Zhu 2021-01-13 Build site.
Rmd d44f36f Donghe-Zhu 2021-01-13 reorder analysis final
html 17dee1d jens-daniel-mueller 2021-01-13 Build site.
Rmd 9e04fd7 jens-daniel-mueller 2021-01-13 local rebuild after revision
html a076226 Donghe-Zhu 2021-01-11 Build site.
Rmd 52eff18 Donghe-Zhu 2021-01-09 Implemet model_run and subsetting
html 7cdea0c jens-daniel-mueller 2021-01-06 Build site.
Rmd b5934dd jens-daniel-mueller 2021-01-06 local rebuild after revision
html fa85b93 jens-daniel-mueller 2021-01-06 Build site.
html e5cb81a Donghe-Zhu 2021-01-05 Build site.
Rmd 608cc45 Donghe-Zhu 2021-01-05 modification of analysis
html a499f10 Donghe-Zhu 2021-01-05 Build site.
Rmd 715bdb4 Donghe-Zhu 2021-01-02 model modification
html fb8a752 Donghe-Zhu 2020-12-23 Build site.
Rmd 82e3c9c Donghe-Zhu 2020-12-23 first build after creating model template
html 8fae0b2 Donghe-Zhu 2020-12-21 Build site.
Rmd 00a1322 Donghe-Zhu 2020-12-21 first build after creating model template
Rmd d73ae35 Donghe-Zhu 2020-12-21 first version with lm error
html c8b76b3 jens-daniel-mueller 2020-12-19 Build site.
Rmd b5fedce jens-daniel-mueller 2020-12-19 first build after creating model template
Rmd 8e8abf5 Jens Müller 2020-12-18 Initial commit

1 Required data

Required are:

  • cleaned and prepared GLODAP-based synthetic model subsetting file
GLODAP <-
  read_csv(paste(path_version_data,
                 "GLODAPv2.2020_MLR_fitting_ready.csv",
                 sep = ""))

2 Predictor combinations

Find all possible combinations of following considered predictor variables:

  • sal, temp, aou, nitrate, silicate, phosphate, phosphate_star
# the following code is a workaround to find all predictor combinations
# using the olsrr package and fit all models for one era, slab, and basin

i_basin <- unique(GLODAP$basin)[1]
i_era   <- unique(GLODAP$era)[1]

# subset one basin and era for fitting
GLODAP_basin_era <- GLODAP %>%
  filter(basin == i_basin, era == i_era)

i_gamma_slab <- unique(GLODAP_basin_era$gamma_slab)[1]
print(i_gamma_slab)

# subset one gamma slab
GLODAP_basin_era_slab <- GLODAP_basin_era %>%
  filter(gamma_slab == i_gamma_slab)

# fit the full linear model, i.e. all predictor combinations
lm_full <- lm(paste(
  params_local$MLR_target,
  paste(params_local$MLR_predictors, collapse = " + "),
  sep = " ~ "
),
data = GLODAP_basin_era_slab)

# fit linear models for all possible predictor combinations
# unfortunately, this functions does not provide model coefficients (yet)
lm_all <- ols_step_all_possible(lm_full)

# convert to tibble
lm_all <- as_tibble(lm_all)

# extract relevant columns and format model formula
lm_all <- lm_all %>% 
  select(n, predictors) %>%
  mutate(lm_coeff = str_replace_all(predictors, " ", " + "),
         lm_coeff = paste(params_local$MLR_target, "~", lm_coeff))

# remove certain predictor combinations
# lm_rm_ph <- lm_all %>%
#   filter(str_detect(lm_coeff, "phosphate_star")) %>%
#   mutate(lm_coeff_filter = str_remove(lm_coeff, "phosphate_star")) %>%
#   filter(
#     str_detect(lm_coeff_filter, "oxygen") &
#       str_detect(lm_coeff_filter, "phosphate")
#   )

# lm_rm_si <- lm_all %>%
#   filter(str_detect(lm_coeff, "silicate_star")) %>%
#   mutate(lm_coeff_filter = str_remove(lm_coeff, "silicate_star")) %>%
#   filter(str_detect(lm_coeff_filter, "silicate"))

# lm_rm_o2 <- lm_all %>%
#   filter(str_detect(lm_coeff, "phosphate_star")) %>%
#   mutate(lm_coeff_filter = str_remove(lm_coeff, "phosphate_star")) %>%
#   filter(
#     str_detect(lm_coeff_filter, "phosphate") &
#       str_detect(lm_coeff_filter, "oxygen")
#   )

# lm_rm <- bind_rows(lm_rm_ph, lm_rm_o2) %>%
#   select(-lm_coeff_filter) %>%
#   unique()

# lm_rm <- lm_rm_ph %>%
#   select(-lm_coeff_filter) %>%
#   unique()
# 
# lm_all <- anti_join(lm_all, lm_rm)

# remove temp sal predictor combination
lm_all <- lm_all %>%
# filter(!(
#   str_detect(lm_coeff, "temp") &
#     str_detect(lm_coeff, "phosphate_star")
# )) %>%
mutate(lm_coeff_filter = str_remove(lm_coeff, "phosphate_star")) %>%
filter(!(str_detect(lm_coeff_filter, "nitrate") &
           str_detect(lm_coeff_filter, "phosphate")
)) %>%
filter(!(
  str_detect(lm_coeff_filter, "temp") &
    str_detect(lm_coeff_filter, "sal")
)) %>%
# filter(!(
#   str_detect(lm_coeff_filter, "oxygen") &
#     str_detect(lm_coeff_filter, "aou")
# )) %>%
select(-lm_coeff_filter)

# remove helper objects
rm(
  i_gamma_slab,
  i_era,
  i_basin,
  GLODAP_basin_era,
  GLODAP_basin_era_slab,
  lm_full,
  lm_rm_ph,
  lm_rm_si,
  lm_rm_o2,
  lm_rm
)

# lm_full <- lm(paste(
#   params_local$MLR_target,
#   paste(params_local$MLR_predictors, collapse = " + "),
#   sep = " ~ "
# ),
# data = GLODAP_basin_era_slab)
# 
# lm_full <-
#   loess(
#     cstar_tref ~ sal + temp + aou + phosphate,
#     span = 0.1,
#     degree = 1,
#     data = GLODAP_basin_era_slab
#   )

3 Apply predictor threshold

Select combinations with a total number of predictors in the range:

  • Minimum: 2
  • Maximum: 7
lm_all <- lm_all %>% 
  filter(n >= params_local$MLR_predictors_min,
         n <= params_local$MLR_predictors_max)

This results in a total number of MLR models of:

  • 64

4 Fit all models

Individual linear regression models were fitted for the chosen target variable:

  • cstar_tref

as a function of each predictor combination. Fitting was performed separately within each basin, era, and slab. Model diagnostics, such as the root mean squared error (RMSE), were calculated for each fitted model.

# loop across all basins, era, gamma slabs, and MLRs
# fit all MLR models
for (i_basin in unique(GLODAP$basin)) {
  for (i_era in unique(GLODAP$era)) {
    #i_basin <- unique(GLODAP$basin)[1]
    #i_era   <- unique(GLODAP$era)[1]
    print(i_basin)
    print(i_era)
    
    GLODAP_basin_era <- GLODAP %>%
      filter(basin == i_basin, era == i_era)
    
    for (i_gamma_slab in unique(GLODAP_basin_era$gamma_slab)) {
      #i_gamma_slab <- unique(GLODAP_basin_era$gamma_slab)[1]
      print(i_gamma_slab)
      
      GLODAP_basin_era_slab <- GLODAP_basin_era %>%
        filter(gamma_slab == i_gamma_slab)
      
      # number of observations used for each fitting model
      i_nr_obs = nrow(GLODAP_basin_era_slab)
      
      for (i_predictors in unique(lm_all$predictors)) {
        #i_predictors <- unique(lm_all$predictors)[100]
        
        # extract one model definition
        i_lm <- lm_all %>%
          filter(predictors == i_predictors) %>%
          select(lm_coeff) %>%
          pull()
        
        # extract number of predictors
        i_n_predictors <- lm_all %>%
          filter(predictors == i_predictors) %>%
          select(n) %>%
          pull()
        
        if (i_nr_obs > i_n_predictors) {
          # fit model
          if (params_local$MLR_type == "rlm") {
            i_lm_fit <- MASS::rlm(as.formula(i_lm),
                                  data = GLODAP_basin_era_slab)
          }
          
          if (params_local$MLR_type == "lm") {
            i_lm_fit <- lm(as.formula(i_lm),
                           data = GLODAP_basin_era_slab)
          }
          
          # find max predictor correlation
          i_cor_max <- GLODAP_basin_era_slab %>%
            select(!!!syms(str_split(i_predictors, " ",
                                     simplify = TRUE))) %>%
            correlate(quiet = TRUE) %>%
            select(-term) %>%
            abs() %>%
            max(na.rm = TRUE)
          
          # calculate root mean squared error
          i_rmse <- sqrt(c(crossprod(i_lm_fit$residuals)) /
                           length(i_lm_fit$residuals))
          
          # calculate maximum residual
          i_resid_max <- max(abs(i_lm_fit$residuals))
          
          # calculate Akaike information criterion aic
          i_aic <- AIC(i_lm_fit)
          
          # calculate max VIF
          if (is.na(max(i_lm_fit$coefficients))){
            i_vif_max <- as.double("NA")
          } else{
          i_vif_max <- max(vif(i_lm_fit))
          }
          
          # collect model coefficients and diagnostics
          coefficients <- tidy(i_lm_fit)
          
          coefficients <- coefficients %>%
            mutate(
              basin = i_basin,
              era = i_era,
              gamma_slab = i_gamma_slab,
              model = i_lm,
              nr_obs = i_nr_obs,
              rmse = i_rmse,
              aic = i_aic,
              vif_max = i_vif_max,
              resid_max = i_resid_max,
              n_predictors = i_n_predictors,
              na_predictor = anyNA(coefficients$estimate),
              cor_max = i_cor_max
            )
          
          if (exists("lm_all_fitted")) {
            lm_all_fitted <- bind_rows(lm_all_fitted, coefficients)
          }
          
          if (!exists("lm_all_fitted")) {
            lm_all_fitted <- coefficients
          }
        }
      }
    }
  }
}

rm(
  i_lm_fit,
  coefficients,
  i_rmse,
  GLODAP_basin_era,
  GLODAP_basin_era_slab,
  i_lm,
  i_basin,
  i_era,
  i_gamma_slab,
  i_nr_obs,
  i_predictors,
  i_aic,
  i_vif_max,
  i_n_predictors,
  i_resid_max
)

5 Prepare coeffcients

Coefficients are prepared for the mapping of Cant and the chosen target variable.

5.1 Formatting

# select relevant columns
lm_all_fitted <- lm_all_fitted %>%
  select(
    basin,
    gamma_slab,
    era,
    model,
    nr_obs,
    n_predictors,
    term,
    estimate,
    rmse,
    aic,
    vif_max,
    resid_max,
    na_predictor,
    cor_max
  )

# set coefficient to zero if not fitted (=NA)
lm_all_fitted <- lm_all_fitted %>%
  mutate(estimate = if_else(is.na(estimate), 0, estimate))

# Prepare model coefficients for mapping of target variable
lm_all_fitted_wide <- lm_all_fitted %>%
  pivot_wider(
    values_from = estimate,
    names_from = term,
    names_prefix = "coeff_",
    values_fill = 0
  )

5.2 Predictor selection

Within each basin and slab, the following number of best linear regression models was selected:

  • 5

The criterion used to select the best models was:

  • rmse

The criterion was summed up for two adjacent eras, and the models with lowest summed values were selected.

Please note, that currently the lm() function produces NAs for some predictors. It is not yet entirely clear when this happens, but presumably it is caused by some form of collinearity between predictors, such that including another predictor does not help to explain the target variable any better. The issues also expresses as exactly identical rmse values of different models. As an interim solution, models with fitted NA predictors were not included.

# remove models with predictors fitted as NA
lm_all_fitted_wide <- lm_all_fitted_wide %>%
  filter(na_predictor == FALSE)

5.3 VIF threshold

To avoid multicollinearity among predictors, models were excluded with a VIF above:

  • 10

After removing models affected by multicollinearity, the targeted number of MLRs (5) was undercut in following fitting units:

# remove models with predictors fitted as NA
lm_all_fitted_wide <- lm_all_fitted_wide %>%
  filter(vif_max <= params_local$vif_max)

lm_all_fitted_wide_check <- lm_all_fitted_wide %>%
  group_by(era, basin, gamma_slab) %>% 
  count() %>% 
  filter(n < params_local$MLR_number)
# calculate RMSE sum for adjacent eras
lm_all_fitted_wide_eras <- lm_all_fitted_wide %>%
  select(basin, gamma_slab, n_predictors, model, era, nr_obs, rmse, aic, resid_max) %>%
  arrange(era) %>%
  group_by(basin, gamma_slab, model) %>%
  mutate(
    eras = paste(lag(era), era, sep = " --> "),
    rmse_sum = rmse + lag(rmse),
    aic_sum = aic + lag(aic)
  ) %>%
  ungroup() %>%
  select(-c(era)) %>%
  drop_na() %>%
  filter(eras != "1982-1999 --> 2010-2019")

# subset models with lowest summed criterion
# chose which criterion is applied

if (params_local$MLR_criterion == "aic") {
  lm_best <- lm_all_fitted_wide_eras %>%
    group_by(basin, gamma_slab, eras) %>%
    slice_min(order_by = aic_sum,
              with_ties = FALSE,
              n = params_local$MLR_number) %>%
    ungroup() %>%
    arrange(basin, gamma_slab, eras, model)
} else {
  lm_best <- lm_all_fitted_wide_eras %>%
    group_by(basin, gamma_slab, eras) %>%
    slice_min(order_by = rmse_sum,
              with_ties = FALSE,
              n = params_local$MLR_number) %>%
    ungroup() %>%
    arrange(basin, gamma_slab, eras, model)
}

5.4 RMSE tables

5.4.1 per model

lm_best %>%
  kable() %>%
  add_header_above() %>%
  kable_styling() %>%
  scroll_box(width = "100%", height = "400px")
basin gamma_slab n_predictors model nr_obs rmse aic resid_max eras rmse_sum aic_sum
Atlantic (-Inf,26] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 123 1.5240065 466.7092 5.792532 1982-1999 –> 2000-2009 3.2097663 1288.2296
Atlantic (-Inf,26] 4 cstar_tref ~ sal + aou + phosphate + phosphate_star 123 1.0373298 370.0748 4.024648 1982-1999 –> 2000-2009 2.3736782 1092.9686
Atlantic (-Inf,26] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 123 1.0372836 372.0638 4.010956 1982-1999 –> 2000-2009 2.3729762 1096.7534
Atlantic (-Inf,26] 4 cstar_tref ~ temp + aou + phosphate + phosphate_star 123 1.4327537 449.5201 6.532896 1982-1999 –> 2000-2009 3.0950239 1263.2031
Atlantic (-Inf,26] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 123 1.4210216 449.4974 6.176266 1982-1999 –> 2000-2009 3.0825101 1264.9848
Atlantic (-Inf,26] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 107 1.7005398 431.2752 3.940391 2000-2009 –> 2010-2019 3.2245463 897.9844
Atlantic (-Inf,26] 4 cstar_tref ~ sal + aou + phosphate + phosphate_star 107 1.2078500 356.0650 3.540525 2000-2009 –> 2010-2019 2.2451798 726.1398
Atlantic (-Inf,26] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 107 1.1371667 345.1604 3.199051 2000-2009 –> 2010-2019 2.1744503 717.2242
Atlantic (-Inf,26] 4 cstar_tref ~ temp + aou + phosphate + phosphate_star 107 1.5675559 411.8496 6.238842 2000-2009 –> 2010-2019 3.0003097 861.3697
Atlantic (-Inf,26] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 107 1.5143272 406.4567 5.594427 2000-2009 –> 2010-2019 2.9353488 855.9541
Atlantic (26,26.5] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 821 3.5428368 4420.9085 13.548854 1982-1999 –> 2000-2009 6.9895818 12536.8334
Atlantic (26,26.5] 4 cstar_tref ~ temp + aou + nitrate + phosphate_star 821 4.2213467 4706.6303 10.492143 1982-1999 –> 2000-2009 8.3797598 13393.0501
Atlantic (26,26.5] 4 cstar_tref ~ temp + aou + nitrate + silicate 821 4.0407192 4634.8231 12.280404 1982-1999 –> 2000-2009 8.1250955 13266.4512
Atlantic (26,26.5] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 821 4.0303362 4632.5984 12.844322 1982-1999 –> 2000-2009 8.1119922 13264.1944
Atlantic (26,26.5] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 821 4.3237117 4747.9726 13.117377 1982-1999 –> 2000-2009 8.5588110 13492.1258
Atlantic (26,26.5] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 792 3.6009407 4291.0117 11.213529 2000-2009 –> 2010-2019 7.1437775 8711.9202
Atlantic (26,26.5] 4 cstar_tref ~ temp + aou + nitrate + phosphate_star 792 4.1089738 4498.0652 12.117890 2000-2009 –> 2010-2019 8.3303206 9204.6955
Atlantic (26,26.5] 4 cstar_tref ~ temp + aou + nitrate + silicate 792 3.9365388 4430.1568 16.234623 2000-2009 –> 2010-2019 7.9772580 9064.9799
Atlantic (26,26.5] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 792 3.9176304 4424.5300 17.941081 2000-2009 –> 2010-2019 7.9479666 9057.1284
Atlantic (26,26.5] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 792 4.2186716 4541.7988 11.511898 2000-2009 –> 2010-2019 8.5423833 9289.7714
Atlantic (26.5,26.75] 4 cstar_tref ~ aou + silicate + phosphate + phosphate_star 1062 3.1882859 5488.5682 10.210495 1982-1999 –> 2000-2009 6.2868994 15174.8634
Atlantic (26.5,26.75] 4 cstar_tref ~ sal + aou + silicate + phosphate 1062 3.2166884 5507.4059 10.023866 1982-1999 –> 2000-2009 6.3636365 15252.4259
Atlantic (26.5,26.75] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 1062 3.1279799 5450.0083 10.324034 1982-1999 –> 2000-2009 6.1871300 15089.6734
Atlantic (26.5,26.75] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 1062 3.2040904 5501.0710 9.921703 1982-1999 –> 2000-2009 6.3488333 15245.4316
Atlantic (26.5,26.75] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 1062 3.0706532 5410.7205 9.342972 1982-1999 –> 2000-2009 6.0536869 14954.7906
Atlantic (26.5,26.75] 4 cstar_tref ~ aou + silicate + phosphate + phosphate_star 991 3.6068677 5366.9245 11.544208 2000-2009 –> 2010-2019 6.7951536 10855.4927
Atlantic (26.5,26.75] 4 cstar_tref ~ sal + aou + silicate + phosphate 991 3.5344503 5326.7257 11.170343 2000-2009 –> 2010-2019 6.7511387 10834.1316
Atlantic (26.5,26.75] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 991 3.5094388 5314.6502 11.405243 2000-2009 –> 2010-2019 6.6374187 10764.6585
Atlantic (26.5,26.75] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 991 3.5232375 5322.4280 9.360483 2000-2009 –> 2010-2019 6.7273279 10823.4990
Atlantic (26.5,26.75] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 991 3.4937733 5305.7831 10.866053 2000-2009 –> 2010-2019 6.5644265 10716.5036
Atlantic (26.75,27] 4 cstar_tref ~ aou + silicate + phosphate + phosphate_star 1823 2.0659770 7830.9993 14.424827 1982-1999 –> 2000-2009 3.7385144 19984.0002
Atlantic (26.75,27] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 1823 1.9766315 7671.8129 13.781569 1982-1999 –> 2000-2009 3.6296205 19752.9816
Atlantic (26.75,27] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 1823 2.1758816 8021.9740 15.627762 1982-1999 –> 2000-2009 3.9715478 20623.0696
Atlantic (26.75,27] 4 cstar_tref ~ temp + aou + silicate + phosphate 1823 2.1683983 8007.4129 14.911858 1982-1999 –> 2000-2009 3.9559898 20578.2054
Atlantic (26.75,27] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 1823 2.0641208 7829.7220 15.633375 1982-1999 –> 2000-2009 3.5775700 19357.0333
Atlantic (26.75,27] 4 cstar_tref ~ aou + silicate + phosphate + phosphate_star 1838 2.4862011 8575.9566 27.327135 2000-2009 –> 2010-2019 4.5521781 16406.9559
Atlantic (26.75,27] 4 cstar_tref ~ sal + aou + silicate + phosphate 1838 2.4303333 8492.4104 24.551490 2000-2009 –> 2010-2019 4.6134986 16524.5690
Atlantic (26.75,27] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 1838 2.3752932 8410.2024 25.710403 2000-2009 –> 2010-2019 4.3519247 16082.0153
Atlantic (26.75,27] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 1838 2.5326589 8646.0134 23.132709 2000-2009 –> 2010-2019 4.7085405 16667.9874
Atlantic (26.75,27] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 1838 2.1210877 7994.1091 22.432680 2000-2009 –> 2010-2019 4.1852085 15823.8311
Atlantic (27,27.25] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 1559 2.0648690 6699.0086 9.366593 1982-1999 –> 2000-2009 4.2991504 18320.7741
Atlantic (27,27.25] 4 cstar_tref ~ sal + aou + silicate + phosphate 1559 1.8793477 6403.4736 8.998018 1982-1999 –> 2000-2009 3.5957228 16646.1713
Atlantic (27,27.25] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 1559 1.8550315 6364.8678 9.477884 1982-1999 –> 2000-2009 3.4250171 16144.0336
Atlantic (27,27.25] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 1559 2.0141946 6621.5344 13.514345 1982-1999 –> 2000-2009 3.6907733 16743.7273
Atlantic (27,27.25] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 1559 2.2857653 7015.9038 13.732662 1982-1999 –> 2000-2009 4.3621875 18255.0358
Atlantic (27,27.25] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 1614 2.2004347 7140.1116 11.848841 2000-2009 –> 2010-2019 4.2653036 13839.1202
Atlantic (27,27.25] 4 cstar_tref ~ sal + aou + silicate + phosphate 1614 2.1987074 7135.5768 13.608209 2000-2009 –> 2010-2019 4.0780550 13539.0504
Atlantic (27,27.25] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 1614 2.1986925 7137.5549 13.623827 2000-2009 –> 2010-2019 4.0537240 13502.4226
Atlantic (27,27.25] 4 cstar_tref ~ sal + aou + silicate + phosphate_star 1614 2.2884650 7264.7344 14.940040 2000-2009 –> 2010-2019 4.3937238 14022.1437
Atlantic (27,27.25] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 1614 2.4203307 7447.5763 19.130223 2000-2009 –> 2010-2019 4.4345253 14069.1107
Atlantic (27.25,27.5] 4 cstar_tref ~ sal + aou + nitrate + silicate 1594 2.5274961 7491.5825 13.329173 1982-1999 –> 2000-2009 5.1440003 21207.3388
Atlantic (27.25,27.5] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 1594 2.4527680 7397.9044 12.750566 1982-1999 –> 2000-2009 4.9877365 20933.4378
Atlantic (27.25,27.5] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 1594 2.6239029 7612.9213 20.990014 1982-1999 –> 2000-2009 4.7909510 20245.8255
Atlantic (27.25,27.5] 4 cstar_tref ~ temp + aou + nitrate + silicate 1594 2.3114030 7206.6568 11.878827 1982-1999 –> 2000-2009 4.0314825 18507.9516
Atlantic (27.25,27.5] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 1594 2.1906270 7037.5667 15.334826 1982-1999 –> 2000-2009 3.9065256 18326.8539
Atlantic (27.25,27.5] 4 cstar_tref ~ aou + nitrate + silicate + phosphate_star 1540 2.9151600 7677.6988 21.564785 2000-2009 –> 2010-2019 5.6783520 15453.5151
Atlantic (27.25,27.5] 4 cstar_tref ~ sal + aou + nitrate + silicate 1540 2.8583983 7617.1359 15.682935 2000-2009 –> 2010-2019 5.3858945 15108.7185
Atlantic (27.25,27.5] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 1540 2.6885411 7430.4467 16.633928 2000-2009 –> 2010-2019 5.1413090 14828.3510
Atlantic (27.25,27.5] 4 cstar_tref ~ temp + aou + nitrate + silicate 1540 2.9918179 7757.6448 11.502937 2000-2009 –> 2010-2019 5.3032209 14964.3016
Atlantic (27.25,27.5] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 1540 2.6851756 7426.5888 16.530589 2000-2009 –> 2010-2019 4.8758026 14464.1555
Atlantic (27.5,27.75] 3 cstar_tref ~ sal + aou + phosphate 2189 2.7630085 10671.5623 13.627639 1982-1999 –> 2000-2009 5.2380583 28046.1489
Atlantic (27.5,27.75] 4 cstar_tref ~ sal + aou + phosphate + phosphate_star 2189 2.7460553 10646.6173 14.063628 1982-1999 –> 2000-2009 5.0119232 27363.7595
Atlantic (27.5,27.75] 4 cstar_tref ~ sal + aou + silicate + phosphate 2189 2.4548909 10155.9174 13.710462 1982-1999 –> 2000-2009 4.8220758 27199.7366
Atlantic (27.5,27.75] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 2189 2.3972116 10053.8255 14.482314 1982-1999 –> 2000-2009 4.4977795 26207.2660
Atlantic (27.5,27.75] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 2189 3.0818356 11153.6630 16.024744 1982-1999 –> 2000-2009 5.4679965 28259.1094
Atlantic (27.5,27.75] 4 cstar_tref ~ sal + aou + nitrate + silicate 2130 3.1434667 10935.7679 16.326333 2000-2009 –> 2010-2019 5.9542673 21684.4096
Atlantic (27.5,27.75] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 2130 3.1219045 10908.4463 15.116511 2000-2009 –> 2010-2019 5.9291071 21653.4804
Atlantic (27.5,27.75] 4 cstar_tref ~ sal + aou + phosphate + phosphate_star 2130 3.2314900 11053.4168 13.926101 2000-2009 –> 2010-2019 5.9775454 21700.0341
Atlantic (27.5,27.75] 4 cstar_tref ~ sal + aou + silicate + phosphate 2130 2.7306643 10336.0394 14.849561 2000-2009 –> 2010-2019 5.1855552 20491.9568
Atlantic (27.5,27.75] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 2130 2.7161747 10315.3747 14.691108 2000-2009 –> 2010-2019 5.1133863 20369.2002
Atlantic (27.75,27.85] 4 cstar_tref ~ sal + aou + nitrate + silicate 779 1.9280831 3245.5742 13.299770 1982-1999 –> 2000-2009 3.9327313 8839.6091
Atlantic (27.75,27.85] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 779 1.8683724 3198.5617 14.178370 1982-1999 –> 2000-2009 3.8200201 8723.8587
Atlantic (27.75,27.85] 4 cstar_tref ~ sal + aou + phosphate + phosphate_star 779 1.9435752 3258.0426 12.440824 1982-1999 –> 2000-2009 3.6268721 8390.8318
Atlantic (27.75,27.85] 4 cstar_tref ~ sal + aou + silicate + phosphate 779 1.7415675 3087.0622 12.268139 1982-1999 –> 2000-2009 3.5502448 8409.5128
Atlantic (27.75,27.85] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 779 1.5517635 2909.2790 12.833744 1982-1999 –> 2000-2009 3.1488085 7905.2060
Atlantic (27.75,27.85] 4 cstar_tref ~ sal + aou + nitrate + silicate 770 1.9755641 3245.6805 12.614626 2000-2009 –> 2010-2019 3.9036472 6491.2546
Atlantic (27.75,27.85] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 770 1.9630247 3237.8745 12.971739 2000-2009 –> 2010-2019 3.8313971 6436.4362
Atlantic (27.75,27.85] 4 cstar_tref ~ sal + aou + phosphate + phosphate_star 770 2.3063256 3484.0750 11.468815 2000-2009 –> 2010-2019 4.2499008 6742.1176
Atlantic (27.75,27.85] 4 cstar_tref ~ sal + aou + silicate + phosphate 770 1.7941642 3097.3558 11.679683 2000-2009 –> 2010-2019 3.5357317 6184.4180
Atlantic (27.75,27.85] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 770 1.6743257 2992.8976 12.064362 2000-2009 –> 2010-2019 3.2260893 5902.1766
Atlantic (27.85,27.95] 4 cstar_tref ~ aou + silicate + phosphate + phosphate_star 738 3.2074758 3826.6080 32.807267 1982-1999 –> 2000-2009 6.0850738 10454.1981
Atlantic (27.85,27.95] 4 cstar_tref ~ sal + aou + phosphate + phosphate_star 738 3.1856526 3816.5312 26.631992 1982-1999 –> 2000-2009 5.9156598 10303.4360
Atlantic (27.85,27.95] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 738 3.1780149 3814.9882 25.036548 1982-1999 –> 2000-2009 5.9078930 10303.7666
Atlantic (27.85,27.95] 4 cstar_tref ~ temp + aou + phosphate + phosphate_star 738 2.8358734 3644.8618 21.642649 1982-1999 –> 2000-2009 5.7526791 10308.6123
Atlantic (27.85,27.95] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 738 2.8294063 3643.4920 21.495006 1982-1999 –> 2000-2009 5.6936617 10260.6639
Atlantic (27.85,27.95] 4 cstar_tref ~ aou + silicate + phosphate + phosphate_star 814 3.7304758 4465.3522 24.906494 2000-2009 –> 2010-2019 6.9379515 8291.9602
Atlantic (27.85,27.95] 4 cstar_tref ~ sal + aou + phosphate + phosphate_star 814 3.3630474 4296.5477 31.974580 2000-2009 –> 2010-2019 6.5487000 8113.0790
Atlantic (27.85,27.95] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 814 3.2920626 4263.8172 30.727354 2000-2009 –> 2010-2019 6.4700774 8078.8054
Atlantic (27.85,27.95] 4 cstar_tref ~ temp + aou + phosphate + phosphate_star 814 3.6638256 4436.0027 23.510018 2000-2009 –> 2010-2019 6.4996991 8080.8646
Atlantic (27.85,27.95] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 814 3.6356054 4425.4147 24.695960 2000-2009 –> 2010-2019 6.4650117 8068.9067
Atlantic (27.95,28.05] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 924 4.5997587 5456.2535 25.306310 1982-1999 –> 2000-2009 9.3450356 15446.1016
Atlantic (27.95,28.05] 4 cstar_tref ~ temp + aou + nitrate + phosphate_star 924 4.1774111 5276.2687 22.544495 1982-1999 –> 2000-2009 8.2081408 14717.0624
Atlantic (27.95,28.05] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 924 4.0129472 5204.0423 24.166708 1982-1999 –> 2000-2009 7.5447565 14203.9124
Atlantic (27.95,28.05] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 924 4.5656850 5442.5131 21.761088 1982-1999 –> 2000-2009 9.4200540 15508.5499
Atlantic (27.95,28.05] 4 cstar_tref ~ temp + aou + silicate + phosphate_star 924 4.6283831 5465.7180 24.458248 1982-1999 –> 2000-2009 9.5055515 15545.4612
Atlantic (27.95,28.05] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 946 4.3077764 5461.7498 24.652729 2000-2009 –> 2010-2019 8.9075351 10918.0034
Atlantic (27.95,28.05] 4 cstar_tref ~ temp + aou + nitrate + phosphate_star 946 3.8194584 5232.1172 22.689551 2000-2009 –> 2010-2019 7.9968695 10508.3859
Atlantic (27.95,28.05] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 946 3.4174477 5023.6991 27.294519 2000-2009 –> 2010-2019 7.4303949 10227.7415
Atlantic (27.95,28.05] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 946 4.4121453 5507.0428 23.110838 2000-2009 –> 2010-2019 8.9778303 10949.5559
Atlantic (27.95,28.05] 4 cstar_tref ~ temp + aou + silicate + phosphate_star 946 4.4135150 5505.6300 23.554547 2000-2009 –> 2010-2019 9.0418981 10971.3481
Atlantic (28.05,28.1] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 622 1.1111728 1910.2970 5.439451 1982-1999 –> 2000-2009 2.1032357 4960.7040
Atlantic (28.05,28.1] 4 cstar_tref ~ sal + aou + phosphate + phosphate_star 622 1.0511382 1839.2023 7.028897 1982-1999 –> 2000-2009 1.9440276 4660.9523
Atlantic (28.05,28.1] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 622 1.0115009 1793.3850 5.997384 1982-1999 –> 2000-2009 1.9038566 4615.8484
Atlantic (28.05,28.1] 4 cstar_tref ~ temp + aou + phosphate + phosphate_star 622 1.1270534 1925.9502 10.615931 1982-1999 –> 2000-2009 2.0678624 4860.2013
Atlantic (28.05,28.1] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 622 1.0763763 1870.7181 11.424966 1982-1999 –> 2000-2009 1.9156532 4561.2119
Atlantic (28.05,28.1] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 616 1.1554767 1940.1723 7.746593 2000-2009 –> 2010-2019 2.2666495 3850.4693
Atlantic (28.05,28.1] 4 cstar_tref ~ sal + aou + phosphate + phosphate_star 616 1.0817571 1856.9511 9.421522 2000-2009 –> 2010-2019 2.1328954 3696.1534
Atlantic (28.05,28.1] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 616 1.0470929 1818.8260 8.314273 2000-2009 –> 2010-2019 2.0585938 3612.2110
Atlantic (28.05,28.1] 4 cstar_tref ~ temp + aou + phosphate + phosphate_star 616 1.0809810 1856.0668 12.969134 2000-2009 –> 2010-2019 2.2080344 3782.0170
Atlantic (28.05,28.1] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 616 1.0205420 1787.1836 13.783299 2000-2009 –> 2010-2019 2.0969183 3657.9017
Atlantic (28.1,28.15] 4 cstar_tref ~ aou + silicate + phosphate + phosphate_star 732 0.8840969 1908.9778 9.336422 1982-1999 –> 2000-2009 1.5690055 4615.7918
Atlantic (28.1,28.15] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 732 0.8538858 1860.0758 5.944301 1982-1999 –> 2000-2009 1.5621820 4655.8538
Atlantic (28.1,28.15] 4 cstar_tref ~ sal + aou + phosphate + phosphate_star 732 0.7812247 1727.8755 5.455119 1982-1999 –> 2000-2009 1.4531001 4384.9287
Atlantic (28.1,28.15] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 732 0.7664085 1701.8434 5.326021 1982-1999 –> 2000-2009 1.3958613 4191.9721
Atlantic (28.1,28.15] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 732 0.8104758 1783.6902 9.303686 1982-1999 –> 2000-2009 1.3992656 4100.8539
Atlantic (28.1,28.15] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 701 0.8977980 1852.2019 7.564217 2000-2009 –> 2010-2019 1.7516838 3712.2777
Atlantic (28.1,28.15] 4 cstar_tref ~ sal + aou + phosphate + phosphate_star 701 0.8144621 1713.6231 6.686258 2000-2009 –> 2010-2019 1.5956869 3441.4986
Atlantic (28.1,28.15] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 701 0.8130228 1713.1432 6.684612 2000-2009 –> 2010-2019 1.5794312 3414.9866
Atlantic (28.1,28.15] 4 cstar_tref ~ temp + aou + phosphate + phosphate_star 701 0.8818581 1825.0866 11.583354 2000-2009 –> 2010-2019 1.7630005 3729.1638
Atlantic (28.1,28.15] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 701 0.7962737 1683.9590 12.056547 2000-2009 –> 2010-2019 1.6067495 3467.6492
Atlantic (28.15,28.2] 4 cstar_tref ~ aou + nitrate + silicate + phosphate_star 1187 0.5549691 1982.6472 2.427554 1982-1999 –> 2000-2009 1.1504757 6000.4972
Atlantic (28.15,28.2] 4 cstar_tref ~ sal + aou + nitrate + phosphate_star 1187 0.5876393 2118.4421 1.963947 1982-1999 –> 2000-2009 1.1203757 5640.8484
Atlantic (28.15,28.2] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 1187 0.5399010 1919.2989 2.036715 1982-1999 –> 2000-2009 1.0575998 5316.3450
Atlantic (28.15,28.2] 4 cstar_tref ~ temp + aou + nitrate + silicate 1187 0.5585849 1998.0645 2.157303 1982-1999 –> 2000-2009 1.1092358 5667.5850
Atlantic (28.15,28.2] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 1187 0.5473605 1951.8747 2.270904 1982-1999 –> 2000-2009 1.0974097 5618.5321
Atlantic (28.15,28.2] 4 cstar_tref ~ sal + aou + nitrate + phosphate_star 1172 0.7148953 2551.3005 5.206240 2000-2009 –> 2010-2019 1.3025346 4669.7426
Atlantic (28.15,28.2] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 1172 0.7068049 2526.6226 5.901941 2000-2009 –> 2010-2019 1.2467059 4445.9215
Atlantic (28.15,28.2] 4 cstar_tref ~ temp + aou + nitrate + phosphate_star 1172 0.8305419 2902.7654 9.393502 2000-2009 –> 2010-2019 1.4181573 5021.1105
Atlantic (28.15,28.2] 4 cstar_tref ~ temp + aou + nitrate + silicate 1172 0.8195622 2871.5710 10.062730 2000-2009 –> 2010-2019 1.3781471 4869.6355
Atlantic (28.15,28.2] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 1172 0.8195561 2873.5538 10.081143 2000-2009 –> 2010-2019 1.3669167 4825.4285
Atlantic (28.2, Inf] 3 cstar_tref ~ sal + aou + nitrate 2098 0.3555091 1624.3440 1.926868 1982-1999 –> 2000-2009 0.6617775 3383.3024
Atlantic (28.2, Inf] 4 cstar_tref ~ sal + aou + nitrate + phosphate_star 2098 0.3507038 1569.2412 1.905473 1982-1999 –> 2000-2009 0.6526544 3224.8185
Atlantic (28.2, Inf] 4 cstar_tref ~ sal + aou + nitrate + silicate 2098 0.3551745 1622.3937 1.926116 1982-1999 –> 2000-2009 0.6599620 3347.3749
Atlantic (28.2, Inf] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 2098 0.3431791 1480.2329 1.865403 1982-1999 –> 2000-2009 0.6422665 3067.0946
Atlantic (28.2, Inf] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 2098 0.5136568 3172.4908 3.082698 1982-1999 –> 2000-2009 0.9726629 7938.4021
Atlantic (28.2, Inf] 3 cstar_tref ~ sal + aou + nitrate 2152 0.4030415 2205.9993 2.393416 2000-2009 –> 2010-2019 0.7585506 3830.3433
Atlantic (28.2, Inf] 4 cstar_tref ~ sal + aou + nitrate + phosphate_star 2152 0.3892246 2057.8628 2.334603 2000-2009 –> 2010-2019 0.7399284 3627.1040
Atlantic (28.2, Inf] 4 cstar_tref ~ sal + aou + nitrate + silicate 2152 0.3982608 2156.6413 2.382638 2000-2009 –> 2010-2019 0.7534353 3779.0350
Atlantic (28.2, Inf] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 2152 0.3815918 1974.6210 2.527483 2000-2009 –> 2010-2019 0.7247709 3454.8539
Atlantic (28.2, Inf] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 2152 0.6728378 4415.6474 9.771754 2000-2009 –> 2010-2019 1.1864946 7588.1382
Indo-Pacific (-Inf,26] 4 cstar_tref ~ sal + aou + phosphate + phosphate_star 4068 6.2543379 26472.0117 30.183795 1982-1999 –> 2000-2009 12.7838792 73889.8410
Indo-Pacific (-Inf,26] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 4068 6.2120635 26418.8320 29.738900 1982-1999 –> 2000-2009 12.6909147 73726.5445
Indo-Pacific (-Inf,26] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 4068 7.1874512 27605.4146 31.717771 1982-1999 –> 2000-2009 14.7158082 77072.9492
Indo-Pacific (-Inf,26] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 4068 7.2871451 27717.4900 29.383995 1982-1999 –> 2000-2009 14.8713248 77291.3029
Indo-Pacific (-Inf,26] 4 cstar_tref ~ temp + silicate + phosphate + phosphate_star 4068 7.3926659 27832.4576 28.698337 1982-1999 –> 2000-2009 15.1069689 77649.0008
Indo-Pacific (-Inf,26] 4 cstar_tref ~ sal + aou + phosphate + phosphate_star 4036 6.0300164 25969.0357 24.745097 2000-2009 –> 2010-2019 12.2843543 52441.0473
Indo-Pacific (-Inf,26] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 4036 5.9649172 25883.4176 24.031741 2000-2009 –> 2010-2019 12.1769807 52302.2496
Indo-Pacific (-Inf,26] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 4036 7.0481900 27230.4381 25.743215 2000-2009 –> 2010-2019 14.2356412 54835.8527
Indo-Pacific (-Inf,26] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 4036 7.1067899 27297.2727 25.276230 2000-2009 –> 2010-2019 14.3939350 55014.7626
Indo-Pacific (-Inf,26] 4 cstar_tref ~ temp + silicate + phosphate + phosphate_star 4036 7.2224238 27425.5544 24.309044 2000-2009 –> 2010-2019 14.6150897 55258.0120
Indo-Pacific (26,26.5] 4 cstar_tref ~ aou + silicate + phosphate + phosphate_star 4229 4.8160239 25308.9240 41.202833 1982-1999 –> 2000-2009 9.4632081 70901.9289
Indo-Pacific (26,26.5] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 4229 4.4636654 24668.2986 44.432429 1982-1999 –> 2000-2009 8.7100381 68872.1153
Indo-Pacific (26,26.5] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 4229 4.6694437 25049.4980 49.056615 1982-1999 –> 2000-2009 9.0810856 69842.2307
Indo-Pacific (26,26.5] 4 cstar_tref ~ temp + aou + silicate + phosphate 4229 4.8254214 25325.4119 39.450835 1982-1999 –> 2000-2009 9.4451817 70827.1277
Indo-Pacific (26,26.5] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 4229 4.8096413 25299.7074 40.660310 1982-1999 –> 2000-2009 9.4293104 70803.1183
Indo-Pacific (26,26.5] 4 cstar_tref ~ aou + silicate + phosphate + phosphate_star 4214 4.9067156 25376.4313 41.844781 2000-2009 –> 2010-2019 9.7227396 50685.3553
Indo-Pacific (26,26.5] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 4214 4.5543122 24750.2900 44.713879 2000-2009 –> 2010-2019 9.0179775 49418.5885
Indo-Pacific (26,26.5] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 4214 4.7170670 25046.2198 47.449192 2000-2009 –> 2010-2019 9.3865107 50095.7177
Indo-Pacific (26,26.5] 4 cstar_tref ~ temp + aou + silicate + phosphate 4214 4.8943137 25355.1022 40.652137 2000-2009 –> 2010-2019 9.7197351 50680.5141
Indo-Pacific (26,26.5] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 4214 4.8908804 25351.1879 41.133450 2000-2009 –> 2010-2019 9.7005217 50650.8953
Indo-Pacific (26.5,26.75] 4 cstar_tref ~ aou + silicate + phosphate + phosphate_star 3529 4.0081816 19825.7554 21.344088 1982-1999 –> 2000-2009 7.9572490 54955.2040
Indo-Pacific (26.5,26.75] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 3529 3.9057203 19644.9853 19.477812 1982-1999 –> 2000-2009 7.6631149 54150.7321
Indo-Pacific (26.5,26.75] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 3529 3.9818186 19781.1795 32.892070 1982-1999 –> 2000-2009 7.9726983 55045.0815
Indo-Pacific (26.5,26.75] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 3529 3.9261530 19681.8129 19.620117 1982-1999 –> 2000-2009 7.8033451 54582.2623
Indo-Pacific (26.5,26.75] 4 cstar_tref ~ temp + nitrate + silicate + phosphate_star 3529 3.9818199 19779.1819 32.902133 1982-1999 –> 2000-2009 8.0433505 55261.7700
Indo-Pacific (26.5,26.75] 4 cstar_tref ~ aou + silicate + phosphate + phosphate_star 3462 4.3108347 19953.6053 24.872787 2000-2009 –> 2010-2019 8.3190163 39779.3607
Indo-Pacific (26.5,26.75] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 3462 4.1730388 19730.6649 25.147334 2000-2009 –> 2010-2019 8.0787591 39375.6502
Indo-Pacific (26.5,26.75] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 3462 4.2447747 19848.6793 32.236894 2000-2009 –> 2010-2019 8.2265933 39629.8589
Indo-Pacific (26.5,26.75] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 3462 4.1748258 19733.6293 23.080937 2000-2009 –> 2010-2019 8.1009788 39415.4422
Indo-Pacific (26.5,26.75] 4 cstar_tref ~ temp + nitrate + silicate + phosphate_star 3462 4.2482634 19852.3676 33.629797 2000-2009 –> 2010-2019 8.2300833 39631.5495
Indo-Pacific (26.75,27] 4 cstar_tref ~ aou + silicate + phosphate + phosphate_star 4017 4.4876777 23473.4805 18.556175 1982-1999 –> 2000-2009 8.4846619 65726.5379
Indo-Pacific (26.75,27] 4 cstar_tref ~ sal + aou + phosphate + phosphate_star 4017 4.2724631 23078.6506 21.763079 1982-1999 –> 2000-2009 7.9602701 64119.0945
Indo-Pacific (26.75,27] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 4017 4.2553571 23048.4198 20.824445 1982-1999 –> 2000-2009 7.9292548 64033.9468
Indo-Pacific (26.75,27] 4 cstar_tref ~ temp + aou + phosphate + phosphate_star 4017 4.1775858 22898.2313 22.992091 1982-1999 –> 2000-2009 7.8577816 63907.5565
Indo-Pacific (26.75,27] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 4017 4.1420159 22831.5333 21.346253 1982-1999 –> 2000-2009 7.7944796 63728.9293
Indo-Pacific (26.75,27] 4 cstar_tref ~ aou + silicate + phosphate + phosphate_star 4205 4.8177507 25168.3762 18.710717 2000-2009 –> 2010-2019 9.3054284 48641.8566
Indo-Pacific (26.75,27] 4 cstar_tref ~ sal + aou + phosphate + phosphate_star 4205 4.5888051 24758.9144 20.740957 2000-2009 –> 2010-2019 8.8612682 47837.5650
Indo-Pacific (26.75,27] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 4205 4.5761631 24737.7133 19.887036 2000-2009 –> 2010-2019 8.8315203 47786.1330
Indo-Pacific (26.75,27] 4 cstar_tref ~ temp + aou + phosphate + phosphate_star 4205 4.4888244 24573.6520 23.022818 2000-2009 –> 2010-2019 8.6664102 47471.8834
Indo-Pacific (26.75,27] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 4205 4.4625670 24526.3133 21.572068 2000-2009 –> 2010-2019 8.6045830 47357.8466
Indo-Pacific (27,27.25] 4 cstar_tref ~ aou + silicate + phosphate + phosphate_star 5080 4.3593864 29387.3016 38.709974 1982-1999 –> 2000-2009 8.0105068 77366.0537
Indo-Pacific (27,27.25] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 5080 4.2999639 29249.8588 40.839339 1982-1999 –> 2000-2009 7.8656988 76812.3751
Indo-Pacific (27,27.25] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 5080 4.0799080 28716.1318 50.111785 1982-1999 –> 2000-2009 7.4465610 75263.2572
Indo-Pacific (27,27.25] 4 cstar_tref ~ temp + aou + phosphate + phosphate_star 5080 4.2762965 29191.7828 43.472924 1982-1999 –> 2000-2009 7.8843652 76960.8955
Indo-Pacific (27,27.25] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 5080 3.8887413 28228.5645 28.959201 1982-1999 –> 2000-2009 7.1915720 74437.4241
Indo-Pacific (27,27.25] 4 cstar_tref ~ aou + silicate + phosphate + phosphate_star 4856 4.9960537 29415.9236 32.118568 2000-2009 –> 2010-2019 9.3554401 58803.2253
Indo-Pacific (27,27.25] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 4856 4.9583633 29344.3782 34.171998 2000-2009 –> 2010-2019 9.2583272 58594.2370
Indo-Pacific (27,27.25] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 4856 4.8015633 29032.2914 37.525132 2000-2009 –> 2010-2019 8.8814713 57748.4232
Indo-Pacific (27,27.25] 4 cstar_tref ~ temp + aou + phosphate + phosphate_star 4856 4.9799171 29384.5045 40.500297 2000-2009 –> 2010-2019 9.2562136 58576.2873
Indo-Pacific (27,27.25] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 4856 4.3662850 28109.3696 26.056968 2000-2009 –> 2010-2019 8.2550263 56337.9341
Indo-Pacific (27.25,27.5] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 4470 3.4019672 23645.0339 32.108393 1982-1999 –> 2000-2009 6.3233528 62976.9235
Indo-Pacific (27.25,27.5] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 4470 3.6583191 24294.5244 32.075781 1982-1999 –> 2000-2009 6.7287947 64412.0534
Indo-Pacific (27.25,27.5] 4 cstar_tref ~ sal + aou + silicate + phosphate_star 4470 3.6741264 24331.0700 31.405290 1982-1999 –> 2000-2009 6.7452567 64449.9650
Indo-Pacific (27.25,27.5] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 4470 3.5947082 24137.7082 32.852311 1982-1999 –> 2000-2009 6.6781970 64321.9917
Indo-Pacific (27.25,27.5] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 4470 3.3062995 23390.0270 33.165974 1982-1999 –> 2000-2009 6.2305929 62737.6192
Indo-Pacific (27.25,27.5] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 4504 3.8140363 24854.7001 30.783245 2000-2009 –> 2010-2019 7.2160035 48499.7340
Indo-Pacific (27.25,27.5] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 4504 4.1272586 25565.6600 31.996313 2000-2009 –> 2010-2019 7.7855778 49860.1844
Indo-Pacific (27.25,27.5] 4 cstar_tref ~ sal + aou + silicate + phosphate_star 4504 4.1630159 25641.3662 30.405172 2000-2009 –> 2010-2019 7.8371422 49972.4362
Indo-Pacific (27.25,27.5] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 4504 4.0820648 25466.4775 30.620419 2000-2009 –> 2010-2019 7.6767730 49604.1857
Indo-Pacific (27.25,27.5] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 4504 3.7002625 24581.8995 32.621905 2000-2009 –> 2010-2019 7.0065620 47971.9265
Indo-Pacific (27.5,27.75] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 4498 3.1606333 23131.1197 23.034111 1982-1999 –> 2000-2009 5.4745944 59745.6683
Indo-Pacific (27.5,27.75] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 4498 3.1217590 23019.7870 9.533753 1982-1999 –> 2000-2009 5.4653163 59840.3513
Indo-Pacific (27.5,27.75] 4 cstar_tref ~ sal + aou + silicate + phosphate_star 4498 3.2598479 23407.1692 21.545886 1982-1999 –> 2000-2009 5.6214408 60350.0047
Indo-Pacific (27.5,27.75] 4 cstar_tref ~ sal + nitrate + silicate + phosphate_star 4498 3.3155298 23559.5334 28.342757 1982-1999 –> 2000-2009 5.7006321 60662.9402
Indo-Pacific (27.5,27.75] 4 cstar_tref ~ sal + silicate + phosphate + phosphate_star 4498 3.3151122 23558.4003 24.409495 1982-1999 –> 2000-2009 5.6923345 60608.1629
Indo-Pacific (27.5,27.75] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 4442 3.8394394 24571.7294 26.123588 2000-2009 –> 2010-2019 7.0000727 47702.8491
Indo-Pacific (27.5,27.75] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 4442 3.7122834 24272.5232 10.437560 2000-2009 –> 2010-2019 6.8340423 47292.3102
Indo-Pacific (27.5,27.75] 4 cstar_tref ~ sal + aou + silicate + phosphate_star 4442 3.9974673 24928.0621 24.472685 2000-2009 –> 2010-2019 7.2573152 48335.2313
Indo-Pacific (27.5,27.75] 4 cstar_tref ~ sal + nitrate + silicate + phosphate_star 4442 4.0095639 24954.9051 31.975915 2000-2009 –> 2010-2019 7.3250937 48514.4385
Indo-Pacific (27.5,27.75] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 4442 3.9175879 24750.7398 19.561048 2000-2009 –> 2010-2019 7.1804782 48168.3011
Indo-Pacific (27.75,27.85] 4 cstar_tref ~ aou + silicate + phosphate + phosphate_star 1730 2.7179751 8381.1368 19.481765 1982-1999 –> 2000-2009 4.6498640 21402.0459
Indo-Pacific (27.75,27.85] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 1730 2.7175373 8382.5795 19.621909 1982-1999 –> 2000-2009 4.6392611 21372.4525
Indo-Pacific (27.75,27.85] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 1730 2.7189556 8384.3848 19.533390 1982-1999 –> 2000-2009 4.6553732 21421.9559
Indo-Pacific (27.75,27.85] 4 cstar_tref ~ temp + aou + silicate + phosphate 1730 2.7274941 8393.2335 19.112523 1982-1999 –> 2000-2009 4.6727817 21457.4227
Indo-Pacific (27.75,27.85] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 1730 2.6311961 8270.8646 19.372096 1982-1999 –> 2000-2009 4.5387783 21214.4866
Indo-Pacific (27.75,27.85] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 1851 2.9837109 9313.8177 30.614565 2000-2009 –> 2010-2019 5.7020863 17697.4640
Indo-Pacific (27.75,27.85] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 1851 3.0123528 9349.1852 30.142298 2000-2009 –> 2010-2019 5.7298901 17731.7647
Indo-Pacific (27.75,27.85] 4 cstar_tref ~ sal + nitrate + silicate + phosphate_star 1851 2.9968978 9328.1430 28.185677 2000-2009 –> 2010-2019 5.7180086 17713.2694
Indo-Pacific (27.75,27.85] 4 cstar_tref ~ temp + aou + phosphate + phosphate_star 1851 2.9638075 9287.0400 31.214195 2000-2009 –> 2010-2019 5.7013663 17693.0177
Indo-Pacific (27.75,27.85] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 1851 2.9099823 9221.1906 28.356597 2000-2009 –> 2010-2019 5.5411784 17492.0552
Indo-Pacific (27.85,27.95] 4 cstar_tref ~ temp + aou + nitrate + phosphate_star 2180 2.8358808 10743.2292 25.065064 1982-1999 –> 2000-2009 4.9572737 28166.7410
Indo-Pacific (27.85,27.95] 4 cstar_tref ~ temp + aou + nitrate + silicate 2180 2.8355818 10742.7695 24.935370 1982-1999 –> 2000-2009 5.0112238 28368.7936
Indo-Pacific (27.85,27.95] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 2180 2.8295985 10735.5599 24.650947 1982-1999 –> 2000-2009 4.9502721 28158.3516
Indo-Pacific (27.85,27.95] 3 cstar_tref ~ temp + nitrate + phosphate_star 2180 2.8901875 10823.9332 30.191826 1982-1999 –> 2000-2009 5.0126698 28249.5622
Indo-Pacific (27.85,27.95] 4 cstar_tref ~ temp + nitrate + silicate + phosphate_star 2180 2.8786524 10808.4972 29.328935 1982-1999 –> 2000-2009 5.0005297 28233.8397
Indo-Pacific (27.85,27.95] 3 cstar_tref ~ temp + aou + nitrate 2269 3.0003090 11435.1129 35.472079 2000-2009 –> 2010-2019 5.8408556 22183.5098
Indo-Pacific (27.85,27.95] 4 cstar_tref ~ temp + aou + nitrate + phosphate_star 2269 2.9944811 11428.2897 35.598032 2000-2009 –> 2010-2019 5.8303619 22171.5190
Indo-Pacific (27.85,27.95] 4 cstar_tref ~ temp + aou + nitrate + silicate 2269 2.9896350 11420.9396 35.083206 2000-2009 –> 2010-2019 5.8252167 22163.7091
Indo-Pacific (27.85,27.95] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 2269 2.9844652 11415.0856 35.213894 2000-2009 –> 2010-2019 5.8140637 22150.6455
Indo-Pacific (27.85,27.95] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 2269 2.9278627 11328.1925 39.841020 2000-2009 –> 2010-2019 5.8534840 22209.2546
Indo-Pacific (27.95,28.05] 4 cstar_tref ~ aou + silicate + phosphate + phosphate_star 1874 2.2254226 8328.3824 8.213484 1982-1999 –> 2000-2009 4.1475864 23025.3381
Indo-Pacific (27.95,28.05] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 1874 2.1764819 8247.0378 8.008203 1982-1999 –> 2000-2009 4.1478609 23125.1403
Indo-Pacific (27.95,28.05] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 1874 2.1853867 8262.3409 8.414958 1982-1999 –> 2000-2009 4.0761054 22844.4168
Indo-Pacific (27.95,28.05] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 1874 2.2254763 8330.4729 8.016438 1982-1999 –> 2000-2009 4.1604742 23076.5839
Indo-Pacific (27.95,28.05] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 1874 2.1612514 8220.7181 7.893376 1982-1999 –> 2000-2009 4.0369110 22746.1298
Indo-Pacific (27.95,28.05] 4 cstar_tref ~ sal + aou + nitrate + phosphate_star 1947 2.3580969 8877.8336 8.240477 2000-2009 –> 2010-2019 4.5565937 17160.5916
Indo-Pacific (27.95,28.05] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 1947 2.3523310 8870.3005 8.333592 2000-2009 –> 2010-2019 4.5288129 17117.3383
Indo-Pacific (27.95,28.05] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 1947 2.4177604 8977.1320 8.454745 2000-2009 –> 2010-2019 4.6031470 17239.4730
Indo-Pacific (27.95,28.05] 4 cstar_tref ~ temp + aou + phosphate + phosphate_star 1947 2.4146387 8970.1010 9.079886 2000-2009 –> 2010-2019 4.6472170 17310.5156
Indo-Pacific (27.95,28.05] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 1947 2.3763489 8909.8577 8.844696 2000-2009 –> 2010-2019 4.5376004 17130.5758
Indo-Pacific (28.05,28.1] 4 cstar_tref ~ aou + silicate + phosphate + phosphate_star 1324 1.8912175 5456.7099 9.677383 1982-1999 –> 2000-2009 3.5907844 15425.7957
Indo-Pacific (28.05,28.1] 4 cstar_tref ~ sal + aou + silicate + phosphate 1324 1.9580254 5548.6371 8.723442 1982-1999 –> 2000-2009 3.5785948 15274.6030
Indo-Pacific (28.05,28.1] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 1324 1.8544164 5406.6747 9.352571 1982-1999 –> 2000-2009 3.4508616 15058.0298
Indo-Pacific (28.05,28.1] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 1324 1.8686285 5426.8914 10.096758 1982-1999 –> 2000-2009 3.4780984 15119.7516
Indo-Pacific (28.05,28.1] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 1324 1.8163894 5351.8098 9.232290 1982-1999 –> 2000-2009 3.4429985 15098.7772
Indo-Pacific (28.05,28.1] 4 cstar_tref ~ aou + silicate + phosphate + phosphate_star 1360 2.0343454 5803.1864 9.914816 2000-2009 –> 2010-2019 3.9255629 11259.8963
Indo-Pacific (28.05,28.1] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 1360 1.9697576 5717.4293 9.651852 2000-2009 –> 2010-2019 3.8241740 11124.1040
Indo-Pacific (28.05,28.1] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 1360 2.0098226 5772.1991 10.482006 2000-2009 –> 2010-2019 3.8784511 11199.0906
Indo-Pacific (28.05,28.1] 4 cstar_tref ~ temp + aou + silicate + phosphate 1360 2.0462753 5819.0905 9.961593 2000-2009 –> 2010-2019 3.9470222 11289.1096
Indo-Pacific (28.05,28.1] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 1360 1.9324371 5665.3997 9.085089 2000-2009 –> 2010-2019 3.7488265 11017.2096
Indo-Pacific (28.1, Inf] 4 cstar_tref ~ sal + aou + silicate + phosphate 11224 1.4107353 39588.9379 13.634963 1982-1999 –> 2000-2009 2.6875359 107247.1839
Indo-Pacific (28.1, Inf] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 11224 1.3189963 38081.5340 15.971439 1982-1999 –> 2000-2009 2.4901327 102228.5883
Indo-Pacific (28.1, Inf] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 11224 1.3473166 38558.4163 12.863312 1982-1999 –> 2000-2009 2.4731726 101101.8134
Indo-Pacific (28.1, Inf] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 11224 1.3775899 39057.2243 16.750313 1982-1999 –> 2000-2009 2.6176135 105528.8068
Indo-Pacific (28.1, Inf] 4 cstar_tref ~ temp + nitrate + silicate + phosphate_star 11224 1.5452447 41633.3035 17.240082 1982-1999 –> 2000-2009 2.8745135 110929.3978
Indo-Pacific (28.1, Inf] 5 cstar_tref ~ sal + aou + nitrate + silicate + phosphate_star 11207 1.6174645 42596.0805 9.110699 2000-2009 –> 2010-2019 3.1177042 83567.8791
Indo-Pacific (28.1, Inf] 4 cstar_tref ~ sal + aou + silicate + phosphate 11207 1.5480882 41611.4714 10.763945 2000-2009 –> 2010-2019 2.9588235 81200.4093
Indo-Pacific (28.1, Inf] 5 cstar_tref ~ sal + aou + silicate + phosphate + phosphate_star 11207 1.4639299 40360.6136 12.963230 2000-2009 –> 2010-2019 2.7829262 78442.1476
Indo-Pacific (28.1, Inf] 5 cstar_tref ~ temp + aou + nitrate + silicate + phosphate_star 11207 1.5392831 41485.6222 11.209534 2000-2009 –> 2010-2019 2.8865997 80044.0386
Indo-Pacific (28.1, Inf] 5 cstar_tref ~ temp + aou + silicate + phosphate + phosphate_star 11207 1.5203069 41207.5868 14.075793 2000-2009 –> 2010-2019 2.8978968 80264.8111

5.4.2 per fitting unit

lm_best %>%
  select(-n_predictors) %>%
  group_by(basin, gamma_slab, eras) %>% 
  summarise(rmse_sum_mean = mean(rmse_sum),
            ais_sum_mean = mean(aic_sum)) %>% 
  ungroup() %>% 
  kable() %>%
  add_header_above() %>%
  kable_styling() %>%
  scroll_box(width = "100%", height = "400px")
basin gamma_slab eras rmse_sum_mean ais_sum_mean
Atlantic (-Inf,26] 1982-1999 –> 2000-2009 2.8267909 1201.2279
Atlantic (-Inf,26] 2000-2009 –> 2010-2019 2.7159670 811.7344
Atlantic (26,26.5] 1982-1999 –> 2000-2009 8.0330480 13190.5310
Atlantic (26,26.5] 2000-2009 –> 2010-2019 7.9883412 9065.6991
Atlantic (26.5,26.75] 1982-1999 –> 2000-2009 6.2480372 15143.4370
Atlantic (26.5,26.75] 2000-2009 –> 2010-2019 6.6950931 10798.8571
Atlantic (26.75,27] 1982-1999 –> 2000-2009 3.7746485 20059.0580
Atlantic (26.75,27] 2000-2009 –> 2010-2019 4.4822701 16301.0718
Atlantic (27,27.25] 1982-1999 –> 2000-2009 3.8745702 17221.9484
Atlantic (27,27.25] 2000-2009 –> 2010-2019 4.2450663 13794.3695
Atlantic (27.25,27.5] 1982-1999 –> 2000-2009 4.5721392 19844.2815
Atlantic (27.25,27.5] 2000-2009 –> 2010-2019 5.2769158 14963.8083
Atlantic (27.5,27.75] 1982-1999 –> 2000-2009 5.0075667 27415.2041
Atlantic (27.5,27.75] 2000-2009 –> 2010-2019 5.6319723 21179.8162
Atlantic (27.75,27.85] 1982-1999 –> 2000-2009 3.6157354 8453.8037
Atlantic (27.75,27.85] 2000-2009 –> 2010-2019 3.7493532 6351.2806
Atlantic (27.85,27.95] 1982-1999 –> 2000-2009 5.8709935 10326.1354
Atlantic (27.85,27.95] 2000-2009 –> 2010-2019 6.5842880 8126.7232
Atlantic (27.95,28.05] 1982-1999 –> 2000-2009 8.8047077 15084.2175
Atlantic (27.95,28.05] 2000-2009 –> 2010-2019 8.4709056 10715.0069
Atlantic (28.05,28.1] 1982-1999 –> 2000-2009 1.9869271 4731.7836
Atlantic (28.05,28.1] 2000-2009 –> 2010-2019 2.1526183 3719.7505
Atlantic (28.1,28.15] 1982-1999 –> 2000-2009 1.4758829 4389.8801
Atlantic (28.1,28.15] 2000-2009 –> 2010-2019 1.6593104 3553.1152
Atlantic (28.15,28.2] 1982-1999 –> 2000-2009 1.1070194 5648.7615
Atlantic (28.15,28.2] 2000-2009 –> 2010-2019 1.3424923 4766.3677
Atlantic (28.2, Inf] 1982-1999 –> 2000-2009 0.7178646 4192.1985
Atlantic (28.2, Inf] 2000-2009 –> 2010-2019 0.8326360 4455.8949
Indo-Pacific (-Inf,26] 1982-1999 –> 2000-2009 14.0337792 75925.9277
Indo-Pacific (-Inf,26] 2000-2009 –> 2010-2019 13.5412002 53970.3849
Indo-Pacific (26,26.5] 1982-1999 –> 2000-2009 9.2257648 70249.3042
Indo-Pacific (26,26.5] 2000-2009 –> 2010-2019 9.5094969 50306.2142
Indo-Pacific (26.5,26.75] 1982-1999 –> 2000-2009 7.8879515 54799.0100
Indo-Pacific (26.5,26.75] 2000-2009 –> 2010-2019 8.1910862 39566.3723
Indo-Pacific (26.75,27] 1982-1999 –> 2000-2009 8.0052896 64303.2130
Indo-Pacific (26.75,27] 2000-2009 –> 2010-2019 8.8538420 47819.0569
Indo-Pacific (27,27.25] 1982-1999 –> 2000-2009 7.6797408 76168.0011
Indo-Pacific (27,27.25] 2000-2009 –> 2010-2019 9.0012957 58012.0214
Indo-Pacific (27.25,27.5] 1982-1999 –> 2000-2009 6.5412388 63779.7105
Indo-Pacific (27.25,27.5] 2000-2009 –> 2010-2019 7.5044117 49181.6934
Indo-Pacific (27.5,27.75] 1982-1999 –> 2000-2009 5.5908636 60241.4255
Indo-Pacific (27.5,27.75] 2000-2009 –> 2010-2019 7.1194004 48002.6261
Indo-Pacific (27.75,27.85] 1982-1999 –> 2000-2009 4.6312117 21373.6727
Indo-Pacific (27.75,27.85] 2000-2009 –> 2010-2019 5.6785059 17665.5142
Indo-Pacific (27.85,27.95] 1982-1999 –> 2000-2009 4.9863938 28235.4576
Indo-Pacific (27.85,27.95] 2000-2009 –> 2010-2019 5.8327964 22175.7276
Indo-Pacific (27.95,28.05] 1982-1999 –> 2000-2009 4.1137876 22963.5218
Indo-Pacific (27.95,28.05] 2000-2009 –> 2010-2019 4.5746742 17191.6989
Indo-Pacific (28.05,28.1] 1982-1999 –> 2000-2009 3.5082675 15195.3915
Indo-Pacific (28.05,28.1] 2000-2009 –> 2010-2019 3.8648073 11177.8820
Indo-Pacific (28.1, Inf] 1982-1999 –> 2000-2009 2.6285936 105407.1580
Indo-Pacific (28.1, Inf] 2000-2009 –> 2010-2019 2.9287901 80703.8571

5.5 Target variable coefficients

A data frame to map the target variable is prepared.

# create table with two era belonging to one eras
eras_forward <- lm_all_fitted_wide %>%
  arrange(era) %>% 
  group_by(basin, gamma_slab, model) %>% 
  mutate(eras = paste(era, lead(era), sep = " --> ")) %>% 
  ungroup() %>% 
  select(era, eras) %>% 
  unique()

eras_backward <- lm_all_fitted_wide %>%
  arrange(era) %>% 
  group_by(basin, gamma_slab, model) %>% 
  mutate(eras = paste(lag(era), era, sep = " --> ")) %>% 
  ungroup() %>% 
  select(era, eras) %>% 
  unique()

eras_era <- full_join(eras_backward, eras_forward) %>% 
  filter(str_detect(eras, "NA") == FALSE)

# extend best model selection from eras to era
lm_best_target <- full_join(
  lm_best %>% select(basin, gamma_slab, model, eras),
  eras_era)

lm_best_target <- left_join(lm_best_target, lm_all_fitted_wide)

rm(eras_era, eras_forward, eras_backward,
   lm_all_fitted)

5.6 Plot selected model residuals

# plot model diagnostics, if activated
if (params_local$plot_all_figures == "y") {
  # mutate predictors column
  lm_best_plot <- lm_best_target %>%
    select(basin, gamma_slab, model, eras, era) %>%
    mutate(
      predictors = str_remove(model, paste(params_local$MLR_target, "~ ")),
      predictors = str_replace_all(predictors, "\\+ ", "")
    )
  
  # loop across all basins, era, gamma slabs, and MLRs
  # fit all MLR models
  for (i_basin in unique(GLODAP$basin)) {
    for (i_era in unique(GLODAP$era)) {
      #i_basin <- unique(GLODAP$basin)[1]
      #i_era   <- unique(GLODAP$era)[2]
      print(i_basin)
      print(i_era)
      
      GLODAP_basin_era <- GLODAP %>%
        filter(basin == i_basin, era == i_era)
      
      for (i_gamma_slab in unique(GLODAP_basin_era$gamma_slab)) {
        #i_gamma_slab <- unique(GLODAP_basin_era$gamma_slab)[1]
        print(i_gamma_slab)
        
        GLODAP_basin_era_slab <- GLODAP_basin_era %>%
          filter(gamma_slab == i_gamma_slab)
        
        lm_best_basin_era_slab <- lm_best_plot %>%
          filter(basin == i_basin, era == i_era, gamma_slab == i_gamma_slab)
        
        for (i_eras in unique(lm_best_basin_era_slab$eras)) {
          #i_eras <- unique(lm_best_basin_era_slab$eras)[1]
          print(i_eras)
          
          lm_best_basin_era_slab_eras <- lm_best_basin_era_slab %>%
            filter(eras == i_eras)
          
          for (i_predictors in unique(lm_best_basin_era_slab_eras$predictors)) {
            #i_predictors <- unique(lm_best_basin_era_slab$predictors)[1]
            print(i_predictors)
            # extract one model definition
            i_lm <- lm_all %>%
              filter(predictors == i_predictors) %>%
              select(lm_coeff) %>%
              pull()
            
             # fit model
          if (params_local$MLR_type == "rlm") {
            i_lm_fit <- MASS::rlm(as.formula(i_lm),
                                  data = GLODAP_basin_era_slab)
          }
          
          if (params_local$MLR_type == "lm") {
            i_lm_fit <- lm(as.formula(i_lm),
                           data = GLODAP_basin_era_slab)
          }
            
            # plot model diagnostics vs predictors
            
            p_model_predictors <- ggnostic(
              i_lm_fit,
              columnsY = c(params_local$MLR_target, ".fitted", ".resid"),
              title = paste(
                "era:",
                i_era,
                "| eras:",
                i_eras,
                "| basin:",
                i_basin,
                "| gamma slab:",
                i_gamma_slab,
                "| predictors:",
                i_predictors
              )
            )
            
            ggsave(
              plot = p_model_predictors,
              path = paste(path_version_figures, "eMLR_diagnostics/", sep = ""),
              filename = paste(
                "MLR_residuals",
                i_era,
                i_eras,
                i_basin,
                i_gamma_slab,
                i_predictors,
                "predictors.png",
                sep = "_"
              ),
              width = 14,
              height = 8
            )

            rm(p_model_predictors)
            
            
            # plot model diagnostics vs location
            
            GLODAP_basin_era_slab <- GLODAP_basin_era_slab %>%
              mutate(fitted = i_lm_fit$fitted.values,
                     residuals = i_lm_fit$residuals)
            
            GLODAP_basin_era_slab_long <- GLODAP_basin_era_slab %>% 
              pivot_longer(cols = c(params_local$MLR_target , fitted, residuals),
                           names_to = "estimate",
                           values_to = "value"
              ) %>% 
              pivot_longer(cols = c(lat, lon, depth),
                           names_to = "coordinate_type",
                           values_to = "coordinate_value"
              )

             p_model_coordinate <- GLODAP_basin_era_slab_long %>%
              ggplot(aes(coordinate_value, value)) +
              geom_bin2d() +
              scale_fill_viridis_c() +
              labs(
                title = paste(
                  "era:",
                  i_era,
                  "| eras:",
                  i_eras,
                  "| basin:",
                  i_basin,
                  "| gamma slab:",
                  i_gamma_slab,
                  "| predictors:",
                  i_predictors
                )
              ) +
              facet_grid(estimate~coordinate_type,
                         scales = "free")

            ggsave(
              plot = p_model_coordinate,
              path = paste(path_version_figures, "eMLR_diagnostics", sep = ""),
              filename = paste(
                "Location_MLR_residuals",
                i_era,
                i_eras,
                i_basin,
                i_gamma_slab,
                i_predictors,
                "predictors.png",
                sep = "_"
              ),
              width = 14,
              height = 8
            )

            rm(p_model_coordinate)
            
          }
          
        }
        
      }
    }
  }
  
  rm(
    lm_best_plot,
    lm_best_basin_era_slab,
    i_rmse,
    GLODAP_basin_era,
    GLODAP_basin_era_slab,
    i_lm,
    lm_all_fitted,
    i_basin,
    i_era,
    i_gamma_slab,
    i_predictors,
    lm_all,
    i_aic,
    i_n_predictors,
    i_resid_max
  )
  
}

Individual residual plots of the MLR models for each basin, era, eras and neutral density (gamma) slab are available at:

/nfs/kryo/work/jenmueller/emlr_cant/model/v_XXX/figures/eMLR_diagnostics/

5.7 Cant coeffcients

A data frame of coefficient offsets is prepared to facilitate the direct mapping of Cant.

# pivot long format
lm_best_long <- lm_best_target %>%
  pivot_longer(cols = starts_with("coeff_"),
               names_to = "term",
               values_to = "estimate",
               names_prefix = "coeff_")

# subtract coefficients of adjacent era
lm_best_long <- lm_best_long %>%
  arrange(era) %>%
  group_by(basin, gamma_slab, eras, model, term) %>%
  mutate(delta_coeff = estimate - lag(estimate)) %>%
  ungroup() %>%
  arrange(basin, gamma_slab, model, term, eras) %>%
  drop_na() %>%
  select(-c(era,estimate))

# pivot back to wide format
lm_best_cant <- lm_best_long %>%
  pivot_wider(values_from = delta_coeff,
              names_from = term,
              names_prefix = "delta_coeff_",
              values_fill = 0)

5.8 Write files

lm_best_target %>%
  select(
    basin,
    gamma_slab,
    model,
    eras,
    era,
    starts_with("coeff_")
  ) %>%
  write_csv(paste(path_version_data,
                  "lm_best_target.csv",
                  sep = ""))

lm_best_cant %>%
  select(
    basin,
    gamma_slab,
    model,
    eras,
    starts_with("delta_coeff_")
  ) %>%
  write_csv(paste(path_version_data,
                  "lm_best_cant.csv",
                  sep = ""))

lm_best %>%
  write_csv(paste(path_version_data,
                  "lm_best.csv",
                  sep = ""))

6 Model diagnotics

6.1 Selection criterion vs predictors

The selection criterion (rmse) was plotted against the number of predictors (limited to 2 - 7).

6.1.1 All models

lm_all_fitted_wide %>%
  ggplot(aes(as.factor(n_predictors),
             !!sym(params_local$MLR_criterion),
             col = basin)) +
  geom_hline(yintercept = 10) +
  geom_boxplot() +
  facet_grid(gamma_slab~era) +
  scale_color_brewer(palette = "Set1") +
  labs(x="Number of predictors")

Version Author Date
3061a0b Donghe-Zhu 2021-03-27
b883157 Donghe-Zhu 2021-03-27
d19654d Donghe-Zhu 2021-03-26
6c53dbf Donghe-Zhu 2021-03-25
1914a11 Donghe-Zhu 2021-03-24
8be810e Donghe-Zhu 2021-03-23
bf19764 Donghe-Zhu 2021-03-22
3ec9d3d Donghe-Zhu 2021-03-22
134ace1 Donghe-Zhu 2021-03-22
f6d70a4 Donghe-Zhu 2021-03-22
183443b Donghe-Zhu 2021-03-21
2e6976b Donghe-Zhu 2021-03-21
51a42bd Donghe-Zhu 2021-03-16
f745381 Donghe-Zhu 2021-03-16
aecbf75 Donghe-Zhu 2021-03-14
1b2a0c2 Donghe-Zhu 2021-03-14
6733e48 Donghe-Zhu 2021-03-12
ba71e6a Donghe-Zhu 2021-03-12
9dbf5bd Donghe-Zhu 2021-03-11
a49df30 Donghe-Zhu 2021-03-11
b3348a5 Donghe-Zhu 2021-03-11
1c24ff7 Donghe-Zhu 2021-03-10
94ce5a8 Donghe-Zhu 2021-03-10
db33928 Donghe-Zhu 2021-03-10
3d1f470 Donghe-Zhu 2021-03-10
9b7bc66 Donghe-Zhu 2021-03-10
4168b43 Donghe-Zhu 2021-03-10
5365f80 Donghe-Zhu 2021-03-10
2b6c392 Donghe-Zhu 2021-03-10
9f58753 Donghe-Zhu 2021-03-10
9d5a62c Donghe-Zhu 2021-03-10
5d1e70b Donghe-Zhu 2021-03-10
2093979 Donghe-Zhu 2021-03-10
b865899 Donghe-Zhu 2021-03-10
cc2a956 Donghe-Zhu 2021-03-10
60689fb Donghe-Zhu 2021-03-10
dba33c8 Donghe-Zhu 2021-03-09
17f1c4a Donghe-Zhu 2021-03-09
c024d1a Donghe-Zhu 2021-03-09
02f7242 Donghe-Zhu 2021-03-09
6f50bc6 Donghe-Zhu 2021-03-09
1691156 Donghe-Zhu 2021-03-08
c0ceaf8 Donghe-Zhu 2021-03-08
058e0a1 Donghe-Zhu 2021-03-08
112dea0 Donghe-Zhu 2021-03-08
1843412 Donghe-Zhu 2021-03-08
3fbbfa4 Donghe-Zhu 2021-03-07
627c8fb Donghe-Zhu 2021-03-07
9ef3222 Donghe-Zhu 2021-03-05
8c1e978 Donghe-Zhu 2021-03-05
865f68c Donghe-Zhu 2021-03-05
ee69bc1 Donghe-Zhu 2021-03-05
a79291f Donghe-Zhu 2021-03-05
e8c6f30 Donghe-Zhu 2021-03-04
59288fe Donghe-Zhu 2021-03-04
731abc8 Donghe-Zhu 2021-03-04
e2a5a33 Donghe-Zhu 2021-03-04
c7892c1 Donghe-Zhu 2021-03-04
924430b Donghe-Zhu 2021-03-03
0d0bca1 Donghe-Zhu 2021-03-03
cb63c16 Donghe-Zhu 2021-03-03
ffda45a Donghe-Zhu 2021-03-03
691ba81 Donghe-Zhu 2021-03-03
c5e45a2 Donghe-Zhu 2021-03-03
89c3e58 Donghe-Zhu 2021-03-03
c911669 Donghe-Zhu 2021-03-03
b71c719 Donghe-Zhu 2021-03-01
13666ca Donghe-Zhu 2021-03-01
c6e60fe Donghe-Zhu 2021-03-01
7a388f7 Donghe-Zhu 2021-03-01
799e913 Donghe-Zhu 2021-03-01
66ff99f Donghe-Zhu 2021-03-01
ac9bb7a Donghe-Zhu 2021-02-28
efdc047 Donghe-Zhu 2021-02-28
e9a7418 Donghe-Zhu 2021-02-28
e152917 Donghe-Zhu 2021-02-28
287123c Donghe-Zhu 2021-02-27
54d5b5b Donghe-Zhu 2021-02-27
330f064 Donghe-Zhu 2021-02-27
adbc9bc Donghe-Zhu 2021-02-27
5937141 Donghe-Zhu 2021-02-27
4414bbf Donghe-Zhu 2021-02-27
a265efb Donghe-Zhu 2021-02-27
19edd1e Donghe-Zhu 2021-02-27
f20483f Donghe-Zhu 2021-02-26
6a2c7b3 Donghe-Zhu 2021-02-25
02b976d Donghe-Zhu 2021-02-24
354c224 Donghe-Zhu 2021-02-24
1a0a88a Donghe-Zhu 2021-02-24
57f701e Donghe-Zhu 2021-02-24
06f3149 Donghe-Zhu 2021-02-16
401eab3 Donghe-Zhu 2021-02-15
e3bba84 Donghe-Zhu 2021-02-15
5dce4b1 Donghe-Zhu 2021-02-15
4469a0c Donghe-Zhu 2021-02-13
5ae6a69 Donghe-Zhu 2021-02-10
05385dc Donghe-Zhu 2021-02-10
f791ae4 Donghe-Zhu 2021-02-09
f71ae34 Donghe-Zhu 2021-02-09
c011832 Donghe-Zhu 2021-02-09
a145fa7 Donghe-Zhu 2021-02-09
c344e42 Donghe-Zhu 2021-02-08
2f095d7 Donghe-Zhu 2021-02-07
1fad5f1 Donghe-Zhu 2021-02-07
ca03c39 Donghe-Zhu 2021-02-07
cd7c52c Donghe-Zhu 2021-02-04
bcf84f4 Donghe-Zhu 2021-02-02
a518739 Donghe-Zhu 2021-02-01
61666de Donghe-Zhu 2021-01-31
865b582 Donghe-Zhu 2021-01-31
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
59e006e Donghe-Zhu 2021-01-31
a1c8f87 Donghe-Zhu 2021-01-31
ae5c18f Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
442010d Donghe-Zhu 2021-01-29
372adf5 Donghe-Zhu 2021-01-29
af8788e Donghe-Zhu 2021-01-29
21c91c9 Donghe-Zhu 2021-01-29
eded038 Donghe-Zhu 2021-01-29
541d4dd Donghe-Zhu 2021-01-29
6a75576 Donghe-Zhu 2021-01-28
16fba40 Donghe-Zhu 2021-01-28
12bc567 Donghe-Zhu 2021-01-27
ceed31b Donghe-Zhu 2021-01-27
342402d Donghe-Zhu 2021-01-27
5bad5c2 Donghe-Zhu 2021-01-27
61efb56 Donghe-Zhu 2021-01-25
48f638e Donghe-Zhu 2021-01-25
c1cec47 Donghe-Zhu 2021-01-25
05ffb0c Donghe-Zhu 2021-01-25
8b97165 Donghe-Zhu 2021-01-25
c569946 Donghe-Zhu 2021-01-24
a2f0d56 Donghe-Zhu 2021-01-23
28509fc Donghe-Zhu 2021-01-23
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
7891955 Donghe-Zhu 2021-01-21
d4cf1cb Donghe-Zhu 2021-01-21
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
b3564aa jens-daniel-mueller 2021-01-14
8d032c3 jens-daniel-mueller 2021-01-14
17dee1d jens-daniel-mueller 2021-01-13
7cdea0c jens-daniel-mueller 2021-01-06
fa85b93 jens-daniel-mueller 2021-01-06
e5cb81a Donghe-Zhu 2021-01-05
a499f10 Donghe-Zhu 2021-01-05
fb8a752 Donghe-Zhu 2020-12-23
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19

6.1.2 Best models

lm_best_target %>%
  ggplot(aes("",
             !!sym(params_local$MLR_criterion),
             col = basin)) +
  geom_hline(yintercept = 10) +
  geom_boxplot() +
  facet_grid(gamma_slab~era) +
  scale_color_brewer(palette = "Set1") +
  labs(x="Number of predictors pooled")

Version Author Date
3061a0b Donghe-Zhu 2021-03-27
b883157 Donghe-Zhu 2021-03-27
d19654d Donghe-Zhu 2021-03-26
6c53dbf Donghe-Zhu 2021-03-25
1914a11 Donghe-Zhu 2021-03-24
8be810e Donghe-Zhu 2021-03-23
bf19764 Donghe-Zhu 2021-03-22
3ec9d3d Donghe-Zhu 2021-03-22
134ace1 Donghe-Zhu 2021-03-22
f6d70a4 Donghe-Zhu 2021-03-22
183443b Donghe-Zhu 2021-03-21
2e6976b Donghe-Zhu 2021-03-21
51a42bd Donghe-Zhu 2021-03-16
f745381 Donghe-Zhu 2021-03-16
aecbf75 Donghe-Zhu 2021-03-14
1b2a0c2 Donghe-Zhu 2021-03-14
6733e48 Donghe-Zhu 2021-03-12
ba71e6a Donghe-Zhu 2021-03-12
9dbf5bd Donghe-Zhu 2021-03-11
a49df30 Donghe-Zhu 2021-03-11
b3348a5 Donghe-Zhu 2021-03-11
1c24ff7 Donghe-Zhu 2021-03-10
94ce5a8 Donghe-Zhu 2021-03-10
db33928 Donghe-Zhu 2021-03-10
3d1f470 Donghe-Zhu 2021-03-10
9b7bc66 Donghe-Zhu 2021-03-10
4168b43 Donghe-Zhu 2021-03-10
5365f80 Donghe-Zhu 2021-03-10
2b6c392 Donghe-Zhu 2021-03-10
9f58753 Donghe-Zhu 2021-03-10
fd528ed Donghe-Zhu 2021-03-10
9d5a62c Donghe-Zhu 2021-03-10
5d1e70b Donghe-Zhu 2021-03-10
2093979 Donghe-Zhu 2021-03-10
b865899 Donghe-Zhu 2021-03-10
cc2a956 Donghe-Zhu 2021-03-10
60689fb Donghe-Zhu 2021-03-10
dba33c8 Donghe-Zhu 2021-03-09
17f1c4a Donghe-Zhu 2021-03-09
c024d1a Donghe-Zhu 2021-03-09
02f7242 Donghe-Zhu 2021-03-09
6f50bc6 Donghe-Zhu 2021-03-09
1691156 Donghe-Zhu 2021-03-08
c0ceaf8 Donghe-Zhu 2021-03-08
058e0a1 Donghe-Zhu 2021-03-08
112dea0 Donghe-Zhu 2021-03-08
1843412 Donghe-Zhu 2021-03-08
3fbbfa4 Donghe-Zhu 2021-03-07
627c8fb Donghe-Zhu 2021-03-07
9ef3222 Donghe-Zhu 2021-03-05
8c1e978 Donghe-Zhu 2021-03-05
865f68c Donghe-Zhu 2021-03-05
ee69bc1 Donghe-Zhu 2021-03-05
a79291f Donghe-Zhu 2021-03-05
e8c6f30 Donghe-Zhu 2021-03-04
59288fe Donghe-Zhu 2021-03-04
731abc8 Donghe-Zhu 2021-03-04
e2a5a33 Donghe-Zhu 2021-03-04
c7892c1 Donghe-Zhu 2021-03-04
924430b Donghe-Zhu 2021-03-03
0d0bca1 Donghe-Zhu 2021-03-03
cb63c16 Donghe-Zhu 2021-03-03
ffda45a Donghe-Zhu 2021-03-03
691ba81 Donghe-Zhu 2021-03-03
c5e45a2 Donghe-Zhu 2021-03-03
89c3e58 Donghe-Zhu 2021-03-03
c407a50 Donghe-Zhu 2021-03-03
c911669 Donghe-Zhu 2021-03-03
b71c719 Donghe-Zhu 2021-03-01
13666ca Donghe-Zhu 2021-03-01
c6e60fe Donghe-Zhu 2021-03-01
7a388f7 Donghe-Zhu 2021-03-01
799e913 Donghe-Zhu 2021-03-01
66ff99f Donghe-Zhu 2021-03-01
ac9bb7a Donghe-Zhu 2021-02-28
efdc047 Donghe-Zhu 2021-02-28
e9a7418 Donghe-Zhu 2021-02-28
e152917 Donghe-Zhu 2021-02-28
287123c Donghe-Zhu 2021-02-27
54d5b5b Donghe-Zhu 2021-02-27
330f064 Donghe-Zhu 2021-02-27
adbc9bc Donghe-Zhu 2021-02-27
5937141 Donghe-Zhu 2021-02-27
4414bbf Donghe-Zhu 2021-02-27
a265efb Donghe-Zhu 2021-02-27
19edd1e Donghe-Zhu 2021-02-27
f20483f Donghe-Zhu 2021-02-26
6a2c7b3 Donghe-Zhu 2021-02-25
354c224 Donghe-Zhu 2021-02-24
1a0a88a Donghe-Zhu 2021-02-24
57f701e Donghe-Zhu 2021-02-24
06f3149 Donghe-Zhu 2021-02-16
401eab3 Donghe-Zhu 2021-02-15
e3bba84 Donghe-Zhu 2021-02-15
5dce4b1 Donghe-Zhu 2021-02-15
4469a0c Donghe-Zhu 2021-02-13
5ae6a69 Donghe-Zhu 2021-02-10
05385dc Donghe-Zhu 2021-02-10
f791ae4 Donghe-Zhu 2021-02-09
f71ae34 Donghe-Zhu 2021-02-09
c011832 Donghe-Zhu 2021-02-09
a145fa7 Donghe-Zhu 2021-02-09
c344e42 Donghe-Zhu 2021-02-08
2f095d7 Donghe-Zhu 2021-02-07
1fad5f1 Donghe-Zhu 2021-02-07
ca03c39 Donghe-Zhu 2021-02-07
e2ffc14 Donghe-Zhu 2021-02-05
cd7c52c Donghe-Zhu 2021-02-04
bcf84f4 Donghe-Zhu 2021-02-02
a518739 Donghe-Zhu 2021-02-01
61666de Donghe-Zhu 2021-01-31
865b582 Donghe-Zhu 2021-01-31
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
59e006e Donghe-Zhu 2021-01-31
a1c8f87 Donghe-Zhu 2021-01-31
ae5c18f Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
442010d Donghe-Zhu 2021-01-29
372adf5 Donghe-Zhu 2021-01-29
af8788e Donghe-Zhu 2021-01-29
21c91c9 Donghe-Zhu 2021-01-29
eded038 Donghe-Zhu 2021-01-29
541d4dd Donghe-Zhu 2021-01-29
6a75576 Donghe-Zhu 2021-01-28
16fba40 Donghe-Zhu 2021-01-28
12bc567 Donghe-Zhu 2021-01-27
ceed31b Donghe-Zhu 2021-01-27
342402d Donghe-Zhu 2021-01-27
5bad5c2 Donghe-Zhu 2021-01-27
61efb56 Donghe-Zhu 2021-01-25
48f638e Donghe-Zhu 2021-01-25
c1cec47 Donghe-Zhu 2021-01-25
05ffb0c Donghe-Zhu 2021-01-25
8b97165 Donghe-Zhu 2021-01-25
c569946 Donghe-Zhu 2021-01-24
a2f0d56 Donghe-Zhu 2021-01-23
28509fc Donghe-Zhu 2021-01-23
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
7891955 Donghe-Zhu 2021-01-21
d4cf1cb Donghe-Zhu 2021-01-21
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
b3564aa jens-daniel-mueller 2021-01-14
8d032c3 jens-daniel-mueller 2021-01-14
17dee1d jens-daniel-mueller 2021-01-13
7cdea0c jens-daniel-mueller 2021-01-06
fa85b93 jens-daniel-mueller 2021-01-06
e5cb81a Donghe-Zhu 2021-01-05
a499f10 Donghe-Zhu 2021-01-05
fb8a752 Donghe-Zhu 2020-12-23
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19

6.2 RMSE correlation between eras

RMSE was plotted to compare the agreement for one model applied to two adjacent eras (ie check whether the same predictor combination performs equal in both eras).

6.2.1 All models

# find max rmse to scale axis
max_rmse <-
  max(c(lm_all_fitted_wide_eras$rmse,
        lm_all_fitted_wide_eras$rmse_sum - lm_all_fitted_wide_eras$rmse))

lm_all_fitted_wide_eras %>%
  ggplot(aes(rmse, rmse_sum - rmse, col = gamma_slab)) +
  geom_point() +
  scale_color_viridis_d() +
  coord_equal(xlim = c(0,max_rmse),
              ylim = c(0,max_rmse)) +
  facet_grid(eras ~ basin)

Version Author Date
3061a0b Donghe-Zhu 2021-03-27
b883157 Donghe-Zhu 2021-03-27
d19654d Donghe-Zhu 2021-03-26
6c53dbf Donghe-Zhu 2021-03-25
1914a11 Donghe-Zhu 2021-03-24
8be810e Donghe-Zhu 2021-03-23
bf19764 Donghe-Zhu 2021-03-22
3ec9d3d Donghe-Zhu 2021-03-22
134ace1 Donghe-Zhu 2021-03-22
f6d70a4 Donghe-Zhu 2021-03-22
183443b Donghe-Zhu 2021-03-21
2e6976b Donghe-Zhu 2021-03-21
51a42bd Donghe-Zhu 2021-03-16
f745381 Donghe-Zhu 2021-03-16
aecbf75 Donghe-Zhu 2021-03-14
1b2a0c2 Donghe-Zhu 2021-03-14
6733e48 Donghe-Zhu 2021-03-12
ba71e6a Donghe-Zhu 2021-03-12
9dbf5bd Donghe-Zhu 2021-03-11
a49df30 Donghe-Zhu 2021-03-11
b3348a5 Donghe-Zhu 2021-03-11
1c24ff7 Donghe-Zhu 2021-03-10
94ce5a8 Donghe-Zhu 2021-03-10
db33928 Donghe-Zhu 2021-03-10
3d1f470 Donghe-Zhu 2021-03-10
9b7bc66 Donghe-Zhu 2021-03-10
5365f80 Donghe-Zhu 2021-03-10
2b6c392 Donghe-Zhu 2021-03-10
9f58753 Donghe-Zhu 2021-03-10
9d5a62c Donghe-Zhu 2021-03-10
5d1e70b Donghe-Zhu 2021-03-10
2093979 Donghe-Zhu 2021-03-10
b865899 Donghe-Zhu 2021-03-10
cc2a956 Donghe-Zhu 2021-03-10
dba33c8 Donghe-Zhu 2021-03-09
17f1c4a Donghe-Zhu 2021-03-09
c024d1a Donghe-Zhu 2021-03-09
02f7242 Donghe-Zhu 2021-03-09
1691156 Donghe-Zhu 2021-03-08
c0ceaf8 Donghe-Zhu 2021-03-08
058e0a1 Donghe-Zhu 2021-03-08
112dea0 Donghe-Zhu 2021-03-08
1843412 Donghe-Zhu 2021-03-08
3fbbfa4 Donghe-Zhu 2021-03-07
627c8fb Donghe-Zhu 2021-03-07
9ef3222 Donghe-Zhu 2021-03-05
8c1e978 Donghe-Zhu 2021-03-05
865f68c Donghe-Zhu 2021-03-05
ee69bc1 Donghe-Zhu 2021-03-05
a79291f Donghe-Zhu 2021-03-05
e8c6f30 Donghe-Zhu 2021-03-04
59288fe Donghe-Zhu 2021-03-04
731abc8 Donghe-Zhu 2021-03-04
e2a5a33 Donghe-Zhu 2021-03-04
c7892c1 Donghe-Zhu 2021-03-04
924430b Donghe-Zhu 2021-03-03
0d0bca1 Donghe-Zhu 2021-03-03
cb63c16 Donghe-Zhu 2021-03-03
ffda45a Donghe-Zhu 2021-03-03
691ba81 Donghe-Zhu 2021-03-03
c5e45a2 Donghe-Zhu 2021-03-03
89c3e58 Donghe-Zhu 2021-03-03
c911669 Donghe-Zhu 2021-03-03
13666ca Donghe-Zhu 2021-03-01
c6e60fe Donghe-Zhu 2021-03-01
7a388f7 Donghe-Zhu 2021-03-01
799e913 Donghe-Zhu 2021-03-01
66ff99f Donghe-Zhu 2021-03-01
ac9bb7a Donghe-Zhu 2021-02-28
efdc047 Donghe-Zhu 2021-02-28
e9a7418 Donghe-Zhu 2021-02-28
287123c Donghe-Zhu 2021-02-27
54d5b5b Donghe-Zhu 2021-02-27
330f064 Donghe-Zhu 2021-02-27
adbc9bc Donghe-Zhu 2021-02-27
5937141 Donghe-Zhu 2021-02-27
4414bbf Donghe-Zhu 2021-02-27
a265efb Donghe-Zhu 2021-02-27
19edd1e Donghe-Zhu 2021-02-27
f20483f Donghe-Zhu 2021-02-26
6a2c7b3 Donghe-Zhu 2021-02-25
02b976d Donghe-Zhu 2021-02-24
354c224 Donghe-Zhu 2021-02-24
1a0a88a Donghe-Zhu 2021-02-24
57f701e Donghe-Zhu 2021-02-24
06f3149 Donghe-Zhu 2021-02-16
e3bba84 Donghe-Zhu 2021-02-15
5dce4b1 Donghe-Zhu 2021-02-15
4469a0c Donghe-Zhu 2021-02-13
5ae6a69 Donghe-Zhu 2021-02-10
05385dc Donghe-Zhu 2021-02-10
f791ae4 Donghe-Zhu 2021-02-09
f71ae34 Donghe-Zhu 2021-02-09
c011832 Donghe-Zhu 2021-02-09
a145fa7 Donghe-Zhu 2021-02-09
c344e42 Donghe-Zhu 2021-02-08
2f095d7 Donghe-Zhu 2021-02-07
1fad5f1 Donghe-Zhu 2021-02-07
ca03c39 Donghe-Zhu 2021-02-07
cd7c52c Donghe-Zhu 2021-02-04
bcf84f4 Donghe-Zhu 2021-02-02
61666de Donghe-Zhu 2021-01-31
865b582 Donghe-Zhu 2021-01-31
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
59e006e Donghe-Zhu 2021-01-31
a1c8f87 Donghe-Zhu 2021-01-31
ae5c18f Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
442010d Donghe-Zhu 2021-01-29
372adf5 Donghe-Zhu 2021-01-29
af8788e Donghe-Zhu 2021-01-29
21c91c9 Donghe-Zhu 2021-01-29
eded038 Donghe-Zhu 2021-01-29
541d4dd Donghe-Zhu 2021-01-29
6a75576 Donghe-Zhu 2021-01-28
16fba40 Donghe-Zhu 2021-01-28
12bc567 Donghe-Zhu 2021-01-27
ceed31b Donghe-Zhu 2021-01-27
342402d Donghe-Zhu 2021-01-27
5bad5c2 Donghe-Zhu 2021-01-27
61efb56 Donghe-Zhu 2021-01-25
48f638e Donghe-Zhu 2021-01-25
c1cec47 Donghe-Zhu 2021-01-25
05ffb0c Donghe-Zhu 2021-01-25
8b97165 Donghe-Zhu 2021-01-25
c569946 Donghe-Zhu 2021-01-24
a2f0d56 Donghe-Zhu 2021-01-23
28509fc Donghe-Zhu 2021-01-23
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
7891955 Donghe-Zhu 2021-01-21
d4cf1cb Donghe-Zhu 2021-01-21
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
b3564aa jens-daniel-mueller 2021-01-14
8d032c3 jens-daniel-mueller 2021-01-14
17dee1d jens-daniel-mueller 2021-01-13
7cdea0c jens-daniel-mueller 2021-01-06
fa85b93 jens-daniel-mueller 2021-01-06
e5cb81a Donghe-Zhu 2021-01-05
a499f10 Donghe-Zhu 2021-01-05
fb8a752 Donghe-Zhu 2020-12-23
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19
rm(max_rmse)

6.2.2 Best models

# find max rmse to scale axis
max_rmse <-
  max(c(lm_best$rmse,
        lm_best$rmse_sum - lm_best$rmse))

lm_best %>%
  ggplot(aes(rmse, rmse_sum - rmse, col = gamma_slab)) +
  geom_point() +
  scale_color_viridis_d() +
  coord_equal(xlim = c(0,max_rmse),
              ylim = c(0,max_rmse)) +
  facet_grid(eras ~ basin)

Version Author Date
3061a0b Donghe-Zhu 2021-03-27
b883157 Donghe-Zhu 2021-03-27
d19654d Donghe-Zhu 2021-03-26
6c53dbf Donghe-Zhu 2021-03-25
1914a11 Donghe-Zhu 2021-03-24
8be810e Donghe-Zhu 2021-03-23
bf19764 Donghe-Zhu 2021-03-22
3ec9d3d Donghe-Zhu 2021-03-22
134ace1 Donghe-Zhu 2021-03-22
f6d70a4 Donghe-Zhu 2021-03-22
183443b Donghe-Zhu 2021-03-21
2e6976b Donghe-Zhu 2021-03-21
51a42bd Donghe-Zhu 2021-03-16
f745381 Donghe-Zhu 2021-03-16
aecbf75 Donghe-Zhu 2021-03-14
1b2a0c2 Donghe-Zhu 2021-03-14
6733e48 Donghe-Zhu 2021-03-12
ba71e6a Donghe-Zhu 2021-03-12
9dbf5bd Donghe-Zhu 2021-03-11
a49df30 Donghe-Zhu 2021-03-11
b3348a5 Donghe-Zhu 2021-03-11
1c24ff7 Donghe-Zhu 2021-03-10
94ce5a8 Donghe-Zhu 2021-03-10
db33928 Donghe-Zhu 2021-03-10
3d1f470 Donghe-Zhu 2021-03-10
9b7bc66 Donghe-Zhu 2021-03-10
4168b43 Donghe-Zhu 2021-03-10
5365f80 Donghe-Zhu 2021-03-10
2b6c392 Donghe-Zhu 2021-03-10
9f58753 Donghe-Zhu 2021-03-10
fd528ed Donghe-Zhu 2021-03-10
9d5a62c Donghe-Zhu 2021-03-10
5d1e70b Donghe-Zhu 2021-03-10
2093979 Donghe-Zhu 2021-03-10
b865899 Donghe-Zhu 2021-03-10
cc2a956 Donghe-Zhu 2021-03-10
60689fb Donghe-Zhu 2021-03-10
dba33c8 Donghe-Zhu 2021-03-09
17f1c4a Donghe-Zhu 2021-03-09
c024d1a Donghe-Zhu 2021-03-09
02f7242 Donghe-Zhu 2021-03-09
6f50bc6 Donghe-Zhu 2021-03-09
1691156 Donghe-Zhu 2021-03-08
c0ceaf8 Donghe-Zhu 2021-03-08
058e0a1 Donghe-Zhu 2021-03-08
112dea0 Donghe-Zhu 2021-03-08
1843412 Donghe-Zhu 2021-03-08
3fbbfa4 Donghe-Zhu 2021-03-07
627c8fb Donghe-Zhu 2021-03-07
9ef3222 Donghe-Zhu 2021-03-05
8c1e978 Donghe-Zhu 2021-03-05
865f68c Donghe-Zhu 2021-03-05
ee69bc1 Donghe-Zhu 2021-03-05
a79291f Donghe-Zhu 2021-03-05
e8c6f30 Donghe-Zhu 2021-03-04
59288fe Donghe-Zhu 2021-03-04
731abc8 Donghe-Zhu 2021-03-04
e2a5a33 Donghe-Zhu 2021-03-04
c7892c1 Donghe-Zhu 2021-03-04
924430b Donghe-Zhu 2021-03-03
0d0bca1 Donghe-Zhu 2021-03-03
cb63c16 Donghe-Zhu 2021-03-03
ffda45a Donghe-Zhu 2021-03-03
691ba81 Donghe-Zhu 2021-03-03
c5e45a2 Donghe-Zhu 2021-03-03
89c3e58 Donghe-Zhu 2021-03-03
c407a50 Donghe-Zhu 2021-03-03
c911669 Donghe-Zhu 2021-03-03
b71c719 Donghe-Zhu 2021-03-01
13666ca Donghe-Zhu 2021-03-01
c6e60fe Donghe-Zhu 2021-03-01
7a388f7 Donghe-Zhu 2021-03-01
799e913 Donghe-Zhu 2021-03-01
66ff99f Donghe-Zhu 2021-03-01
ac9bb7a Donghe-Zhu 2021-02-28
efdc047 Donghe-Zhu 2021-02-28
e9a7418 Donghe-Zhu 2021-02-28
e152917 Donghe-Zhu 2021-02-28
287123c Donghe-Zhu 2021-02-27
54d5b5b Donghe-Zhu 2021-02-27
330f064 Donghe-Zhu 2021-02-27
adbc9bc Donghe-Zhu 2021-02-27
5937141 Donghe-Zhu 2021-02-27
4414bbf Donghe-Zhu 2021-02-27
a265efb Donghe-Zhu 2021-02-27
19edd1e Donghe-Zhu 2021-02-27
f20483f Donghe-Zhu 2021-02-26
6a2c7b3 Donghe-Zhu 2021-02-25
354c224 Donghe-Zhu 2021-02-24
1a0a88a Donghe-Zhu 2021-02-24
57f701e Donghe-Zhu 2021-02-24
06f3149 Donghe-Zhu 2021-02-16
401eab3 Donghe-Zhu 2021-02-15
e3bba84 Donghe-Zhu 2021-02-15
5dce4b1 Donghe-Zhu 2021-02-15
4469a0c Donghe-Zhu 2021-02-13
5ae6a69 Donghe-Zhu 2021-02-10
05385dc Donghe-Zhu 2021-02-10
f791ae4 Donghe-Zhu 2021-02-09
f71ae34 Donghe-Zhu 2021-02-09
c011832 Donghe-Zhu 2021-02-09
a145fa7 Donghe-Zhu 2021-02-09
c344e42 Donghe-Zhu 2021-02-08
2f095d7 Donghe-Zhu 2021-02-07
1fad5f1 Donghe-Zhu 2021-02-07
ca03c39 Donghe-Zhu 2021-02-07
e2ffc14 Donghe-Zhu 2021-02-05
cd7c52c Donghe-Zhu 2021-02-04
bcf84f4 Donghe-Zhu 2021-02-02
a518739 Donghe-Zhu 2021-02-01
61666de Donghe-Zhu 2021-01-31
865b582 Donghe-Zhu 2021-01-31
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
59e006e Donghe-Zhu 2021-01-31
a1c8f87 Donghe-Zhu 2021-01-31
ae5c18f Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
442010d Donghe-Zhu 2021-01-29
372adf5 Donghe-Zhu 2021-01-29
af8788e Donghe-Zhu 2021-01-29
21c91c9 Donghe-Zhu 2021-01-29
eded038 Donghe-Zhu 2021-01-29
541d4dd Donghe-Zhu 2021-01-29
6a75576 Donghe-Zhu 2021-01-28
16fba40 Donghe-Zhu 2021-01-28
12bc567 Donghe-Zhu 2021-01-27
ceed31b Donghe-Zhu 2021-01-27
342402d Donghe-Zhu 2021-01-27
5bad5c2 Donghe-Zhu 2021-01-27
61efb56 Donghe-Zhu 2021-01-25
48f638e Donghe-Zhu 2021-01-25
c1cec47 Donghe-Zhu 2021-01-25
05ffb0c Donghe-Zhu 2021-01-25
8b97165 Donghe-Zhu 2021-01-25
c569946 Donghe-Zhu 2021-01-24
a2f0d56 Donghe-Zhu 2021-01-23
28509fc Donghe-Zhu 2021-01-23
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
7891955 Donghe-Zhu 2021-01-21
d4cf1cb Donghe-Zhu 2021-01-21
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
b3564aa jens-daniel-mueller 2021-01-14
8d032c3 jens-daniel-mueller 2021-01-14
17dee1d jens-daniel-mueller 2021-01-13
7cdea0c jens-daniel-mueller 2021-01-06
fa85b93 jens-daniel-mueller 2021-01-06
e5cb81a Donghe-Zhu 2021-01-05
a499f10 Donghe-Zhu 2021-01-05
fb8a752 Donghe-Zhu 2020-12-23
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19
rm(max_rmse)

6.3 Predictor counts

The number of models where a particular predictor was included were counted for each basin, density slab and compared eras

# calculate cases of predictor used
lm_all_stats <- lm_best_long %>% 
  filter(term != "(Intercept)",
         delta_coeff != 0) %>% 
  group_by(basin, eras, gamma_slab) %>% 
  count(term) %>% 
  ungroup() %>% 
  pivot_wider(values_from = n,
              names_from = term,
              values_fill = 0)

# print table
lm_all_stats %>%
  gt(rowname_col = "gamma_slab",
     groupname_col = c("basin", "eras")) %>% 
  summary_rows(
    groups = TRUE,
    fns = list(total = "sum")
  )
aou nitrate phosphate phosphate_star sal silicate temp
Atlantic - 1982-1999 --> 2000-2009
(-Inf,26] 5 1 4 5 3 3 2
(26,26.5] 5 3 2 4 1 4 4
(26.5,26.75] 5 1 4 4 2 5 2
(26.75,27] 5 1 4 4 1 5 3
(27,27.25] 5 2 3 4 3 5 2
(27.25,27.5] 5 4 1 3 3 5 2
(27.5,27.75] 5 1 4 3 4 3 1
(27.75,27.85] 5 2 3 3 5 4 0
(27.85,27.95] 5 0 5 5 2 3 2
(27.95,28.05] 5 2 2 5 1 4 4
(28.05,28.1] 5 1 4 5 3 3 2
(28.1,28.15] 5 1 4 5 3 4 1
(28.15,28.2] 5 5 0 4 2 4 2
(28.2, Inf] 5 5 0 3 4 3 1
total 70.00 29.00 40.00 57.00 37.00 55.00 28.00
Atlantic - 2000-2009 --> 2010-2019
(-Inf,26] 5 1 4 5 3 3 2
(26,26.5] 5 3 2 4 1 4 4
(26.5,26.75] 5 1 4 4 2 5 2
(26.75,27] 5 1 4 4 2 5 2
(27,27.25] 5 2 2 4 4 5 1
(27.25,27.5] 5 5 0 3 2 5 2
(27.5,27.75] 5 2 3 3 5 4 0
(27.75,27.85] 5 2 3 3 5 4 0
(27.85,27.95] 5 0 5 5 2 3 2
(27.95,28.05] 5 2 2 5 1 4 4
(28.05,28.1] 5 1 4 5 3 3 2
(28.1,28.15] 5 1 4 5 3 3 2
(28.15,28.2] 5 5 0 4 2 3 3
(28.2, Inf] 5 5 0 3 4 3 1
total 70.00 31.00 37.00 57.00 39.00 54.00 27.00
Indo-Pacific - 1982-1999 --> 2000-2009
(-Inf,26] 4 1 4 5 2 4 3
(26,26.5] 5 1 4 4 1 5 3
(26.5,26.75] 4 2 3 5 1 5 3
(26.75,27] 5 0 5 5 2 3 2
(27,27.25] 5 1 4 5 1 4 3
(27.25,27.5] 5 2 2 5 3 5 2
(27.5,27.75] 3 2 2 5 5 5 0
(27.75,27.85] 5 1 4 4 1 5 3
(27.85,27.95] 3 5 0 4 0 3 5
(27.95,28.05] 5 2 3 5 2 5 2
(28.05,28.1] 5 1 4 4 2 5 2
(28.1, Inf] 4 2 3 4 2 5 3
total 53.00 20.00 38.00 55.00 22.00 54.00 31.00
Indo-Pacific - 2000-2009 --> 2010-2019
(-Inf,26] 4 1 4 5 2 4 3
(26,26.5] 5 1 4 4 1 5 3
(26.5,26.75] 4 2 3 5 1 5 3
(26.75,27] 5 0 5 5 2 3 2
(27,27.25] 5 1 4 5 1 4 3
(27.25,27.5] 5 2 2 5 3 5 2
(27.5,27.75] 4 2 2 5 4 5 1
(27.75,27.85] 4 2 3 5 3 4 2
(27.85,27.95] 5 4 1 3 0 3 5
(27.95,28.05] 5 2 3 5 3 3 2
(28.05,28.1] 5 1 4 4 1 5 3
(28.1, Inf] 5 2 3 4 3 5 2
total 56.00 20.00 38.00 55.00 24.00 51.00 31.00

6.4 RMSE alternatives

AIC is an alternative criterion to RMSE to judge model quality, but not (yet) taken into account.

lm_all_fitted_wide_eras %>% 
  ggplot(aes(rmse, aic, col = gamma_slab)) +
  geom_point() +
  scale_color_viridis_d() +
  facet_grid(eras~basin)

Version Author Date
3061a0b Donghe-Zhu 2021-03-27
b883157 Donghe-Zhu 2021-03-27
d19654d Donghe-Zhu 2021-03-26
6c53dbf Donghe-Zhu 2021-03-25
1914a11 Donghe-Zhu 2021-03-24
8be810e Donghe-Zhu 2021-03-23
bf19764 Donghe-Zhu 2021-03-22
3ec9d3d Donghe-Zhu 2021-03-22
134ace1 Donghe-Zhu 2021-03-22
f6d70a4 Donghe-Zhu 2021-03-22
183443b Donghe-Zhu 2021-03-21
2e6976b Donghe-Zhu 2021-03-21
51a42bd Donghe-Zhu 2021-03-16
f745381 Donghe-Zhu 2021-03-16
aecbf75 Donghe-Zhu 2021-03-14
1b2a0c2 Donghe-Zhu 2021-03-14
6733e48 Donghe-Zhu 2021-03-12
ba71e6a Donghe-Zhu 2021-03-12
9dbf5bd Donghe-Zhu 2021-03-11
a49df30 Donghe-Zhu 2021-03-11
b3348a5 Donghe-Zhu 2021-03-11
1c24ff7 Donghe-Zhu 2021-03-10
94ce5a8 Donghe-Zhu 2021-03-10
db33928 Donghe-Zhu 2021-03-10
3d1f470 Donghe-Zhu 2021-03-10
9b7bc66 Donghe-Zhu 2021-03-10
5365f80 Donghe-Zhu 2021-03-10
2b6c392 Donghe-Zhu 2021-03-10
9f58753 Donghe-Zhu 2021-03-10
9d5a62c Donghe-Zhu 2021-03-10
5d1e70b Donghe-Zhu 2021-03-10
2093979 Donghe-Zhu 2021-03-10
b865899 Donghe-Zhu 2021-03-10
cc2a956 Donghe-Zhu 2021-03-10
dba33c8 Donghe-Zhu 2021-03-09
17f1c4a Donghe-Zhu 2021-03-09
c024d1a Donghe-Zhu 2021-03-09
02f7242 Donghe-Zhu 2021-03-09
1691156 Donghe-Zhu 2021-03-08
c0ceaf8 Donghe-Zhu 2021-03-08
058e0a1 Donghe-Zhu 2021-03-08
112dea0 Donghe-Zhu 2021-03-08
1843412 Donghe-Zhu 2021-03-08
3fbbfa4 Donghe-Zhu 2021-03-07
627c8fb Donghe-Zhu 2021-03-07
9ef3222 Donghe-Zhu 2021-03-05
8c1e978 Donghe-Zhu 2021-03-05
865f68c Donghe-Zhu 2021-03-05
ee69bc1 Donghe-Zhu 2021-03-05
a79291f Donghe-Zhu 2021-03-05
e8c6f30 Donghe-Zhu 2021-03-04
59288fe Donghe-Zhu 2021-03-04
731abc8 Donghe-Zhu 2021-03-04
e2a5a33 Donghe-Zhu 2021-03-04
c7892c1 Donghe-Zhu 2021-03-04
924430b Donghe-Zhu 2021-03-03
0d0bca1 Donghe-Zhu 2021-03-03
cb63c16 Donghe-Zhu 2021-03-03
ffda45a Donghe-Zhu 2021-03-03
691ba81 Donghe-Zhu 2021-03-03
c5e45a2 Donghe-Zhu 2021-03-03
89c3e58 Donghe-Zhu 2021-03-03
c911669 Donghe-Zhu 2021-03-03
13666ca Donghe-Zhu 2021-03-01
c6e60fe Donghe-Zhu 2021-03-01
7a388f7 Donghe-Zhu 2021-03-01
799e913 Donghe-Zhu 2021-03-01
66ff99f Donghe-Zhu 2021-03-01
ac9bb7a Donghe-Zhu 2021-02-28
efdc047 Donghe-Zhu 2021-02-28
e9a7418 Donghe-Zhu 2021-02-28
287123c Donghe-Zhu 2021-02-27
54d5b5b Donghe-Zhu 2021-02-27
330f064 Donghe-Zhu 2021-02-27
adbc9bc Donghe-Zhu 2021-02-27
5937141 Donghe-Zhu 2021-02-27
4414bbf Donghe-Zhu 2021-02-27
a265efb Donghe-Zhu 2021-02-27
19edd1e Donghe-Zhu 2021-02-27
f20483f Donghe-Zhu 2021-02-26
6a2c7b3 Donghe-Zhu 2021-02-25
02b976d Donghe-Zhu 2021-02-24
354c224 Donghe-Zhu 2021-02-24
1a0a88a Donghe-Zhu 2021-02-24
57f701e Donghe-Zhu 2021-02-24
06f3149 Donghe-Zhu 2021-02-16
e3bba84 Donghe-Zhu 2021-02-15
5dce4b1 Donghe-Zhu 2021-02-15
4469a0c Donghe-Zhu 2021-02-13
5ae6a69 Donghe-Zhu 2021-02-10
05385dc Donghe-Zhu 2021-02-10
f791ae4 Donghe-Zhu 2021-02-09
f71ae34 Donghe-Zhu 2021-02-09
c011832 Donghe-Zhu 2021-02-09
a145fa7 Donghe-Zhu 2021-02-09
c344e42 Donghe-Zhu 2021-02-08
2f095d7 Donghe-Zhu 2021-02-07
1fad5f1 Donghe-Zhu 2021-02-07
ca03c39 Donghe-Zhu 2021-02-07
cd7c52c Donghe-Zhu 2021-02-04
bcf84f4 Donghe-Zhu 2021-02-02
61666de Donghe-Zhu 2021-01-31
865b582 Donghe-Zhu 2021-01-31
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
59e006e Donghe-Zhu 2021-01-31
a1c8f87 Donghe-Zhu 2021-01-31
ae5c18f Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
442010d Donghe-Zhu 2021-01-29
372adf5 Donghe-Zhu 2021-01-29
af8788e Donghe-Zhu 2021-01-29
21c91c9 Donghe-Zhu 2021-01-29
eded038 Donghe-Zhu 2021-01-29
541d4dd Donghe-Zhu 2021-01-29
6a75576 Donghe-Zhu 2021-01-28
16fba40 Donghe-Zhu 2021-01-28
12bc567 Donghe-Zhu 2021-01-27
ceed31b Donghe-Zhu 2021-01-27
342402d Donghe-Zhu 2021-01-27
5bad5c2 Donghe-Zhu 2021-01-27
61efb56 Donghe-Zhu 2021-01-25
48f638e Donghe-Zhu 2021-01-25
c1cec47 Donghe-Zhu 2021-01-25
05ffb0c Donghe-Zhu 2021-01-25
8b97165 Donghe-Zhu 2021-01-25
c569946 Donghe-Zhu 2021-01-24
a2f0d56 Donghe-Zhu 2021-01-23
28509fc Donghe-Zhu 2021-01-23
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
7891955 Donghe-Zhu 2021-01-21
d4cf1cb Donghe-Zhu 2021-01-21
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
b3564aa jens-daniel-mueller 2021-01-14
8d032c3 jens-daniel-mueller 2021-01-14
17dee1d jens-daniel-mueller 2021-01-13
7cdea0c jens-daniel-mueller 2021-01-06
fa85b93 jens-daniel-mueller 2021-01-06
e5cb81a Donghe-Zhu 2021-01-05
a499f10 Donghe-Zhu 2021-01-05
fb8a752 Donghe-Zhu 2020-12-23
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19
lm_best %>% 
  ggplot(aes(rmse, aic, col = gamma_slab)) +
  geom_point() +
  scale_color_viridis_d() +
  facet_grid(eras~basin)

Version Author Date
3061a0b Donghe-Zhu 2021-03-27
b883157 Donghe-Zhu 2021-03-27
d19654d Donghe-Zhu 2021-03-26
6c53dbf Donghe-Zhu 2021-03-25
1914a11 Donghe-Zhu 2021-03-24
8be810e Donghe-Zhu 2021-03-23
bf19764 Donghe-Zhu 2021-03-22
3ec9d3d Donghe-Zhu 2021-03-22
134ace1 Donghe-Zhu 2021-03-22
f6d70a4 Donghe-Zhu 2021-03-22
183443b Donghe-Zhu 2021-03-21
2e6976b Donghe-Zhu 2021-03-21
51a42bd Donghe-Zhu 2021-03-16
f745381 Donghe-Zhu 2021-03-16
aecbf75 Donghe-Zhu 2021-03-14
1b2a0c2 Donghe-Zhu 2021-03-14
6733e48 Donghe-Zhu 2021-03-12
ba71e6a Donghe-Zhu 2021-03-12
9dbf5bd Donghe-Zhu 2021-03-11
a49df30 Donghe-Zhu 2021-03-11
b3348a5 Donghe-Zhu 2021-03-11
1c24ff7 Donghe-Zhu 2021-03-10
94ce5a8 Donghe-Zhu 2021-03-10
db33928 Donghe-Zhu 2021-03-10
3d1f470 Donghe-Zhu 2021-03-10
9b7bc66 Donghe-Zhu 2021-03-10
4168b43 Donghe-Zhu 2021-03-10
5365f80 Donghe-Zhu 2021-03-10
2b6c392 Donghe-Zhu 2021-03-10
9f58753 Donghe-Zhu 2021-03-10
fd528ed Donghe-Zhu 2021-03-10
9d5a62c Donghe-Zhu 2021-03-10
5d1e70b Donghe-Zhu 2021-03-10
2093979 Donghe-Zhu 2021-03-10
b865899 Donghe-Zhu 2021-03-10
cc2a956 Donghe-Zhu 2021-03-10
60689fb Donghe-Zhu 2021-03-10
dba33c8 Donghe-Zhu 2021-03-09
17f1c4a Donghe-Zhu 2021-03-09
c024d1a Donghe-Zhu 2021-03-09
02f7242 Donghe-Zhu 2021-03-09
6f50bc6 Donghe-Zhu 2021-03-09
1691156 Donghe-Zhu 2021-03-08
c0ceaf8 Donghe-Zhu 2021-03-08
058e0a1 Donghe-Zhu 2021-03-08
112dea0 Donghe-Zhu 2021-03-08
1843412 Donghe-Zhu 2021-03-08
3fbbfa4 Donghe-Zhu 2021-03-07
627c8fb Donghe-Zhu 2021-03-07
9ef3222 Donghe-Zhu 2021-03-05
8c1e978 Donghe-Zhu 2021-03-05
865f68c Donghe-Zhu 2021-03-05
ee69bc1 Donghe-Zhu 2021-03-05
a79291f Donghe-Zhu 2021-03-05
e8c6f30 Donghe-Zhu 2021-03-04
59288fe Donghe-Zhu 2021-03-04
731abc8 Donghe-Zhu 2021-03-04
e2a5a33 Donghe-Zhu 2021-03-04
c7892c1 Donghe-Zhu 2021-03-04
924430b Donghe-Zhu 2021-03-03
0d0bca1 Donghe-Zhu 2021-03-03
cb63c16 Donghe-Zhu 2021-03-03
ffda45a Donghe-Zhu 2021-03-03
691ba81 Donghe-Zhu 2021-03-03
c5e45a2 Donghe-Zhu 2021-03-03
89c3e58 Donghe-Zhu 2021-03-03
c407a50 Donghe-Zhu 2021-03-03
c911669 Donghe-Zhu 2021-03-03
b71c719 Donghe-Zhu 2021-03-01
13666ca Donghe-Zhu 2021-03-01
c6e60fe Donghe-Zhu 2021-03-01
7a388f7 Donghe-Zhu 2021-03-01
799e913 Donghe-Zhu 2021-03-01
66ff99f Donghe-Zhu 2021-03-01
ac9bb7a Donghe-Zhu 2021-02-28
efdc047 Donghe-Zhu 2021-02-28
e9a7418 Donghe-Zhu 2021-02-28
e152917 Donghe-Zhu 2021-02-28
287123c Donghe-Zhu 2021-02-27
54d5b5b Donghe-Zhu 2021-02-27
330f064 Donghe-Zhu 2021-02-27
adbc9bc Donghe-Zhu 2021-02-27
5937141 Donghe-Zhu 2021-02-27
4414bbf Donghe-Zhu 2021-02-27
a265efb Donghe-Zhu 2021-02-27
19edd1e Donghe-Zhu 2021-02-27
f20483f Donghe-Zhu 2021-02-26
6a2c7b3 Donghe-Zhu 2021-02-25
354c224 Donghe-Zhu 2021-02-24
1a0a88a Donghe-Zhu 2021-02-24
57f701e Donghe-Zhu 2021-02-24
06f3149 Donghe-Zhu 2021-02-16
401eab3 Donghe-Zhu 2021-02-15
e3bba84 Donghe-Zhu 2021-02-15
5dce4b1 Donghe-Zhu 2021-02-15
4469a0c Donghe-Zhu 2021-02-13
5ae6a69 Donghe-Zhu 2021-02-10
05385dc Donghe-Zhu 2021-02-10
f791ae4 Donghe-Zhu 2021-02-09
f71ae34 Donghe-Zhu 2021-02-09
c011832 Donghe-Zhu 2021-02-09
a145fa7 Donghe-Zhu 2021-02-09
c344e42 Donghe-Zhu 2021-02-08
2f095d7 Donghe-Zhu 2021-02-07
1fad5f1 Donghe-Zhu 2021-02-07
ca03c39 Donghe-Zhu 2021-02-07
e2ffc14 Donghe-Zhu 2021-02-05
cd7c52c Donghe-Zhu 2021-02-04
bcf84f4 Donghe-Zhu 2021-02-02
a518739 Donghe-Zhu 2021-02-01
61666de Donghe-Zhu 2021-01-31
865b582 Donghe-Zhu 2021-01-31
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
59e006e Donghe-Zhu 2021-01-31
a1c8f87 Donghe-Zhu 2021-01-31
ae5c18f Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
442010d Donghe-Zhu 2021-01-29
372adf5 Donghe-Zhu 2021-01-29
af8788e Donghe-Zhu 2021-01-29
21c91c9 Donghe-Zhu 2021-01-29
eded038 Donghe-Zhu 2021-01-29
541d4dd Donghe-Zhu 2021-01-29
6a75576 Donghe-Zhu 2021-01-28
16fba40 Donghe-Zhu 2021-01-28
12bc567 Donghe-Zhu 2021-01-27
ceed31b Donghe-Zhu 2021-01-27
342402d Donghe-Zhu 2021-01-27
5bad5c2 Donghe-Zhu 2021-01-27
61efb56 Donghe-Zhu 2021-01-25
48f638e Donghe-Zhu 2021-01-25
c1cec47 Donghe-Zhu 2021-01-25
05ffb0c Donghe-Zhu 2021-01-25
8b97165 Donghe-Zhu 2021-01-25
c569946 Donghe-Zhu 2021-01-24
a2f0d56 Donghe-Zhu 2021-01-23
28509fc Donghe-Zhu 2021-01-23
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
7891955 Donghe-Zhu 2021-01-21
d4cf1cb Donghe-Zhu 2021-01-21
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
b3564aa jens-daniel-mueller 2021-01-14
8d032c3 jens-daniel-mueller 2021-01-14
17dee1d jens-daniel-mueller 2021-01-13
7cdea0c jens-daniel-mueller 2021-01-06
fa85b93 jens-daniel-mueller 2021-01-06
e5cb81a Donghe-Zhu 2021-01-05
a499f10 Donghe-Zhu 2021-01-05
fb8a752 Donghe-Zhu 2020-12-23
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19

sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: openSUSE Leap 15.2

Matrix products: default
BLAS:   /usr/local/R-4.0.3/lib64/R/lib/libRblas.so
LAPACK: /usr/local/R-4.0.3/lib64/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] car_3.0-10       carData_3.0-4    gt_0.2.2         corrr_0.4.3     
 [5] broom_0.7.5      kableExtra_1.3.1 knitr_1.30       olsrr_0.5.3     
 [9] GGally_2.0.0     lubridate_1.7.9  metR_0.9.0       scico_1.2.0     
[13] patchwork_1.1.1  collapse_1.5.0   forcats_0.5.0    stringr_1.4.0   
[17] dplyr_1.0.5      purrr_0.3.4      readr_1.4.0      tidyr_1.1.2     
[21] tibble_3.0.4     ggplot2_3.3.3    tidyverse_1.3.0  workflowr_1.6.2 

loaded via a namespace (and not attached):
 [1] fs_1.5.0                 webshot_0.5.2            RColorBrewer_1.1-2      
 [4] httr_1.4.2               rprojroot_2.0.2          tools_4.0.3             
 [7] backports_1.1.10         R6_2.5.0                 nortest_1.0-4           
[10] DBI_1.1.0                colorspace_2.0-0         withr_2.3.0             
[13] gridExtra_2.3            tidyselect_1.1.0         curl_4.3                
[16] compiler_4.0.3           git2r_0.27.1             cli_2.2.0               
[19] rvest_0.3.6              xml2_1.3.2               sass_0.2.0              
[22] labeling_0.4.2           scales_1.1.1             checkmate_2.0.0         
[25] goftest_1.2-2            digest_0.6.27            foreign_0.8-80          
[28] rmarkdown_2.5            rio_0.5.16               pkgconfig_2.0.3         
[31] htmltools_0.5.0          highr_0.8                dbplyr_1.4.4            
[34] rlang_0.4.10             readxl_1.3.1             rstudioapi_0.13         
[37] farver_2.0.3             generics_0.1.0           jsonlite_1.7.2          
[40] zip_2.1.1                magrittr_2.0.1           Matrix_1.2-18           
[43] Rcpp_1.0.5               munsell_0.5.0            fansi_0.4.1             
[46] abind_1.4-5              lifecycle_1.0.0          stringi_1.5.3           
[49] whisker_0.4              yaml_2.2.1               plyr_1.8.6              
[52] grid_4.0.3               blob_1.2.1               parallel_4.0.3          
[55] promises_1.1.1           crayon_1.3.4             lattice_0.20-41         
[58] haven_2.3.1              hms_0.5.3                pillar_1.4.7            
[61] reprex_0.3.0             glue_1.4.2               evaluate_0.14           
[64] RcppArmadillo_0.10.1.2.2 data.table_1.13.6        modelr_0.1.8            
[67] vctrs_0.3.6              httpuv_1.5.4             cellranger_1.1.0        
[70] gtable_0.3.0             reshape_0.8.8            assertthat_0.2.1        
[73] xfun_0.20                openxlsx_4.2.3           RcppEigen_0.3.3.9.1     
[76] later_1.1.0.1            viridisLite_0.3.0        ellipsis_0.3.1          
[79] here_1.0.1