powered by
Computing the proportion of treatment difference for stratified data. The stratification is done over time.
prop_strata(treatment, outcome, block)
vector. The vector with treatment assignment, 0 for control and 1 for treatment group.
vector. The vector with outcome, 0 for failure and 1 for success. Must be the same length as treatment variable.
vector. The vector with factor level of the block. Must be same lenhth as treatment variable.
the weighted mean of proportion difference (treatment - control).
# NOT RUN { set.seed(20999) prop_strata(c(0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0), c(0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1), as.factor(rep(1:3, each = 5))) # }
Run the code above in your browser using DataLab