You are on page 1of 5

1

TECHNICAL NOTE

Use of a Spreadsheet Program for Circadian


Analysis of Biological/Physiological Data

LIONEL BOURDON, M.D., M.S., ALAIN BUGUET, M.D., Ph.D.,


Mict-tEL CUCHERAT, M.D., MS., and MANNY W. RADOMSKI,
Ph.D.

BOURDON L, BUGUET A, CUCHERAT M, RADOMSKI MW. Use of a Computer programs have been developed (3,7) to per
spreadsheet program for circadian analysis of biological/ph ysiologi form cosinor analysis of 24-h data, but few are easily
cat data. Aviat Space Environ Med 1995; 66:787—91.
Biological/physiological data sampled over a period of 24 h can be accessible to the general physiologist without significant
subjected to a mathematical analysis to determine the presence of circa mathematical or computer support, and none is inte
dian rhythmicity. Several procedures have been proposed, most being grated into an easy-to-use and readily-available statisti
complex. To render such an analysis simpler and easy to use by non- cal package on a personal computer. Because of their
mathematicians, we developed and tested the cosinor technique using
a commonly available commercial spreadsheet (Excel®). It can be used
simplicity, spreadsheet programs are extensively used in
to analyze equally or unequally time-spaced data over 24 h with missing handling and analyzing scientific data (6,10). In this pa
data, as well as to calculate the significance and the main limit of per, we describe the use of a commercially available
the resultant circadian rhythm (mesor, amplitude, acrophase and their spreadsheet program (Microsoft Excel®) for the analysis
confidence limits). Examples of its application to hourly samples of of two simplified single-cosinor models of circadian data.
plasma cortisol and minute-by-minute rectal temperatures are shown.
This spreadsheet program has been used in our labora
tories to analyze evenly time-spaced data by conven
ARIOUS PHYSIOLOGICAL functions follow rhyth
V mic variations. The mathematical approach to these
rhythms is often complex. Several methods have been
tional calculations (5,8), as well as unevenly spaced time
samples by using the solver function of the spreadsheet.
Our program only requires a simple knowledge of
proposed. The first mathematical analysis used by chro spreadsheet applications.
nobiologists to analyze for circadian rhythms in experi
mental data collected over 24 h was the cosinor tech
Methods
nique, in which the data are represented by the best fit
ting cosine function using the “least squares” calculation The analysis of 24-h rhythms with the cosinor tech
(5,9). The main limitation of this technique results from nique implies that the data are best fitted by a sine curve
the assumption that the studied rhythm fits a sine curve. (3,8), following the equation:
To overcome this limitation, more powerful procedures
were perfected (1—3). Unfortunately, those procedures yi = M + Asin(wti + q,) Eq. 1
are not easy for non-mathematicians to use. Moreover,
where:
accuracy of the rhythm parameters is not always re
• yi is the value of the measured variable at time t1;
quired to have an overview of a time series or to assess
• M is the mean 24-hour value, or mesor, of y through
the effect of a rhythm on the interpretation of statistical
out a complete cycle;
measurements (4). In such cases, the single-cosinor tech
nique may still provide useful information on biological
rhythms (9). From the Centre de recherches du Service de sante des armées Emite
The resultant characteristics produced by such an anal Fardé, BP 87, F-38702 La Tronche Cedex, France (L. Bourdon, A. Buguet,
ysis are as follows: M. Cucherat); and Defence and Civil Institute of Environmental Medi
cine, P.O. Box 2000, North York, Ontario, M3M 3B9, Canada (M. W.
• the ‘mesor’ or 24-h mean value of the data around Radomski).
which the curve oscillates; This manuscript was received for review in April 1994. It was revised
• the ‘amplitude’ of the cosine curve on either side of in October and November and accepted for pubtication in November
the mesor; and 1994.
Address reprint requests to: Dr. L. Bourdon, CRSSA-BEE, BP 87,
• the ‘acrophase’ of the curve which is the time at 38702 La Tronche Cedex, France.
which the highest value encountered in the cycle Reprint & Copyright © by Aerospace Medical Association, Mexan
occurs. dria, VA.

