Hello I would really appreciate your help!
I am planning to run a study of about 400 - 450 participants in total. I will collect data from participants through different sessions over 2 weeks such that no session will have the same participant more than once. so each participant will be allocated to one session only and won't have to come back again.
Each participant from the 450 should be randomly assigned to one of 3 groups: "cq", "t1q" or "t2q". We want to ensure that by the end of all sessions we have about 450/3 = 150 participants per group without large variations in the numbers of participants across the 3 groups.
Will this part of my code ensure that by the end of my data collection, we will not have huge variations in the number of participants in each of the 3 groups (ideally we would want them to be equal (i.e. 150 people per group)?
"$rotation = array(
'cq' => array('c1', 'c2', 'c3', 'c4'),
't1q' => array('tt11', 'tt12', 'tt13', 'tt14'),
't2q' => array('tt21', 'tt22', 'tt23', 'tt24'),
'di' => array('dit1', 'disu1', 'dilk1', 'diy1', 'dish1', 'didp1'),
'tr' => array('trt1', 'trsu2', 'trlk2', 'try2', 'trsh2', 'trdp2'),
'pg' => array('pgt1', 'pgsu3', 'pglk3', 'pgy3', 'pgsh3', 'pgdp3'),
'ch' => array('cht1', 'chsu4', 'chlk4', 'chy4', 'chsh4', 'chdp4'),
);
// Randomly choose 'cq', 't1q', or 't2q'
$randomPage = array_rand(array_intersect_key($rotation, array_flip(['cq', 't1q', 't2q'])));
// Create an array to store the final sequence
$finalSequence = array();
// Store 'cq', 't1q', or 't2q' in IV01_01, IV02, and IV03 depending on the randomPage
put('IV01_01', $randomPage);"
Thanks in advance :)