RCT_analysis: RCT Analysis

Description Usage Arguments Value Examples

View source: R/rct-analysis.R

Description

Wrapper function for bmbstats function to provide modular analysis for the Randomized Controlled Trials

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
RCT_analysis(
  data,
  group,
  treatment_label,
  control_label,
  pre_test,
  post_test,
  SESOI_lower = SESOI_lower_RCT_func,
  SESOI_upper = SESOI_upper_RCT_func,
  estimator_function = RCT_estimators,
  control = model_control(),
  na.rm = FALSE
)

Arguments

data

Data frame

group

Character vector indicating the name of the column in data where group information is stored

treatment_label

Character vector indicating the label inside the group column for the treatment group

control_label

Character vector indicating the label inside the group column for the control group

pre_test

Character vector indicating the name of the column in data where Pre-test observations are located

post_test

Character vector indicating the name of the column in data where Post-test observations are located

SESOI_lower

Function or numeric scalar. Default is SESOI_lower_RCT_func

SESOI_upper

Function or numeric scalar. Default is SESOI_upper_RCT_func

estimator_function

Function for providing RCT estimators. Default is RCT_estimators

control

Control object returned from model_control function. Use boot_type, boot_samples, boot_strata, and confidence to setup bootstrap.

na.rm

Should NAs be removed? Default is FALSE

Value

Object of class bmbstats_RCT_analysis

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
set.seed(1666)

data("vertical_jump_data")

rct_model <- RCT_analysis(
  vertical_jump_data,
  group = "Group",
  treatment_label = "Treatment",
  control_label = "Control",
  pre_test = "Pre-test",
  post_test = "Post-test",
  control = model_control(boot_type = "perc", boot_samples = 500)
)

rct_model

plot(rct_model)

mladenjovanovic/bmbstats documentation built on Aug. 5, 2020, 4:20 p.m.