Aviation, Space, and Environmental Medicine Vol. 66, No. 8 August 1995 787
PROGRAM FOR ANALYSIS Of RHYTHMS—BOURDON ET AL.

Al B IC ID lEt F I G IHI I I J I K C I M [ N I 01 P1 01 R IS
i C SPREADSHEET FOR COSINOR RHYTBMOMETRY
- RESULTS and STATISTICS CALCUI.ATION HEW
4
5 obs.
ConventIonal
caic.±confid.Iim,
Solver
caic.
I
Average = 208,175 208,175 3537,14 -1,2E-16 -3,5E-17 -20,6011 -65,4268 208,175
3537,14
-

Count= 24 Stand.error= 116,233 E.S.M.= 23.726


6 0,26181 0,2618 Max. value = 400 Mm. value = 34,3 Range = 182,85 0 = 3,44663
7 Mesor = 208 18 20818 ± 6 126 208 175 dab ConventIonal method Solver method
8 Amplit.= 182,85 137,19 ± 48,352
9 Acroph. 16,835 ± 1,37583
137,187
16,8348
N° time
U
data
Yi
calc. val. squar.
yl (Yi-yiY2 Xi Zi
[ Yi*Zi
caic. val. squar.
yi (Yi-yi)
10 k= 2 = 41,202 41,2013 1 0 285 166,973 13930,4 1 0 285 0 166,974 13930,2
1 1 - 21 = 2,08 y= -130.85 -130,854 2 1 165 134,509 929,675 0,96593 0,25882 159,378 42,7051 134,51 929,633
12 - f(2,21)= 3,47 RSS= 84891,3 84891,3 3 2 110 107,066 8,60756 0,86603 0.5 95,2628 55 107,067 8,60472
13 - fcalc. = 27,9 a2 = 4042,44 4042,44 4 3 91 86,5133 20,1309 0,70711 0,70711 64,3467 64,3467 86,5135 20,1288
14 GRAPR 5 4 73 74,2514 1,56604 0,5 0,86603 36,5 63,2199 74,2514 1,56598
15 6 5 65 71,1162 37,4085 0,25882 0,96593 16,8232 62,7852 71,116 37,4051
16 -
7 6 53,5 77,3214 567,46 6jE-17
400 1 3,3E-15 53,5 77,3209 567,435
17 -
8 7 41,8 92,444 2564,82 -0,25882 0,96593 -10,8186 40,3757 92,4433 2564,75
1 8 350 9 8 34,3 115,454 6585,89 -0.5 0,86603 -17,15 29,7047 115,453 6585,76
1 9 10 9 98 144,782 2188,54 -0,70711 0,70711 -69,2965 69,2965 144,781 2188,45
20 300 11 10 200 178,43 465,253 -0,86603 0,5 -173,205 100 178,429 465,294
21 12 11 336 214,106 14858,2 -0,96593 0,25882 -324,551 86,9632 214,105 14858,4
22 250
13 12 206,6 249,377 1829,86 -1 1,2E-16 -206,6 2,5E-14 249,376 1829,81
23 14 13 348 261,841 4377,07 -0,96593 -0,25882 -336,142 -90,069 281,84 4377,15
24
200
15 14 375 309,284 4318,61 -0,86603 -0,5 -324,76 -187,5 309,283 4318,66
25 16 15 400 329,837 4922,88 -0,70711 -0,70711, -282,843 -282,843 329.837 4922,9
150
26 17 16 293 342,099 2410,67 -0,5 -0,86603 -146,5 -253,745 342,099 2410,68
27 18 17 254 345,234 8323,6 -0,25882 -0,96593 -65,74 -245,345 345,234 8323,67
28 19 18 313,8 339,029 636,482 -1,SE-16 -1 -5,8E-14 -313,8 339,029 636,513
29 20 19 246,6 323,906 5976,21 0,25882 -0,96593 63,8248 -238,197 323,907 5976,34
30 21 20 248,6 300,896 2734,92 0,5 -0,86603 124,3 -215,294 300,897 2735,02
31 22 21 346 271,568 5540,1 0,70711 -0,70711 244,659 -244,659 271,569 5539,94
32 0 1 0 20 30 23 22 249 237,92 122,772 0,86603 -0,5 215,64 -124,5 237,921 122,749
33 24 23 163 202,244 1540,11 0,96593 -0,25882 157,446 42.1875 202,245 1540,19
: I
Fig. 1. Example of a typical layout on a Microsoft Excel 4® spreadsheet for a Macintosh®
microcomputer. The data, calculations, results and
graphics are displayed simultaneously on the screen for a time-series of 24 equally-time-spaced
(hourly) plasma cortisol measurements in a healthy
human volunteer. Rhythm parameters are shown as: w = period, A = amplitude and A
= acrophase. cb (cell Q6) is the phase calculated
solver which appeared in cell R6. Abbreviations are: S.E.M. = standard error of mean; by the
S.D. = standard deviation of the data; Obs. = observed
value; calc. = calculated value; for 3, y, RSS, o, Y, yi, Xj, Z, see text.

• A is the amplitude of the sine curve on either side with: /3 = A cos (4)); y = —A sin (4)) and x1 = cos (w ti);
of M (half the difference between the highest and Zi = sin (w t)
-

lowest calculated values); Equation (3) is linear for /3 and y, and can be fitted to
• w is the angular frequency. When the cycle duration the experimental data by the conventional least-squares
is imposed (24-h for a circadian rhythm), w is con regression analysis. With the cosinor technique, and y
stant and equal to 2 H/N, with N equal to the num /3
can be directly calculated to minimize the mean distance
ber of units in a complete cycle (w = 2ir/24 in circa between each Y1 (measured data) and yi (calculated data)
dian rhythm if time is expressed in hours); [i.e., to minimize the residual sum of squares (RSS)J:
• 4) is the phase, expressed in trigonometric units;
• A4) is the acrophase or phase angle of the maximum RSS = [Yi — yil2 Eq. 4
value which can be transferred into clock-time (time
at which the highest value encountered in the cycle with n = number of observations throughout a complete
occurs); cycle.
The parameters to be calculated from this model are M, If the data have been obtained at regular intervals
A, and 4). throughout the cycle, M equals the mean value of all
To facilitate the application of this statistical model, data points, and /3 and y are given by simple equations
the above equation can be expressed as follows (9): (8):
y M + A cos (w cos () — A-sin (w t) -sin

(4’) Eq. 2 M = [Y] /3 (2/n)- txi-Yi] -i’ = (2/n)’ [zi-Yi] Eq.5
which can be rewritten as:
In these conditions, A and A4) are deduced from the
yi = M + /3Xi + y.zi Eq. 3 equations defining /3 and y.

