Description Usage Arguments Examples
DemoGraphic table for categorical variables
1 |
var |
baseline variables |
strata |
group variable with 1 = treatment and 0 = control |
data |
data |
1 2 3 4 5 6 7 8 | set.seed(2018)
group <-round(abs(rnorm(500)*10),0) %% 2
cont_1 <-round(abs(rnorm(500)*10),0)
cat_multi_1 <-round(abs(rnorm(500)*10),0) %% 3
data_check <-data.frame(group, cont_1, cat_multi_1)
data_check$group <- factor(data_check$group, levels = c(0,1), labels = c("Control","Treatment"))
data_check$cat_multi_1 <- factor(data_check$cat_multi_1)
cat_table("cat_multi_1","group",data_check )
|
$demo_table
Variable Control Treatment p value smd
1 cat_multi_1 n (%)
2 0 89 (34.77) 73 (29.92) 0.187 0.164
3 1 92 (35.94) 81 (33.20)
4 2 75 (29.30) 90 (36.89)
$smd_table
Variable smd.value smd.lo smd.up
1 cat_multi_1 0.1643831 -0.01127088 0.3400371
attr(,"class")
[1] "cont_tb"
attr(,"demo")
Variable Control Treatment p value smd
1 cat_multi_1 n (%)
2 0 89 (34.77) 73 (29.92) 0.187 0.164
3 1 92 (35.94) 81 (33.20)
4 2 75 (29.30) 90 (36.89)
attr(,"smd")
Variable smd.value smd.lo smd.up
1 cat_multi_1 0.1643831 -0.01127088 0.3400371
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.