Table2: Print a formatted table with the Odds/Hazard ratios from a...

Description Usage Arguments Details Value Author(s) Examples

View source: R/mechkar.R

Description

This function creates a table with the Odds/Hazard ratios (depending on the model type) with their confidence intervals and p-values.

Usage

1
Table2(mod, rv=NULL, level = 0.95, decimals = 3)

Arguments

mod

the model name

rv

(Optional) the text to be used for each of the variables to be used. If ommited, the original variable names will be used.

level

the confidence level to be used. Default=0.95

decimals

the number of decimals to be used. Default=3

Details

The Table2 function generates a summary table containing the exponent of the model coefficients and the respective confidence intervals and p-values.

Value

This function returns a data frame object with the table of the variables with the coeficients of the model and their p-value

Author(s)

Tomas Karpati M.D.

Examples

1
2
3
4
5
6
7
8
df <- MASS::biopsy[,2:11]
mod <- glm(class ~ ., data=df ,family = "binomial")
vn <- c("Intercept","clump thickness","uniformity cell size","uniformity cell shape",
        "marginal adhesion","epithelial cell size","bare nuclei",
        "bland chromatin","normal nucleoli","mitoses")
rn <- data.frame(vars=vn,cats=rep("",10))

tab2 <- Table2(mod=mod,rv = vn)

mechkar documentation built on March 13, 2020, 2:30 a.m.