Home » Tests for Trends in Repeated Cross Sectional Surveys

# Tests for Trends in Repeated Cross Sectional Surveys

The Cochran-Armitage trend test can be used to assess time trends in prevalence of outcomes across repeated cross-sectional surveys.

## Sample size Calculation in Stata

Statistics > Power and Sample Size > Outcome > Binary > Linear Trend in proportions in Jx2 table OR `power trend` Examples follow

Sample size for probability of 0.80, 0.85, 0.9, 0.95 across four surveys

```.wp-block-code {
border: 0;
}

.wp-block-code > span {
display: block;
overflow: auto;
}

.shcb-language {
border: 0;
clip: rect(1px, 1px, 1px, 1px);
-webkit-clip-path: inset(50%);
clip-path: inset(50%);
height: 1px;
margin: -1px;
overflow: hidden;
position: absolute;
width: 1px;
word-wrap: normal;
word-break: normal;
}

.hljs {
box-sizing: border-box;
}

.hljs.shcb-code-table {
display: table;
width: 100%;
}

.hljs.shcb-code-table > .shcb-loc {
color: inherit;
display: table-row;
width: 100%;
}

.hljs.shcb-code-table .shcb-loc > span {
display: table-cell;
}

.wp-block-code code.hljs:not(.shcb-wrap-lines) {
white-space: pre;
}

.wp-block-code code.hljs.shcb-wrap-lines {
white-space: pre-wrap;
}

.hljs.shcb-line-numbers {
border-spacing: 0;
counter-reset: line;
}

.hljs.shcb-line-numbers > .shcb-loc {
counter-increment: line;
}

.hljs.shcb-line-numbers .shcb-loc > span {
}

.hljs.shcb-line-numbers .shcb-loc::before {
border-right: 1px solid #ddd;
content: counter(line);
display: table-cell;
text-align: right;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
white-space: nowrap;
width: 1%;
}
`power trend 0.80 0.85 0.90 0.95, power(0.8) `Code language: Stata (stata)```

## What If there are just two Cross-sectional surveys ?

This situation is akin to comparing two proportions. Once cannot compare trend with just two comparison groups, minimum three are required. The sample size calculations of teh Cochran-Armitage test and two sample proportions comparison using chi-sqaured tests are going to yield same results

``````power trend 0.15  0.1
note: exposure levels are assumed to be equally spaced
Performing iteration ...
Estimated sample size for a trend test
Cochran-Armitage trend test
Ho: b = 0  versus  Ha: b != 0;  logit(p) = a + b*x
Study parameters:
alpha =    0.0500
power =    0.8000
N_g =         2
p1 =    0.1500
p2 =    0.1000
Estimated sample sizes:
N =     1,372
N per group =       686

power twoproportions 0.15  0.1, test(chi2)
Performing iteration ...
Estimated sample sizes for a two-sample proportions test
Pearson's chi-squared test
Ho: p2 = p1  versus  Ha: p2 != p1
Study parameters:
alpha =    0.0500
power =    0.8000
delta =   -0.0500  (difference)
p1 =    0.1500
p2 =    0.1000

Estimated sample sizes:

N =     1,372
N per group =       686```Code language: R (r)```

`logit(pj) = a + bxj `