Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Effect size / sample size / power calculation


From   Miranda Kim <[email protected]>
To   [email protected]
Subject   Re: st: Effect size / sample size / power calculation
Date   Thu, 07 Jan 2010 15:39:15 +0000

Thank you Paul
BW
Miranda

E. Paul Wileyto wrote:
The formula to get standardized effect size  for a one sample test is:

. di sqrt((invnorm(.975)+invnorm(.9))^2)/sqrt(150)
.26466864

But actually, I cheated and used PASS software.

P




Miranda Kim wrote:
Thank you for your responses Steve and Paul. I will illustrate my problem with an example…

For example, previous research on a given association yields a correlation coefficient 0.41 with p-value 0.131 and n=15.

Initially I was looking at what sample size n would be required to have 90% power to detect a correlation coefficient 0.41 using a test at the 5% level of significance.

I used the fact that the correlation coefficient of two variables with unit standard deviation is the same as the regression coefficient between those two variables.

So in effect, I wish to perform a sample size calculation for a regression coefficient of two variables with unit standard deviation. In this case the standard error of the regression coefficient is sqrt((1-(b*b))/(n-2)), so standard deviation of the regression coefficient is approximately sqrt(1-(b*b)).

For this example, this gives a standard deviation of 0.91.

I then used the command

sampsi 0.41 0, p(0.9) sd(0.91) onesam

which yielded n=52.

I now know that I will have approximately n=150 in the study, and want to know how this affects this correlation coefficient at 90% power and 80% power (5% significance)?

I have a dataset with approximately 20 correlation coefficients, so I was hoping to automate the calculation.

Paul, what formula did you use to obtain 0.265 in your response?

Best wishes and many thanks for your help,

Miranda



[email protected] wrote:
Miranda,

 -sampsi- is not the right command to do the initial calculation, for
the effect size  for multiple linear regression is not beta, but

delta  = r/sqrt( 1 - r^2)

where r = partial correlation of   Y  and X, adjusted for the other
predictors Z.
and beta =   r SD(X|Z) /SD(Y|Z))

To solve for the detectable beta, use  Russ Lenth's online Java
calculator (Linear regression) at:
http://www.stat.uiowa.edu/%7Erlenth/Power/ . You have to enter the
Variance Inflation Factor VIF.
ding, since the

-Steve

On Wed, Jan 6, 2010 at 9:27 AM, Miranda Kim <[email protected]> wrote:
Could anyone help me with this...
To detect a regression coefficient of 0.41 with standard deviation 0.91 I can compute a sample size (using a 5% level of significance with 90% power)
with the following command:
sampsi 0.41 0, p(0.9) sd(0.91) onesam
How could I work out what regression coefficient (effect size) is detectable
with a sample size of 150, based on this information?
I need to do this with about 20 regression coefficients.
I am using stata 11.
Many thanks,
Miranda

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index