788 Aviation, Space, and Environmental Medicine • Vol. 66, No. 8 August 7995
PROGRAM FOR ANALYSIS OF RHYTHMS—BOURDON ET AL.
37,2 dence limits of A can be calculated from confidence limits
of 3 and y. When the samples are equally time-spaced,
the confidence area of these two parameters is a circular
area centered on the (/3, y) coordinates on a rectangular
37 (/3, y) and polar (A, 4)) representation of rhythm parame
ter estimates (8). This circular confidence area contains
0 all the points (/3*, y*) such as:
(4/n)a2Fi-, (13* 3)2 + (* y)2

Eq. 9 —

36,8
where fi- is the (1 a)th percentile of an F-distribution

with (2, n — 3) degrees of freedom. The diameter of


this circle is equal to the distance (d) between the two
solutions of the equation (10) or (lObis):
36,6
for y = y: (3 13)2 = (4/n)u2fi- Eq. II]
orfor/3* = 13: (y —
)2
= (4/n) 2fi- Eq. lObis
The resolution of these equations gives d:
36,4
d =

Therefore, confidence limits of A are:


36,2 A ± d/2

0 6 12 78 24 and confidence limits of A4) are:


± arcsin (d/(2*A))/w.
relative time (h, 0 isi 2:00 h am)
fig. 2. Example of unevenly spaced data for rectal temperatures ana Description and Use of the Spreadsheet Program
lysed over 24-h analyzed by both the conventional technique (continu
ous line) applied to hourly averages of the data, and the solver (dashed The spreadsheet program used to solve the above
line) technique applied to the raw data. No significant differences were equations is the 4.0 release of Excel® software package
found between the two analysis techniques. (Microsoft Corporation) for Macintosh® (Apple Com
puter, mc). This program can display both data and
= (132
graphics simultaneously on the same screen. An example
A + y2)1 A4 = (arctan (y/t3) + p)/ Eq. 6 of application of the cosinor technique to equally time-
where A4) depends also on another phase factor: p = spaced data using the spreadsheet program is shown in
kir/2 with k equal to —2, —1, 0, +1, according to the Fig. 1. The data presented here are hourly plasma cortisol
signs of /3 and y (8). values calculated over 24 h in a healthy human volunteer.
Calculations of Xi, z, and Y1, used in equation (5) are The measured plasma cortisol levels (Y) are shown in
facilitated by the copy/paste function in the spreadsheet cells 110:133 over 24 h (t, 110:133) along with the calcu
program (Fig. 1). lated values for the best-fit cosine curve. This program
When the samples are not equally-spaced, the calcula printout shows a calculated F value of 27.9, indicating
tion of t3 and y is more complicated (3,8). However, in that the data exhibit a significant circadian rhythm. The
recent spreadsheet programs, the solver function of the corresponding mesor, amplitude, and acrophase for this
spreadsheet can be used to calculate A and 4) directly. rhythm are shown in the block titled “RESULTS and
The solver function searches for the values of A and 4) STATISTICS,” calculated by both the conventional and
to minimize RSS by using a stepwise technique, known solver techniques. As the data are equally-spaced hourly
as the Newton’s algorithm. With this technique, the pe data, both techniques give the same values for M and A.
riod of the cycle can also be calculated and not imposed However, A4) differs by a multiple of a quarter of the
at 24 hours. Therefore, any data series with missing val rhythm period (i.e., 6 h in the case of a circadian rhythm).
ues can be subjected to a circadian analysis in the data. The use of the ‘k’ constant allows us to fit A4) to the
Although the solver can use unevenly spaced samples, data. In Fig. 2, both the cosinor and solver methods were
calculations of the confidence limits of M, A and 4) are applied to rectal temperature measured over 24 h. No
more easily performed when samples are equally-spaced significant difference was found between the two tech
(8). Confidence limits of M, A and 4) can be calculated niques as they apply to unequally spaced data, confirm
from the residual variance g2: ing the validity of our analysis.
The corresponding formulas (Appendix A) and pro-
= RSS/(n 3) Eq.
gramming steps required to set up the program embed

