cosinor.poptests {cosinor2}R Documentation

Comparison of Cosinor Parameters of Two Populations

Description

Runs the tests that compare MESORs, amplitudes and acrophases of two different populations.

Usage

cosinor.poptests(pop1, pop2)

Arguments

pop1

An object of the population.cosinor.lm class calculated on the first population.

pop2

An object of the population.cosinor.lm class calculated on the second population.

Details

Bingham et al. (1982) describe tests for comparing population MESORs, amplitudes and acrophases. These tests are esentially F-ratios with df1=m1df_1 = m - 1 and df2=Kmdf_2 = K - m, where mm is the number of populations and KK is the total number of subjects. The tests for MESOR, amplitude and acrophase differences respectively are calculated as follows:

FM=j=1mkj(M^jM^)2(m1)σ^M2F_M = \frac{\sum_{j = 1}^{m}k_j(\widehat{M}_j - \widehat{M})^2}{(m-1)\widehat{\sigma}_M^2}

Fϕ=j=1mkjAj2sin2(ϕ^jϕ~)m1σ^β2sin2ϕ~+2σ^βγcosϕ~sinϕ~+σ^γ2cos2ϕ~F_\phi = \frac{\frac{\sum_{j = 1}^{m}k_j A_j^2 * sin^2(\widehat{\phi}_j - \tilde{\phi})}{m - 1}} {\widehat{\sigma}_\beta^2 sin^2\tilde{\phi} + 2\widehat{\sigma}_{\beta \gamma} cos\tilde{\phi}sin\tilde{\phi} + \widehat{\sigma}_\gamma^2 cos^2\tilde{\phi}}

FA=j=1m(A^jA^)2m1σ^β2cos2ϕ^2σ^βγcosϕ^sinϕ^+σ^γ2sin2ϕ^F_A = \frac{\frac{\sum_{j = 1}^{m}(\widehat{A}_j - \widehat{A})^2}{m - 1}}{\widehat{\sigma}^2_\beta cos^2\widehat{\phi} - 2\widehat{\sigma}_{\beta \gamma}cos\widehat{\phi}sin\widehat{\phi} + \widehat{\sigma}^2_\gamma sin^2 \widehat{\phi}}

where M^\widehat{M}, A^\widehat{A} and ϕ^\widehat{\phi} are weighted averages of parameters across populations calculated as:

M^=j=1mkjM^jK\widehat{M} = \frac{\sum_{j = 1}^{m}k_j\widehat{M}_j}{K}

A^=j=1mkjA^jK\widehat{A} = \frac{\sum_{j = 1}^{m}k_j\widehat{A}_j}{K}

ϕ^=j=1mkjϕ^jK\widehat{\phi} = \frac{\sum_{j = 1}^{m}k_j\widehat{\phi}_j}{K}

ϕ~\tilde{\phi} is derived from the following expression:

tan2ϕ~=j=1mkjA^j2sin2ϕ^jj=1mkjA^j2cos2ϕ^jtan 2\tilde{\phi} = \frac{\sum_{j = 1}^{m}k_j\widehat{A}^2_j sin 2\widehat{\phi}_j}{\sum_{j = 1}^{m}k_j\widehat{A}^2_j cos 2\widehat{\phi}_j}

where 2ϕ~2\tilde{\phi} lies between π2-\frac{\pi}{2} and π2\frac{\pi}{2} if the denomanator is positive or between π2\frac{\pi}{2} and 3π2\frac{3\pi}{2} if the denominator is negative, kjk_j is the number of subjects in the jjth population, M^j\widehat{M}_j, A^j\widehat{A}_j and ϕ^j\widehat{\phi}_j are the cosinor parameters of the jjth population and σ^β\widehat{\sigma}_\beta,σ^γ\widehat{\sigma}_\gamma and σ^βγ\widehat{\sigma}_{\beta \gamma} are the estimates of pooled standard deviations (and covariance) calculated as following:

σ^β=j=1m(kj1)σ^βjKm\widehat{\sigma}_\beta = \frac{\sum_{j = 1}^{m} (k_j - 1)\widehat{\sigma}_{\beta_j}}{K - m}

σ^γ=j=1m(kj1)σ^γjKm\widehat{\sigma}_\gamma = \frac{\sum_{j = 1}^{m} (k_j - 1)\widehat{\sigma}_{\gamma_j}}{K - m}

σ^βγ=j=1m(kj1)σ^βjγjKm\widehat{\sigma}_{\beta \gamma} = \frac{\sum_{j = 1}^{m} (k_j - 1)\widehat{\sigma}_{{\beta_j} {\gamma_j}}}{K - m}

where σ^βj\widehat{\sigma}_{\beta_j}, σ^γj\widehat{\sigma}_{\gamma_j} and σ^βjγj\widehat{\sigma}_{{\beta_j} {\gamma_j}} are the standard devations and covariance of β\beta and γ\gamma parameters in the jjth population.

Note

These tests should only be performed on independent samples. If the acrophases of two populations are significantly different, the results of the amplitude difference test are not reliable and should not be interpreted. While it's possible to perform tests which compare more than two populations, this function can only compare two populations.

References

Bingham, C., Arbogast, B., Guillaume Cornélissen, G., Lee, J.K. & Halberg, F. (1982). Inferential Statistical Methods for Estimating and Comparing Cosinor Parameters. Chronobiologia, 9(4), 397-439.

Examples

fit.extraverts<-population.cosinor.lm(data = PA_extraverts, time = PA_time,
period = 24)
fit.introverts<-population.cosinor.lm(data = PA_introverts, time = PA_time,
period = 24)
cosinor.poptests(pop1 = fit.extraverts, pop2 = fit.introverts)

[Package cosinor2 version 0.2.1 Index]