## After creating a 'matrices_obj' with the 'calculate_mean_matrix' function.
refmean <- 1
treatgroups <- 4
timepoints <- 5
treateff <- 1.5
timeeff <- 0.85
rho <- 0.8
withinf <- "fB"
factors_levels_names <- list(treatment=letters[1:treatgroups], time=1:timepoints)
effects_treat_time <- calculate_mean_matrix(refmean = refmean,
fAeffect = treateff, fBeffect = timeeff,
nlfA = treatgroups, nlfB = timepoints,
rho = rho, withinf = withinf,
label_list = factors_levels_names)
n <- 7
correlated_sim <- twoway_simulation_correlated(group_size=n, matrices_obj=effects_treat_time,
nsims=20)
##used smaller number of iterations to reduce computation time
twoway_simulation_testing(correlated_sim)
## defaults to parametric analysis of variance
twoway_simulation_testing(correlated_sim, test="rank")
## rank based analysis of variance
## permutation test is another option
Run the code above in your browser using DataLab