knitr::opts_chunk$set(echo = FALSE) # rmdhelp::show_knit_hook_call() knitr::knit_hooks$set(hook_convert_odg = rmdhelp::hook_convert_odg)
# produce output for two models # s_ex04p01_data_path <- "https://charlotte-ngs.github.io/asmss2022/data/asm_bw_flem.csv" # s_ex04p01_data_path <- file.path(here::here(), "docs", "data", "asm_bw_flem.csv") # tbl_ex04p01_data <- readr::read_csv(file = s_ex04p01_data_path) # lm_ex04p01_bwbc <- lm(formula = `Body Weight` ~ `Breast Circumference`, data = tbl_ex04p01_data) # summary(lm_ex04p01_bwbc) # lm_ex04p01_bwbreed <- lm(formula = `Body Weight` ~ Breed, data = tbl_ex04p01_data) #rmdhelp::use_odg_graphic(ps_path = "odg/comp-two-models.odg") knitr::include_graphics(path = "odg/comp-two-models.png")
if (params$isonline){ s_ex04p01_data_path <- "https://charlotte-ngs.github.io/asmss2022/data/asm_bw_flem.csv" } else { s_ex04p01_data_path <- file.path(here::here(), "docs", "data", "asm_bw_flem.csv") } tbl_ex04p01_data <- readr::read_csv(file = s_ex04p01_data_path) summary(lm(formula = `Body Weight` ~ `Breast Circumference` + BCS + HEI + Breed, data = tbl_ex04p01_data))
#rmdhelp::use_odg_graphic(ps_path = "odg/show-full-model.odg") knitr::include_graphics(path = "odg/show-full-model.png")
$$R^2 = \frac{||\hat{y} - \bar{y}||^2}{||y - \bar{y}||^2}$$
$$R_{adj}^2 = 1 - (1 - R^2) \frac{n-1}{n-p-1}$$
$$C_p(\mathcal{M}) = \frac{SSE(\mathcal{M})}{\hat{\sigma}^2} - n + 2 |\mathcal{M}|$$
olsrr
- no spaces in variable namesMASS::stepAIC()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.