with RSS obtained from equation (4). In the case of ded in the worksheet (Fig. 1) are shown in Fig. 3. To use
equally-spaced data, confidence limits of M will be: the solver function, the operator defines RSS as the target
M ± (tI—a/2)
(2/)l/2
Eq. 8
value which must be minimized and cells with M (G7),
A (G8) and 4) (R6) as the cells to be modified in the solver
where ti•-iz is the (1 a/2)th percentile of the t-disfribu
— box (Fig. 3). Then, he just has to click on the (Resolve)
tion for n 3 degrees of freedom (8). Therefore, confi

window. There should be no differences between the two

Aviation, Space, and Environmental Medicine • Vol. 66, No. S • August 1995 789
PROGRAM FOR ANALYSIS OF RHYTHMS—BOURDON ET AL.

AfBIcIDIEIFIGIHIIIJIKILIMINI0IPIQIRIS
‘t
- [ SPREADSHEET FOR COSINOR RUYTHMOMETRY J -

3 - RESWIIS and STATISTiCS CALCULATION FIELD -

4 - Conventional Solver Average = f5 F6 f7 F8 F9 P10 FlI P12 F13


5 - ohs. calc.±confid.ljm, nile. Count= f14 SLand.error= F17 E.S.M.= FIS -

6 = f24 I P25 Max. value = f15 Mm. value = F16 Range = P19 4) =
3,44663
7 - Meant = F5 F6 ± I f3 1 208,18 — data Conventlonat method Solver method -

8 - Aniplic= P19 f28 ± F32 137,19 N° time darn calc.val. squar. calc.val. squar. -

9 - Acroph. = F29 ± P33 F30 Ii Yi yi (Yi-yi)2 Xi Zi YitXi Yi*Zi yi fYi-yi)2


