Given estimates of the treatment effects to be proven, the variances, and the prevalence,
sim.bssr.gee.1subgroup
calculates an initial sample size and performs a blinded sample size recalculation
after a pre-specified number of subjects have been enrolled. Each observation is simulated and a final analysis executed.
Several variations are included, such as different approximations or sample size allocation.
sim.bssr.gee.1subgroup(nsim = 1000, alpha = 0.05, tail = "both",
beta = 0.2, delta = c(0.1, 0.1), vdelta = c(0.1, 0.1),
sigma_pop = c(3, 3), vsigma_pop = c(3, 3), tau = 0.5, rho = 0.25,
vrho = 0.25, theta = 1, vtheta = 1, Time = 0:5, rec.at = 0.5,
k = 1, model = 1, V = diag(rep(1, length(Time))), OD = 0,
vdropout = rep(0, length(Time)), missingtype = "none",
vmissingtype = "none", seed = 2015)
number of simulation runs.
level (type I error) to which the hypothesis is tested.
which type of test is used, e.g. which quartile und H0 is calculated
type II error (power=1-beta) to which an alternative should be proven.
vector of true treatment effects, c(overall population, inside subgroup).
vector of treatment effects to be proven, c(overall population, inside subgroup).
vector of true standard deviations of the treatment effects, c(overall population, subgroup).
vector of assumed standard deviations, c(overall population, inside subgroup).
subgroup prevalence.
true correlation coefficient between two adjacent timepoints
initial expectation of the correlation coefficient between two adjacent timepoints
true correlation absorption coefficient if timepoints are farther apart
expected correlation absorption coefficient if timepoints are farther apart
vector of measured timepoints
blinded sample size review is performed after rec.at
*\(100\%\) subjects of the initial sample size calculation.
sample size allocation factor between groups: see 'Details'.
which of the two often revered statistical models should be used?: see 'Details'.
working covariance matrix.
overall dropout measured at last timepoint
vector of expected dropouts per timepoint if missingness is to be expected
true missingtype underlying the missingness
initial assumptions about the missingtype underlying the missingness
set seed value for the simulations to compare results.
sim.bssr.1subgroup
returns a data.frame containing the mean and variance of recalculated sample sizes within the control group and treatment group respectively and the achieved simulated power along with all relevant parameters.
This function combines sample size estimation, blinded sample size re-estimation and analysis in a design with a subgroup within a full population where we want to test for treatment effects between a control and a treatment group.
The required sample size for the control and treatment group to prove an existing
alternative delta
with a specified power 1-beta
when testing the global null hypothesis \(H_0: \Delta_F=\Delta_S=0\) to level alpha
is calculated prior to the study and then recalculated in an internal pilot study.
For sample sizes \(n_C\) and \(n_T\) of the control and treatment group, respectively, the argument k
is the
sample size allocation factor, i.e. \(k = n_T/n_C\).
sim.bssr.gee.1subgroup
makes use of n.gee.1subgroup
, bssr.gee.1subgroup
, and r.gee.1subgroup
.
# NOT RUN {
sim.bssr.gee.1subgroup(nsim = 5,missingtype = "intermittened")
# }
Run the code above in your browser using DataCamp Workspace