knitr::opts_chunk$set(echo = TRUE)
# define data directory depending on online status if (params$isonline){ s_data_dir <- "https://charlotte-ngs.github.io/asmss2022/data" } else { s_data_dir <- file.path(here::here(), "docs", "data") } s_data_path <- file.path(s_data_dir, "asm_bw_mult_reg.csv") s_data_bw_bc_path <- file.path(s_data_dir, "asm_bw_bc_reg.csv") # write the default one variable regression, if we are not online if (!params$isonline){ tbl_mult <- readr::read_csv(file = s_data_path) tbl_bw_bc <- dplyr::select(tbl_mult, Animal, `Breast Circumference`, `Body Weight`) if (!fs::file_exists(path = s_data_bw_bc_path)) readr::write_csv(tbl_bw_bc, file = s_data_bw_bc_path) } tbl_bw_bc <- readr::read_csv(file = s_data_bw_bc_path) n_nr_obs <- nrow(tbl_bw_bc)
The measurement unit has an influence on the results of a regression model. This is demonstrated by changing the unit for Breast Circumference
(BC) from centimeters to meters.
r n_nr_obs
animals. The dataset is availble as csv-file under: r s_data_bw_bc_path
lm()
readr::read_csv()
to read the dataBreast Circumference
by 100lm()
Do the same type of comparison of regression modelling results when changing the measurement unit for the variable HEI in the complete dataset given in
https://charlotte-ngs.github.io/asmss2022/data/asm_bw_mult_reg.csv
.
cat('\n---\n\n _Latest Changes: ', format(Sys.time(), '%Y-%m-%d %H:%M:%S'), ' (', Sys.info()['user'], ')_\n', sep = '')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.