View source: R/analyse_describe.R
analyse_describe | R Documentation |
Create a Function for Descriptive Statistics of a Dataset
analyse_describe()
summarise_describe(name = NULL)
name |
name for the summarise function, appended to the name of the analysis method in the final results |
an analyse function that returns a list with the elements
followup
follow up time
events
table of events vs. treatment
ice
if column ice is present, table of intercurrent events, events, treatment
subgroup
if column subgroup is present, table of subgroup, events, treatment
A function that can be used in Summarise that returns a data frame with columns with means and standard deviations for every variable in the description.
summarise_describe()
: Summarise Descriptive Statistics
condition <- merge(
assumptions_delayed_effect(),
design_fixed_followup(),
by=NULL
) |>
head(1)
dat <- generate_delayed_effect(condition)
analyse_describe()(condition, dat)
condition <- merge(
assumptions_delayed_effect(),
design_fixed_followup(),
by=NULL
) |>
tail(4) |>
head(1)
summarise_all <- create_summarise_function(
describe=summarise_describe()
)
# runs simulations
sim_results <- runSimulation(
design=condition,
replications=100,
generate=generate_delayed_effect,
analyse=list(
describe=analyse_describe()
),
summarise = summarise_all
)
# study time is missing, since there was no admin. censoring
sim_results[, 9:16]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.