This page presents all the discussions and programs related to cluster randomisation, in sample size determination during the planning stages, and the analysis of the data collected.
The large amount of information are arranged in a number of nested collapsible panels, the contents of which can be shown or hidden by clicking on the panel header.
Layout: this panel
Explanations and References
Introduction and References: General discussions and relevant references
Sample Size: Introduction to Intraclass Correlation Coefficient (ρ) and sample size estimation
Analysis: Introduction to analysis of collected data
Examples: Explanations using example data
Examples for two means: Sample size estimation and analysis of data for cluster randomisation comparing two means
Examples for two proportions: Sample size estimation and analysis of data for cluster randomisation comparing two proportions
Technical Considerations: Discussions on minor differences to text book references and decimal point precisions
Javascript Programs: Programs for calculations
Sample size: Programs for sample size estimations
Hints for data entry, sample size: Explanations for data structure
Calculations, sample size: Javascript programs related to sample size
Calculations for intraclass correlation coefficient (ρ) for means and SDs
Calculations for intraclass correlation coefficient (ρ) for proportions
Calculations for cluster sample size, given ρ and number of clusters
Calculations for number of clusters, given ρ and sample size per cluster
Data Analysis: Programs for handling data collected
Hints for data entry, Data Analysis: Explanations for data structure
Calculations, Data Analysis: Javascript programs to analyse data collected
Analysis of data for two groups of cluster randomised means and Standard Deviations
Analysis of data for two groups of cluster randomised proportions
Explanations and References
Introduction & References
Cluster randomisation experiments are used in situations where individual research subjects cannot easily be randomly allocated
to receive different treatments. In this situation, research subjects are firstly grouped into clusters, and
experimental treatments are randomly allocated to clusters so that all members of a cluster receive the same experimental treatment.
Some of the reasons for using the cluster randomisation experiments are
When programs of treatment must be applied to a group or a community.
In agriculture, when treatments, such as adding fertilisers or pest control, must be applied to a block
such as a paddock, a field, or a farm, and cannot be applied to individual plants
In education, when interventions are usually applied to a class or a school, and not to individual students
In hospitals, where protocols and policies of care are usually applied to a ward or a hospital, and not to individual patients
In public health initiatives when an intervention is applied to a community or a region, and not to individual
health care consumers
When the effect of intervention may contaminate across treatment groups
The introduction of new knowledge or techniques to one group which are likely to be copied and used by those in the other group
Difficult administrative situations where which subjects belonging to which groups may be confused, such
as patients in a hospital ward or students in a class.
The main difference between individual randomisation and cluster randomisation is that members of a cluster
may be more similar to each other than to those from different clusters, so the effects of experimental treatment and
cluster membership are confounded. There is therefore a need to introduce a correction for this possible confounding,
the parameter Intraclass Correlation Coefficient ρ.
ρ, conceptually, is the average of correlations between all possible pairs within a cluster. If subjects are
randomly allocated to different clusters and the environments of all clusters are identical, then there should be no correlation
between cases in any clusters, and ρ=0. If all members of a cluster produce the same results, then ρ=1.
In both estimating sample size requirement and in the analysis of the data, therefore, the Intraclass Correlation Coefficient
ρ is estimated. This is used to adjust the results of standard statistical procedures that are based on individual
randomisation, so that the final results are appropriate for cluster randomisation.
Cluster randomisation is a large subject, and StatsToDo provides but the two most basic and commonly used
models, that of two group comparison for normally distributed measurements and binomially distributed proportions, as
carried out by the algorithms in the calculations panels.
References
Machin D, Campbell M, Fayers, P, Pinol A (1997) Sample Size Tables for
Clinical Studies. Second Ed. Blackwell Science IBSN 0-86542-870-0 p. 27-28
Donner A and Klar N (2000) Design and Analysis of Cluster Randomisation Trials
in Health Research. Arnold London ISBN 0 340 69153 0
Calculation for Intraclass Correlation Coefficient ρ and sample size for normally distributed measurements. p. 52-78
Calculation for Intraclass Correlation Coefficient ρ and sample size for binomially distributed proportions. p. 62-63
Analysis of data : cluster level analysis. p. 87-89
Calculation for Intraclass Correlation Coefficient ρ and data analysis for normally distributed measurements. p. 111-116
Calculation for Intraclass Correlation Coefficient ρ and data analysis for binomially distributed proportions. p. 85 - 87
Sample Size
This panel provides a discussion, and supports the calculations of sample size estimation for cluster randomization. These can be to calculate the number of clusters required, when the number of cases within each cluster is defined, or the number of individuals in each cluster when the number of cluster is defined
Sample size can be estimated in two ways
To determine number of clusters required, given known number of individuals in each cluster
To determine the number of individuals required for each cluster, given known number of clusters to be used
To do either, the following parameters are required.
The expected Intraclass correlation (ρ), the correlation between individuals within each cluster. ρ can be estimated by one of the following methods.
ρ can be a known value, copied from existing information such as published data
ρ can be estimated in a pilot study, where a number of clusters are studied before experimentation begins, as shown in the calculation panel
ρ can be arbitrarily nominated, based on experience and an understanding of the nature of the clusters
to be studied. For example, in agricultural experiment where clusters are merely divisions of existing facilities into lots,
and individuals are randomly assigned to the clusters, then ρ can be expected to have a very small value, and can be
assigned a zero (0) value. Where clustering is based on natural grouping such as family or schools, individuals within the
cluster are more similar, and ρ can be expected to have higher values.
Once the parameters are defined, the sample sizes can be estimated as follows
If
s= sample size per group in simple two group comparison
ρ = intraclass Correlation
k = number of clusters in each group
m = number of individuals in each cluster
then
k (number of clusters) = s (1 + (m - 1) ρ) / m, or
m (number of individuals in each cluster) = s (1 - ρ) / (k - ρ s)
Analysis
The data collected from a cluster randomisation model is usually summarised. For example, when the outcome is a
normally distributed measurement, the sample size, mean, and Standard Deviation from each cluster is used for analysis.
When the outcome is a binomially distributed parameter (no/yes, true/false), the numbers of cases with positive and
negative outcomes from each cluster are usually used for analysis.
The mean value of a cluster, or the proportion of positive responses in a cluster, can be used as a measurement, and
these can be used for statistical analysis using standard statistical algorithms, using the cluster as the basic
sampling unit.
A concern of such an approach is that it assumes all clusters to have the same sample size. This however is usually the
case in cluster randomisation experiments as all clusters should have the same sample size at start, and only data loss
during collection results in minor differences in sample size from different clusters.
Donner's book suggests 3 methods of analysis at the cluster level that can be used.
The standard two samples t test, using the cluster mean (normally distributed measurement) or proportion positive
(binomially distributed proportions) as the measurement. Although the t test assumes that the measurements are
normally distributed, the statistics is robust in that the difference between the assumptions of normal and other
distributions are trivial in most cases.
The Mann-Whitney U Test is less powerful than the t test but makes no assumptions on the distribution pattern of the values,
requiring only that they are ordered.
The Permutation Test has 100% power, and is particularly useful when the number of clusters involved are
very few. The only problem being that the usual desk top computers cannot cope with data containing many clusters
StatsToDo can only handle a maximum of about 25 clusters per group for Permutation Test).
When the outcome in a cluster randomisation experiment is a normally distributed measurement, the results from the two samples
t test can be modified by the Intraclass Correlation Coefficient ρ, so that the Standard Error of the difference, the
Probability of Type I error α and 95% confidence interval of the difference are corrected for correlations ρ.
When the outcome in a cluster randomisation experiment is a binomially distributed proportion, three additional statistical
tests can be applied.
The first is the corrected Perason's Chi Squres Test. The standard Chi Square test is applied, then modified by the
Intraclass Correlation Coefficient ρ
The second is the corrected difference in proportions. The difference in proportions between the two groups and its
Standard Error are calculated. The Standard Error is then modified by the Intraclass Correlation Coefficient ρ. From these,
the 95% confidence interval of the difference in proportion between the two groups can be calculated.
The third is the corrected Odds Ratio between the two groups. The Odds Ratio and its
Standard Error are calculated. The Standard Error is then modified by the Intraclass Correlation Coefficient ρ. From these,
the 95% confidence interval of the Odds Ratio can be calculated.
The test for differences between two groups, both for normally distributed measurements and for proportions, are provided in
in the calculation panels of this page
Examples
Example for Two Means
The conduct of a cluster randomisation exercise comparing two means is best demonstrated with the default example data used in both the sample size and analysis program panels. Please note that the data used is computer generated to demonstrate the procedures, and not real observation.
We wish to conduct a controlled trial on the effect of introducing additional fertiliser to the feeding ground of calves on
their weight gain. As we cannot randomize the calves because fertilisers can
only be applied to paddocks, we will use the cluster randomisation model, using each paddock as the cluster for randomisation.
Step 1 : Find ssiz_{individual}
We use the following parameters to determine the sample size based on individual randomisation
Type I Error α = 0.05
Power (1 - β) = 0.8
We expect that the calves would gain some 15Kg over a 3 months period, with the Standard Deviation some 6Kg. Our
research hypothesis is that with additional fertilisers, the calves would gain an extra 3 Kg during that period.
The effect size is therefore roughly half a Standard Deviation (0.5)
We looked up the sample size requirement table in the sample size for unpaired means table page, and found that we will require 65 calves per group if we were to randomize on individual calves. In other words, ssiz_{individual}, s = 65
We decided to obtain the likely Intraclass Correlation Coefficient ρ for our experiment by a pilot study,
where we placed some calves into a number of paddocks, and measure their growth (weight gain over 3 months),
and found the results as in the table to the left.
We use the first program in the sample size panel of this page to obtain a workable Intraclass
Correlation Coefficient, which is ρ = 0.0889. This is, as expected a very low level of correlation, as the calves are
allocated at random.
Step 3 : Sample Size Adjustment
ssiz_{ind}
ρ
k
m
ssiz_{clus}
65
0.0881
30
3
90
65
0.0881
28
3
84
65
0.0881
26
3
78
65
0.0881
24
4
96
65
0.0881
22
4
88
65
0.0881
20
5
100
65
0.0881
18
5
90
65
0.0881
16
6
96
65
0.0881
14
8
112
65
0.0881
12
10
120
65
0.0881
10
14
140
65
0.0881
9
19
171
65
0.0881
8
27
216
65
0.0881
7
47
329
65
0.0881
6
217
1302
k=number of clusters per group m=sample size per cluster ssiz_{clus}=total sample size per group
Using the third program in the sample size calculation panel, we can view the sample size required in each
cluster for a range of cluster numbers, as shown in the table to the left.
It can be seen that, as the number of paddocks (clusters) to be used decreases, the number of calves per paddock
(sample size per cluster) increases exponentially. The sample size reaches infinity when the number of cluster
is below 6.
Although the sample size per cluster continues to decrease as the number of clusters increases, the changes in
the total group sample size becomes increasingly minor.
From such an analysis, and depending on the costs (financial, time, and effort) of different aspects of the experiment,
the most efficient combination with the same power can be selected. In this example, the best combinations
would seem to be from 9 paddocks with 19 calves per paddock (total 171 calves per group) to 18 paddocks with
5 claves per paddock (total 90 calves per group), depending on whether managing calves or paddocks to be more costly.
Step 4 : Analysis of Results
Grp
n
mean(Kg)
SD
1
20
21.5
5.9
1
20
18.8
4.7
1
20
18.6
4.8
1
20
19.5
5.4
1
20
23.3
6.1
1
20
21.0
4.2
1
20
19.6
6.9
1
20
22.3
6.4
1
20
20.1
5.6
2
20
15.3
6.1
2
20
15.7
5.4
2
20
18.8
6.2
2
20
16.3
7.7
2
20
17.1
5.3
2
20
18.6
6.6
2
20
16.0
5.3
2
20
16.9
6.5
2
20
16.8
5.9
Following calculations in the previous section, we decided to use 9 paddocks (clusters) per group,
placing 20 calves in each paddock. Those in Grp 2
were controls, and additional fertilisers were added to the Grp 1 paddocks. The calves were weighed
at the beginning of the experiment and 3 months later. The weight gain in Kg was the outcome. The table to the right
shows means and SDs in weight gain from each paddock (cluster). The results are analysed using the two sample t test, with and without adjustments for intraclass correlation (ρ)
Grp
Nclusters
Mean
SD
1
9
20.5222
5.697
2
9
16.8333
6.1229
The overall mean and SD of the two groups are as in the table to the left. The difference between the two means is 3.7Kg,
the Standard Error of the difference is 0.62, and probability of Type I error (α) p<0.0001. These results have not been adjusted by the intraclass correlation coefficient (ρ), so are references only, for comparisons with the final results.
Intraclass Correlation Coefficient, calculated from the data, is ρ = 0.0084.
The adjusted Standard Error of the difference is now 0.67, and the 95% confidence interval of the difference
is 2.27 to 5.11 Kgs. This is the final results, showing a significant difference between the two groups, and we can conclude that adding fertilisers to the feeding paddocks increases the growth of calves.
Please note that, in this example, the correction is so small as to be trivial, because of low ρ value. This is expected as allocation to different paddockes are randomized, and there is not much difference between the paddocks, so there would not be much interaclass correlation.
Options to analyse the data using non-parametric statistical methods: The first and the third columns of the input data, group designations and cluster means in the table above and to the right, can be used for non-parametric statistical tests. These tests can be used as a check and comparison with the adjusted two sample t test, because of uncertainties of normal distribution, or very small sample size within the clusters.
Wilcoxon Mann-Whitney Test shows z=3.4473, p=0.0003, confirming a significant
The Robust Rank Order Test (Mann-Whitney U Test) results in U = 15.9153, p<0.05, confirminga significant difference
Permutation Test shows Type I Error (α) of 0.0032 (1 tail) or 0.0065 (2 tail), confirming significant difference
Example for Two Proportions
The conduct of a cluster randomization exercise comparing two proportions is best demonstrated with the default example data used in both the sample size and analysis program panels. Please note again that the data is computer generated to demonstrate the procedures, and does not represent any real observations.
We wish to conduct an experiment on the effect of introduce a student encouragement protocol into schools to reduce absenteeism,
defined as having missed at least 1 scheduled class in a term.
Given that such a protocol has to be introduced to a whole school, we decide to use the cluster randomization model.
Step 1 : Find ssiz_{individual}
We use the following parameters to obtain the required sample size as if randomization is based on individuals.
Type I Error α = 0.05
Power (1 - β) = 0.8
We estimate the average absenteeism rate in a school is about 30% (0.3), and expect the encouragement protocol to
reduce this to 15% (0.15)
We looked up the sample size requirement table in the sample size for comparing two proportions page, and found that we will require 121 students per group. In other words, ssiz_{individual} s = 121
We decided to carry out a pilot simulation, by examining the absenteeism in a number of schools, and
found the results as in the table to the left (Pos=number with absenteeism present, Neg = number with no absenteeism).
Please note : In a real pilot study, many more clusters would be used to obtain a stable and robust ρ.
n
Mean
SD
100
0.3
0.4606
102
0.2745
0.4485
102
0.3137
0.4663
107
0.3271
0.4714
We used the second program in the sample size panel to calculate
the Intraclass Correlation Coefficient ρ. The program firstly convert the number of positives and negatives into
1s and 0s, then calculate the means and SDs for each cluster, as shown in the table to the right. From this table,
we estimate the Intraclass Correlation Coefficient ρ to be 0.197
Step 3 : Sample Size Adjustment
ssiz_{ind}
ρ
k
m
ssiz_{clus}
121
0.197
30
16
480
121
0.197
29
19
551
121
0.197
28
24
672
121
0.197
27
31
837
121
0.197
26
45
1170
121
0.197
25
84
2100
121
0.197
24
597
14328
k=number of clusters per group m=sample size per cluster ssiz_{clus}=total sample size per group
Although we can use the third or fourth programs of the sample size calculations to
calculate one at a time the required number of individual within each cluster when the number of cluster in each group
is pre-determined, or the number of individuals in each cluster when the number of clusters per group is pre-determined,
we can also use either program to test a range of combination.
Using the third program to determine the number of individuals in each cluster, with a range of numbers of clusters,
we produced the results as shown in the table to the left.
It can be seen that, as the number of schools (clusters) to be included decreases, the number of students per school
(sample size per cluster) increases exponentially. The sample size reaches infinity when the number of cluster
is below 24.
Although the sample size per cluster continues to decrease as the number of clusters increases, the changes in
the total group sample size becomes increasingly minor.
As the main costs of such a program are related to selecting and introducing the encouragement protocol into schools,
the decision can be based on finding the minimum number of schools (clusters) that contain sufficient number of
individuals (students). As most schools have more than 84 students, a reasonable decision can be to have
25 schools (clusters) per group.
Step 4 : Analysis of Data
Grp
N_{Pos}
N_{neg}
Proportion
1
20
116
0.1471
1
9
132
0.0638
1
24
118
0.169
1
25
107
0.1894
1
30
92
0.2459
1
30
73
0.2913
1
22
121
0.1538
1
28
116
0.1944
1
6
136
0.0423
1
27
120
0.1837
1
13
123
0.0956
1
30
93
0.2439
1
19
99
0.161
1
12
113
0.096
1
26
116
0.1831
1
10
109
0.084
1
35
98
0.2632
1
27
117
0.1875
1
18
92
0.1636
1
8
139
0.0544
1
10
96
0.0943
1
6
139
0.0414
1
7
107
0.0614
1
10
110
0.0833
1
21
111
0.1591
2
29
115
0.2014
2
15
98
0.1327
2
35
89
0.2823
2
37
67
0.3558
2
43
94
0.3139
2
43
80
0.3496
2
33
108
0.234
2
40
87
0.315
2
12
103
0.1043
2
39
83
0.3197
2
21
129
0.14
2
43
75
0.3644
2
29
85
0.2544
2
19
124
0.1329
2
39
70
0.3578
2
17
94
0.1532
2
50
78
0.3906
2
40
93
0.3008
2
28
101
0.2171
2
14
88
0.1373
2
17
108
0.136
2
11
138
0.0738
2
13
123
0.0956
2
17
101
0.1441
2
32
76
0.2963
We recruited 50 schools that had at least 84 students each that are available for the study, and randomly divided
the schools into 2 groups. Those in Grp 2 were controls and those in Grp 1 were introduced to the encouragement program.
The number of absentees in one term were collated from each school and presented in the table to the right.
For comparing two proportions, 4 options are available, 3 of which adjusted for intraclass correlation coefficient (ρ), and can be used to draw conclusions from the data
Option 1 : The Two Samples t Test
Grp
Npos
Nneg
Ntotal
Proportion pos
1
473
2793
3266
0.1448
2
716
2407
3123
0.2293
Total
1189
5200
6389
0.1861
The summary table is as shown to the right. The proportions of positives are treated as if it is a measurement, and the mean and Standard Deviations of the two groups estimated. The difference (Mean Prop1 - Mean Prop2) = -0.086,
SE = 0.0247, df = 48, t = -3.4817, p = 0.0011.
Although this shows a significant difference between the two groups, the results should be considered only as preliminary
as no allowance is made of the Intraclass Correlation.
Option 2 : The unadjusted and adjusted Pearson's Chi Squares Test estimates from the numbers of positive and negative outcomes in all the clusters in the two groups.
The Intraclass Correlation Coefficient ρ is calculated from the data. ρ = 0.0425
Unadjusted Chi Sq = 49.7836 df = 1 p <0.0001
Adjusted Chi Sq = 7.721 df = 1 p = 0.0055
The adjusted (corrected by ρ) Chi Square should be used to interpret the results, and this indicates that the proportion of
absenteeism in the two groups are significantly different
Option 3 : Confidence Interval of the Difference
Difference in proportions (Grp1 - Grp2) = -0.0844, Adjusted SE_{diff} = 0.0246
95% CI = Diff ± 1.96SE = -0.1328 to -0.0361
This shows that the 95% confidence interval of the difference in proportion of absenteeism in group 1 is 0.04 (4%) to 0.13 (13%) lower than in group 2. As this range does not cross the null value of 0, we can conclude that it is statistically significant
Option 4 : Confidence Interval of Odds Ratio Between the Two Groups
Odds Ratio = 0.5693, Log(Odds Ratio) LOR = -0.5633
Adjusted (corrected for ρ) SE_{LOR} = 0.1665
95% CI = Exp(LOR-SE) to Exp(LOR + SE) = 0.4108 to 0.789
This is a different expression to Test 4, Odds Ratio instead of difference in proportions. The Odds of
absenteeism from group 1 is 0.41 to 0.79 that from group 2. As this range does not cross the null value of 1, we can concluded the odds of absenteeism in group 1 is significantly lower than group 2.
Options 2, 3, and 4 can all be used to draw conclusions on the data. They performs similar tests, except that the assumed distribution patterns used are different.
Options to analyse the data using non-parametric statistical methods: The group designation and proportion of positives in the table above and to the right, can be used for non-parametric statistical tests. These tests can be used as a check and comparison with the adjusted two sample t test, because of uncertainties of normal distribution, or very small sample size within the clusters.
Wilcoxon Mann-Whitney Test shows z=-2.7456, p=0.0003, confirming a significant difference
The Robust Rank Order Test (Mann-Whitney U Test) results in U = -3.0562, p = 0.0011, confirming significant difference
Permutation Test aborted, the amount of data exceeded capacity of program
Technical Considerations
The adjustment of sample size for individual randomization ssiz_{intividual} by the Intraclass Correlation coefficient
ρ uses two formulae, one to estimate the number of clusters per group needed if the sample size per cluster is pre-determined, and the other the sample size in each cluster needed if the number of cluster is pre-determined.
The formulae for these calculations are obtained from the text book by Pinol et.al. (see references), and
the results are checked against the tables provided in that text book. However the following three points should be noted.
Minor discrepancies in results exists between the calculation from StatsToDo and the statistical tables in
the text book. These are caused by different rounding errors. As sample size are approximate estimates in any case, these
discrepancies can be accepted.
Pinol provided no algorithm for the calculation of ρ and StatsToDo uses algorithms described in the book by
Donner and Klar (see references) for this purpose.
In the calculation of required cluster number or sample size in clusters, results from calculations are real numbers, but
they are rounded upwards to the next integer. For example, using ssiz_{individual} of 121 and ρ of 0.197,
calculations using intra-cluster sample size of 45,50,55,60 will result in required cluster numbers of 25.9, 25.8, 25.6, and
25.5, all rounded up to 26 clusters per group. Users should be aware of this rounding effect and not be confused
by the discrepancies in the results.
All other calculations are based on the text book by Donner and Klar (see references) and the following points should be noted.
The calculations for the Intraclass Correlation Coefficients ρ, both for sample size determination, and for data analysis,
are checked against the examples provided in the text book. Discrepancies exists between results produced by
the program in StatsToDo and those by the text book. However, these discrepancies disappeared if, during
calculation, all intermediary results are rounded to only 3 decimal places. In other words, the authors of the text book
seemed to have calculated by hand to 3 decimal places, while the computer program uses 32 bit number representation to more
than 12 decimal places, and this causes the discrepancies in the results. StatsToDo recommends that results
from both sources be accepted.
The results of data analysis for binomial data from StatsToDo were matched against the example provided
in Donner's text book, and found to be the same except for minor rounding errors as previously described.
Donner's text book provided no data example for the analysis of data using normally distributed measurements, so there is no proof
(matched against known results) that the computer program on this page is correct. However, using computer
generated data, the results obtained by the programs are close to that expected, so the chances are that the algorithms
on this page are correct. However users should be aware of the absence of proof of correctness and
make their own decisions whether to rely on the results.
Javascript Programs Calculations
Sample size
Hints for data entry (Sample Size)
The sample size panel provides 4 programs. The first 2 calculates Intraclass probability, and the last two calculates cample size
Estimate Intraclass Correlation Coefficient ρ
ρ represents correlations between indivuduals within each cluster. This is used to correct the sample size required in cluster randomization. ρ is calculated using data collected in a pilot study
ρ from normally distributed measurements:
The data are summary of measurements, collected from a number of clusters, in a pilot study. It is a matrix where each row is from a cluster, and the 3 columns are n, mean, and SD of data in that cluster. The results are the within and between cluster variance, from which ρ is calulated
ρ from binomially distributed numbers of negative and positive outcomes:
The data are summary of counts, collected from a number of clusters, in a pilot study. It is a matrix where each row is from a cluster, and the 2 columns are numbers of positive and negative outcomes in that cluster. The program converts the binomial probability of positive outcome as mean and SD, from which ρ is calulated
Estimate Sample Size Using pre-estimated sample size for comparing 2 groups and Intraclass Correlation Coefficient ρ
Intraclass Correlation Coefficient ρ: is used to adjust the sample size for using in cluster randomization. ρ can be assigned the value 0 if the researcher is convinced that all cases are truely randomly allocated to clusters and groups, and the environment in all clusters are the same. This however is seldom entirely true, and some sort of pilot study to estimate ρ is usually necessary, using the first two programs to estimate ρ from pilot data
Calculating sample size: Two programs are available.
Calculate sample size from Intraclass Correlation Coefficient ρ and number of cluster. The data is in 3 columns, simple sample size for comparing two groups, ρ, and the number of clusters to use. The program estimate the number of cases to be allocated to each cluster, and therefore the total number of cases required in each group.
Although only a single calculation (single row) is necessary, often placing a number of rows, with multiple options of different number of clusters may be useful to help select the best combination of cluster number and cluster size
Calculate sample size from Intraclass Correlation Coefficient ρ and number of cluster. The data is in 3 columns, simple sample size for comparing two groups, ρ, and the number per clusters (number of cases in each cluster) to use. The program estimate the number of clusters in each group, and therefore the total number of cases required in each group
Although only a single calculation (single row) is necessary, often placing a number of rows, with multiple options of different number in each clusters may be useful to help select the best combination of cluster number and cluster size
Javascript Program (Sample Size)
Data
Calculate Intraclass Correlation Coefficient ρ from clusters of n, mean, and SD - Data a table with 3 columns
- Each row is calculation for a single study
- Col 1 is sample size of cluster
- Col 2 is the mean of cluster
- Col 3 is the Standard Deviation of cluster
Calculate Intraclass Correlation Coefficient ρ from clusters of from clusters of binomial data - Data a table with 3 columns
- Each row is calculation for a single study
- Col 1 is group designation and should be 1 or 2
- Col 2 is the number of positives in the cluster
- Col 3 is the number of negatives in the cluster
Calculate sample size from Intraclass Correlation Coefficient ρ and number of cluster - Data a table with 3 columns
- Each row the data for a study
- Col 1 is sample size per group according to individual randomization
- Col 2 is Intraclass Correlation Coefficient ρ
- Col 3 is number of clusters proposed
Calculate sample size from Intraclass Correlation Coefficient ρ and numbers in each cluster - Data a table with 3 columns
- Each row the data for a study
- Col 1 is sample size per group according to individual randomization
- Col 2 is Intraclass Correlation Coefficient ρ
- Col 3 is sample size within each cluster proposed
Data Analysis
Hints for data entry (Data Analysis)
Data Analysis provides 2 programs, to analyse data collected from clusters and groups
Cluster Analysis Comparing Two Means
The data is from a single study, and consistes of a table with 4 columns
Each row is data from a cluster
Col 1 is group designation. It is usually a number, but can be a name in text. Text must be a single word. Groups are assgned in alphabetical order
Col 2 is sample size in the cluster
Col 3 is the mean of the cluster
Col 4 is the Standard Deviation of the cluster
The program calculates the two sample t test, before and after adjustment by the intraclass correlation coefficient (ρ). The Probability of Type I Error (α, p) is for the two tail test, and can be halved for the one tail probability. p< 0.0001 is shown as p=0
The difference is mean(group 1) - mean (group 2), with the two groups in alphabetical order
α<0.05, or the 95% confidence interval not traversing the null value of 0, can be used to identify that the difference is statistically significant.
The program also produces a table with 2 columns, the group designation and mean for each cluster. This table can be used for non-parametric comparisons using programs in the unpaired difference programs page
Cluster Analysis Comparing Two Proportions
The data is from a single study, and consistes of a table with 3 columns
Each row is data from a cluster
Col 1 is group designation. It is usually a number, but can be a name in text. Text must be a single word. Groups are assgned in alphabetical order
Col 2 is number of positive cases in the cluster
Col 3 is the number of negative cases in the cluster
The program reproduces the data, adding a fourth column, the proportion of positive cases in the cluster p = N_{pos} / (N_{pos} + N_{neg})
The program next performs 3 tests to compare the proportions in the two groups. The 3 tests are similar, but assumes different distribution of data.
The chi squares test, before and after adjustment by intraclass correlation coefficient ρ
The difference in proportions of positive cases, before and after adjustment by intraclass correlation coefficient ρ
The odds ration of positive cases, before and after adjustment by intraclass correlation coefficient ρ
Users can choose which results to present, but the odds ratio seems to be the easiest to understand, and are frequently presented.
The program also produces a table with 2 columns, the group designation and proportion of positive cases for each cluster. This table can be used for non-parametric comparisons using programs in the unpaired difference programs page
Javascript Program (Data Analysis)
Data
Data for Cluster randomization Comparing 2 Means Data is in 4 columns separated by spaces or tabs.
- Each row the data summary from a cluster
- Col 1 is group designation and should be 1 or 2
- Col 2 is the sample size of cluster
- Col 3 is the mean value cluster
- Col 4 is the Standard Deviation value of cluster
Data for Cluster randomization Comparing 2 Proportions Data is in 3 columns separated by spaces or tabs.
- Each row the data summary from a cluster
- Col 1 is group designation and should be 1 or 2
- Col 2 is the number of positives in the cluster
- Col 3 is the number of negatives in the cluster