View source: R/create_glm_output_table.R
create_glm_output_table | R Documentation |
This function is designed to extract the key information from a GLM object and compile it into a tidy dataframe for use in R Markdown reports. Information includes coefficient estimates, standard errors, odds ratios, Z statistics, and p-values.
create_glm_output_table(mod_glm, dat)
mod_glm |
This is an object of class 'glm'. |
dat |
This is the dataframe used in fitting the glm object. |
x = rnorm(100, 0, 1) xb = 3 + 4.2 * x p = 1/(1 + exp(-xb)) y = rbinom(n = 100, size = 1, prob = p) dat = data.frame(x, y) mod_glm = glm(y ~ x, data = dat, family = "binomial") glm_output = create_glm_output_table(mod_glm, dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.