subgroups | R Documentation |
subgroups()
is a function which create a dataframe, which can be copied directly into
word or presented in as a subgroup analysis.
subgroups(df,group,subgroups,outcome,test,time.to,
strata.fixed,strata.random,digs_p,digs_s,
conf.level, paired,markdown, caption, fig)
df |
dataframe. ( |
group |
Column name of stratification ( |
subgroups |
column names of subgroups ( |
outcome |
column name of outcome of interest ( |
test |
list of tests carried out, currently the following works: |
time.to |
Column name of the time column for cox regression ( |
strata.fixed |
list of columns which should be used as fixed stratification ( |
strata.random |
list of columns which should be used as random stratification ( |
digs_p |
digits for p-values ( |
digs_s |
digits for statistics ( |
conf.level |
confidence intervals which should be presented ( |
paired |
if tests should be paired ( |
markdown |
default is true and output is pander, while false output is a dataframe ( |
caption |
Table caption only in use when markdown is true ( |
fig |
If figure should be presented ( |
Returns summarised information in dataframe.
## Not run:
zubgroups <- c(`Estimated fetal weight`="est_fetal_weight_grp",
`Gestational age`="Gestational Age at rand (cat)",
`End diastolic flow`="end_dia_flow_grp",
`Uterine artery Doppler / Notch`="dop_notch_grp",
`Maternal S-Placental-GF`="maternalSplacentalGF_grp",
`Hypertension or preeclampsia`="ht_preeclamps_grp",
`Abdominal circumference`="abd_circum_cent_grp")
subgroups(df,group="group",zubgroups,
outcome="Infant survival without SAE",
test="glm",strata.fixed = "site")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.