10 k= 1 13= F26 F34 1 0 285 F20 F22 Fl F2 F3 F4 F21 F23
11 - t21= 2,08 ‘y= P27 F35 2 1 165 F20 F22 Fl F2 F3 F4 P21 F23 -

12 F(2,21)= 3,47 RSS= F36 F37 3 2 110 F20 P22 Fl P2 F3]F4 f21 F23
13 - Fcalc.=! P40 a2=I P38 F39 4 3 91 P20 P22 Fl P2 F3 F4 F21 F23 -

1 4 - GRAPU 5 4 73 P20 F22 Fl P2 P3 F4 P21 P23


1 5 6 5 65 P20 F22 Fl P2 P3 F4 P21 F23
7 6 53,5 P20 F22 Fl P2 P3 P4 F21 P23 -
--
- 410
1 7 8 7 41,8 P20 F22 Fl F2 P3 f4 F21 P23
i - 360 9 8 34,3 P20 F22 Fl P2 F3 P4 P21 F23 -

1 9 0 ‘‘ 10 9 98 P20 P22 Fl F2 F3 P4 P21 F23


20 310 11 10 200 P20 P22 Fl P2 F3 F4 P21 P23
21 : ‘, 12 11 336 P20 P22 Fl F2 P3 P4 P21 F23
- 260 13 12 206,6 P20 P22 P1 F2 P3 P4 P21 P23 -

23 $ 14 13 348 P20 P22 P1 P2 F3 f4 P21 F23


210 0
14 375 F20 F22 Fl F2 P3 P4 P21 P23
24 15
16 15 400 P20 P22 Fl P2 P3 P4 F21 F23 -
--
- 1 60
26 17 16 293 f20 P22 Fl F2 P3 F4 P21 P23
i - 1 10 18 17 254 P20 P22 Fl P2 F3 F4 P21 P23 -

28 19 18 313,8 P20 F22 Fl F2 P3 P4 P21 F23 -

29 - 60 20 246,6 P20 P22 Ft P2 Fl F4 F P23 -

30 21 20 248,6 P20 F22 P1 P2 P3 F4 P21 F23


31 1 0 I 22 21 346 P20 1 P22 Fl P2 P3 P4 P21 F23
- 0 6 1 2 1 8 24 23 22 249 P20 P22 j Fl P2 F3 P4 P21 F23 -

33 - 24 23 163 P20 P22 I P1 P2 F3 F4 P21 P23 -

II I I —

fig. 3. The spreadsheet is shown with the actual cell formulas tFx: [Exceix formulaj) embedded in a spreadsheet for calculation of the data shown
in Fig. 1. N is the number of units in a complete cycle, n is the number of samples, and x is the line number of the cell in the sheet. The formulae
are given in Appendix A.

