help sampsi_rho -------------------------------------------------------------------------------

Title

Calculates Sample Size or Power for Pearson Correlation

Syntax

sampsi_rho [, options]

options Description ------------------------------------------------------------------------- Main null(#) specifies the null value of the Pearson correlation, the default is 0. alt(#) specifies the alternative value of the correlation, the default is 0.5. n1(#) specifies the sample size, the default is 100. alpha(#) specifies the significance level, the default is 0.05. power(#) specifies the power, the default is 0.9. solve() specifies whether to calculate the sample size or the power, the default is n. onesided specifies whether the alternative hypothesis is onesided, the default is a two-sided test. -------------------------------------------------------------------------

Description

sampsi_rho calculates either the sample size or power for a Pearson correlation. The formula for sample size is ((Za+Zb)/(delta))^2 + 3 where delta is the difference between test value and the null value, Za is the signficance Z-value and Zb is the power Z-value. The correlations are transformed using the Fisher z transformation 1/2ln((1+rho)/(1-rho)) this z is normally distributed with a standard deviation of 1/sqrt(N-3).

Options

+------+ ----+ Main +-------------------------------------------------------------

null(#) specifies the null value of the Pearson correlation, the default is 0.

alt(#) specifies the alternative value of the correlation, the default is 0.5.

n1(#) specifies the sample size, the default is 100.

alpha(#) specifies the significance level, the default is 0.05.

power(#) specifies the power, the default is 0.9.

solve() specifies whether to calculate the sample size or the power, the default is n.

onesided specifies whether the alternative hypothesis is onesided, the default is a two-sided test.

Examples

sampsi_rho

sampsi_rho, solve(power)

sampsi_rho, solve(power) n(10) alt(0.2)

sampsi_rho, p(0.8) onesided

Author

Adrian Mander, MRC Biostatistics Unit, Cambridge, UK.

Email adrian.mander@mrc-bsu.cam.ac.uk

See Also

Related commands:

sampsi (if installed) samplesize (if installed) ssc install samplesize (to install this command) sampsi_reg (if installed) ssc install sampsi_reg (to install this command) sampsi_mcc (if installed) ssc install sampsi_mcc (to install this command)