techniques in the case of equally spaced data. In the case [=AVERAGE(K10:K[n+91)l F7: t=’AVERAGE(L10:Ltn+9])l — P8:
[=AVERAGE(M10:M[n+9J)J —‘ F9: [=AVERAGE(N30:Ntn+9])l —‘
of unequally spaced samples or missing data, the FlO: t=AVERAGE(O10:O[n+91)l —‘ Fli:
“solver” method is easier to use for a non-mathemati l=AVERAGE(P10:P[n+91)
cian. A similar version for Windows® (Microsoft Corpo —‘ P12: [=AVERAGE(Q10:Qln+9])l — F13:

ration) can be used exactly in the same way on IBM [=AVERAGE(R10:R[n+91)]; ff4: I =COUNT(J10:Jtn+9l)]; P15:
microcomputers and compatibles. [=MAX(J10:J[n+9])I; P16: [=MIN(J10:J[n+9J)]; Ff7:
I =STDV(J10:J[n+9J)]; P18: [=$M$5/SQRT($J$5)]; F19:
Conclusion [=($J$6—$M$6)/2]; P20: [=$J$4+$F$10*$Mx+$F$11$Nxl; f21:
I =$G$7+$G$8’SIN($G$6”Ix+$R$6)J; F22: [=($Jx—Kx)’($Jx--Kx)] —
The Excel® spreadsheet program for the cosinor analy P23: [=($Jx_Qx)*($Jx_Qx)l; f24: [=2PI0/NJ; F25: t=$D$6l; F26:
sis described in this paper provides a simple method to [=2$O$4]; F27: t=2$P$41; F28: I ‘SQRT($F$10’$f$10+$F$1 1”$F$l 1)];
physiologists who wish to establish the presence of a F29: [=(ATAN($f$31/$F$lO) + $C$10*PI0/2)/$D$6]; F30:
[‘ (ATAN($C$1 I /$G$10) +$C$10’Pl0/2)/$G$6]; F31:
rhythm in physiological data or to compare rhythms cal j=$C$1 I SQRT($D$7/$J$5)]; F32: I =SQRT($C$12*$F$13*4/$J$5)]; f33:
culated from different variables (9). It requires minimal I =ASIN($P$8/$D$8)/$D$6I; f34: I —$G$8’SIN($R$6)l; F35:
mathematical and computer programming skills, and it [=$G$8C0S($RS6)J; f36: I=$L$4’SJ$5I; f37: [=$R$4$J$5J; F38:
can deal with either equally time-spaced data or variable [=F$12/($JS5—3)l —‘ F39: lG$12/($J$5—3)]; F40:
[=$J$5($D58$D58)/(4$F$13)l;
intervals between measures with missing data points.
The conventional cosinor technique is used in the former The sign ‘—“ between two formulas means that the second formula
case, the solver method in the latter. Copies of this pro can be obtained by copying (copy/paste function of the spreadsheet)
gram on Macintosh discs are available on request from the formula in the first cell to the second cell.
the prime author. In this example, the cell to be defined by the solver is G12 (RSS) and
the cells to be changed are G7 (M), CS (A) and R6 (th).
APPENDIX A. EXCELa FORMULAE.
ACKNOWLEDGMENTS
Fl: [=COS($D$6$Ix)]; f2: [=SU’sJ($D$6$tx)I; F3: [=Mx$Jx]; Pt: The authors are indebted to Prof. Pascal Bogui and Dr. Alain Mont
t=Nx$Jxl; F5: t=AVERAGE(J10:JIn+9I)l —, P6: mayeur for their assistance in data collection.

790 Aviation, Space, and Environmental Medicine Vol. 66, No. 8 • August 1995
PROGRAM FOR ANALYSIS OF RHYTHMS—BOURDON ET AL.
REFERENCES 6. Kibby MR. Spreadsheet statistics. CABIOS 1986; 2:151—7.
1. Brown EN, Czeisler CA. The statistical analysis of circadian phase 7. Monk TH, Fort A. “Cosina”: a cosine curve fitting program suitable
and amplitude in constant-routine core-temperature data. 1 Biol for small computer. mt j Chronobiol 1983; 8:193—224.
Rhythms 1992; 7:177—202. 8. Nelson W, Tong YL, Lee JK, Halberg F. Methods for cosinor
2. DOrrscheidt GJ, Beck L. Advanced methods for evaluating charac rhythmometry. Chronobiologia 1979; 6:305—23.
teristics parameters (r, a, p) of circadian rhythms. J Math Biol 9. Smolender J, Harma M, Lindquist A, Kolari P, Laitinen LA.
1975; 2:107—21. Circadian variation in peripheral blood flow in relation to
3. Faure A, Nemoz C, Claustrat B. A graphical and statistical tech core temperature at rest. Eur J App! Physiol 1993; 67:
nique for investigation of time series in chronobiology according 192—6.
to cosinor procedure. Comput Biol Med 1990; 20:319—29, 10. Sundqvist C, Enkvist K. The use of LOTUS 1-2-3 in statistics. Com
4. Fuentes-Arderiu X, Rivera-Coll A. Impact of circadian rhythms on put Biol Med 1987; 17:395—9.
the interpretation of stat measurements. Clin Chim Acta 1993; 11. Zulley J, Wever R, Aschoff J. The dependence of onset and duration
214:113—8. of sleep on the circadian rhythm of rectal temperature. Pfluegers
5. Halberg F. Chronobiology. Ann Rev Physiol 1969; 31:675—725. Arch 1981; 391 :314—6.

Aviation, Space, and Environmental Medicine Vol. 66, No. 8 August 1995 791

You might also like