Ask Power - Recent questions
https://webpower.psychstat.org/qanda/questions
Powered by Question2AnswerPower calculation for model with ordinal outcome variable
https://webpower.psychstat.org/qanda/78/power-calculation-for-model-with-ordinal-outcome-variable
<script type="text/javascript" src="../qa-plugin/syntax-highlighter/scripts/shCore.js"></script><script type="text/javascript" src="../qa-plugin/syntax-highlighter/scripts/shAutoloader.js"></script><link type="text/css" rel="stylesheet" href="../qa-plugin/syntax-highlighter/styles/shCoreDefault.css"/><p>Hello,<br><span style="color:#222222; font-family:Helvetica,Arial,sans-serif; font-size:15px">I am conducting a power calculation for a Stan model using brm() (</span><a rel="nofollow" href="https://www.rdocumentation.org/packages/brms/versions/2.12.0/topics/brm">https://www.rdocumentation.org/packages/brms/versions/2.12.0/topics/brm</a>) and wp.regression(). My model <span style="color:#222222; font-family:Helvetica,Arial,sans-serif; font-size:15px">has an ordered factor as the outcome variable and therefore uses family ‘cumulative’. </span><span style="color:#222222; font-family:Helvetica,Arial,sans-serif; font-size:15px">However, I am having trouble calculating the model's R^2 statistic because the function bayes_R2() does not accept input from a model with an ordinal outcome variable / cumulative family type. Is there another way to compute the R^2 statistic for this type of model?</span></p><script type="text/javascript">
var hl_oldOnLoad = window.onload;
window.onload = function(){
if (typeof hl_oldOnLoad == 'function')
hl_oldOnLoad();
SyntaxHighlighter.autoloader(
'applescript ../qa-plugin/syntax-highlighter/scripts/shBrushAppleScript.js',
'actionscript3 as3 ../qa-plugin/syntax-highlighter/scripts/shBrushAS3.js',
'bash shell ../qa-plugin/syntax-highlighter/scripts/shBrushBash.js',
'coldfusion cf ../qa-plugin/syntax-highlighter/scripts/shBrushColdFusion.js',
'cpp c ../qa-plugin/syntax-highlighter/scripts/shBrushCpp.js',
'c# c-sharp csharp ../qa-plugin/syntax-highlighter/scripts/shBrushCSharp.js',
'css ../qa-plugin/syntax-highlighter/scripts/shBrushCss.js',
'delphi pascal ../qa-plugin/syntax-highlighter/scripts/shBrushDelphi.js',
'diff patch pas ../qa-plugin/syntax-highlighter/scripts/shBrushDiff.js',
'erl erlang ../qa-plugin/syntax-highlighter/scripts/shBrushErlang.js',
'groovy ../qa-plugin/syntax-highlighter/scripts/shBrushGroovy.js',
'java ../qa-plugin/syntax-highlighter/scripts/shBrushJava.js',
'jfx javafx ../qa-plugin/syntax-highlighter/scripts/shBrushJavaFX.js',
'js jscript javascript ../qa-plugin/syntax-highlighter/scripts/shBrushJScript.js',
'perl pl ../qa-plugin/syntax-highlighter/scripts/shBrushPerl.js',
'php ../qa-plugin/syntax-highlighter/scripts/shBrushPhp.js',
'text plain ../qa-plugin/syntax-highlighter/scripts/shBrushPlain.js',
'py python ../qa-plugin/syntax-highlighter/scripts/shBrushPython.js',
'ruby rails ror rb ../qa-plugin/syntax-highlighter/scripts/shBrushRuby.js',
'sass scss ../qa-plugin/syntax-highlighter/scripts/shBrushSass.js',
'scala ../qa-plugin/syntax-highlighter/scripts/shBrushScala.js',
'sql ../qa-plugin/syntax-highlighter/scripts/shBrushSql.js',
'vb vbnet ../qa-plugin/syntax-highlighter/scripts/shBrushVb.js',
'xml xhtml xslt html ../qa-plugin/syntax-highlighter/scripts/shBrushXml.js'
);
SyntaxHighlighter.config.stripBrs = true;
SyntaxHighlighter.all()
}
</script>Use of WebPowerhttps://webpower.psychstat.org/qanda/78/power-calculation-for-model-with-ordinal-outcome-variableFri, 01 May 2020 16:06:40 +0000Does wp.regression() alpha parameter specify a one-tailed or two-tailed test?
https://webpower.psychstat.org/qanda/76/does-regression-alpha-parameter-specify-tailed-tailed-test
I am using the function wp.regression() and setting the alpha parameter to 0.05. However it's not clear whether it is computing a one-tailed or two-tailed test. Which test is default, and can I specify that one-tailed is required?Use of WebPowerhttps://webpower.psychstat.org/qanda/76/does-regression-alpha-parameter-specify-tailed-tailed-testFri, 01 May 2020 15:56:27 +0000Effect size in RM ANOVA: f or d?
https://webpower.psychstat.org/qanda/74/effect-size-in-rm-anova-f-or-d
Hi,<br />
<br />
I have been trying to determine the sample size for a repeated measures design with one repeated measures variable with two levels.<br />
<br />
First, I tried with the t-test (<a href="https://webpower.psychstat.org/models/means01/)," rel="nofollow">https://webpower.psychstat.org/models/means01/),</a> with power = 0.80, alpha = 0.05, two sided, type = paired, and a medium effect size of d = 0.50 (I assumed that the effect size was Cohen's d because of the outcome of the analysis and the man page of the R package). The result is n = 33.37, which is consistent with pwr package in R.<br />
<br />
I also tried to replicate the analysis above with a repeated measures ANOVA (<a href="https://webpower.psychstat.org/models/means05/" rel="nofollow">https://webpower.psychstat.org/models/means05/</a>). My understanding is that for a within participants design with one variable with two levels, if parameters are the same the results (i.e., the expected n) should be the same as with the t-test.<br />
<br />
For one group and two measures (that is, only one RM factor with two levels), power = 0.80, type of effect = within, and leaving sample size empty, for a medium effect of Cohen's f = 0.25 (equivalent to a d = 0.50) the outcome is that I would need 127.5 participants. Interestingly, if I enter f = 0.50 the outcome is n = 33.37, as with the t-test.<br />
<br />
It also happens the other way round: in the t-test power analysis, if we introduce d = 0.25 the resulting n is 127.5. Thus, it seems that Cohen's d in the t-test and Cohen's f in the RM ANOVA are the same, when actually they are different (f = d / 2).<br />
<br />
I wonder if I misunderstood the effect size of the RM ANOVA and, instead of f, it is a d, or there is any other difference between the t-test and the RM ANOVA in this particular case. Could you, please, confirm whether in the RM ANOVA we should enter Cohen's f or Cohen's d as effect size? If it's Cohen's f, why the discrepant results between the t-test and the RM ANOVA?<br />
<br />
Thanks for your time.Use of WebPowerhttps://webpower.psychstat.org/qanda/74/effect-size-in-rm-anova-f-or-dThu, 23 Apr 2020 19:16:33 +0000How do i unsubscribe?
https://webpower.psychstat.org/qanda/70/how-do-i-unsubscribe
Hi there, I would like to unsubscribe<br />
<br />
ThanksOther Topicshttps://webpower.psychstat.org/qanda/70/how-do-i-unsubscribeFri, 13 Mar 2020 02:07:34 +0000post hoc power analysis
https://webpower.psychstat.org/qanda/68/post-hoc-power-analysis
Hi<br />
<br />
I tested the simple mediation model in the manual (page 287):<br />
<br />
Initially, I defined the parameter estimates as follows:<br />
<br />
a @ .39 b @ .39 and cp @ 0, but the program gave an error.<br />
<br />
later<br />
<br />
a? .39 b? .39 and cp? 0, but the program gave an error again.<br />
<br />
I gathered data from a small group to determine the sample size for my study (n = 117). Firstly, I analyzed this data. I want to add the parameter estimates I obtained from this analysis as fixed values in the model, and I want to calculate power according to these values.<br />
<br />
@ or ? instead of using *, the program runs, but the parameter estimates on the output page are not what I initially defined; Estimates close to 0.<br />
<br />
What do you suggest in this case? I want to know if I should add to my sample by doing post hoc power analysis.<br />
<br />
Thank you.<br />
<br />
ZeynepUse of WebPowerhttps://webpower.psychstat.org/qanda/68/post-hoc-power-analysisTue, 18 Feb 2020 20:43:46 +0000Please send us the URL to your analysis day=20200207&base=67d262748ad87d3963c776f660248cad so that we can fix it.
https://webpower.psychstat.org/qanda/66/analysis-20200207%26base-67d262748ad87d3963c776f660248cad
Hello,<br />
<br />
I want to calculate power for the 65th model of Dr. Hayes. I used Hayes'symbols. I added following interactions to "Power parameter section":<br />
<br />
a1b3: = a1 * b3<br />
<br />
a1b4: = a1 * b4<br />
<br />
a3b1: = a3 * b1<br />
<br />
a3b3: = a3 * b3<br />
<br />
a3b4: = a3 * b4<br />
<br />
I also added covariance to among the independent variables in the model, described all paths and covariances as "? .10".<br />
<br />
Webpower gives a calculation error. What could be the source of the problem?<br />
<br />
Thank you.Use of WebPowerhttps://webpower.psychstat.org/qanda/66/analysis-20200207%26base-67d262748ad87d3963c776f660248cadFri, 07 Feb 2020 14:32:10 +0000Sample Size for binomial distribution
https://webpower.psychstat.org/qanda/63/sample-size-for-binomial-distribution
<p>Scenario:</p><p>Sensitivity of HCV test is .995 (result is binary, positive/negative)</p><p>Power .9</p><p>Precision .01</p><p>Prevalence is .01</p><p>Alpha .05</p><p>How many people do I have to screen at the 95% and then at the 99% CI to establish the sensitivity of 99.5%?</p>Other Topicshttps://webpower.psychstat.org/qanda/63/sample-size-for-binomial-distributionTue, 25 Jun 2019 20:44:58 +0000Citing Cohen et al for calculation of effect size in 3 arm CRT
https://webpower.psychstat.org/qanda/60/citing-cohen-et-al-for-calculation-of-effect-size-in-3-arm-crt
<p><span style="font-size:12px"><span style="font-family:Times New Roman,Times,serif">Hi, i</span></span><span style="font-size:12px"><span style="font-family:Times New Roman,Times,serif">s the effect size calculation for 3-arm cluster randomized trial as outlined in "Practical Statistical Power Analysis using WebPower and R" based on Cohen d calculation for effect sizes? I ask because I need to outline that information in my writing, together with citing your work. Please advise.</span></span></p>FAQhttps://webpower.psychstat.org/qanda/60/citing-cohen-et-al-for-calculation-of-effect-size-in-3-arm-crtSun, 28 Apr 2019 23:28:42 +0000Effect-size ANOVA equation
https://webpower.psychstat.org/qanda/59/effect-size-anova-equation
<p></p><p><span lang="EN-US" style="color:#333333; font-family:"Arial",sans-serif; mso-ansi-language:EN-US">Dear</span></p><p style="font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2; text-align:start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-style: initial; text-decoration-color: initial;word-spacing:0px"><span lang="EN-US" style="color:#333333; font-family:"Arial",sans-serif; mso-ansi-language:EN-US">Firstly, I congratulate the initiative on facilitating the analysis of the data through the website. </span></p><p style="font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2; text-align:start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-style: initial; text-decoration-color: initial;word-spacing:0px"><span lang="EN-US" style="color:#333333; font-family:"Arial",sans-serif; mso-ansi-language:EN-US">I want to analyze the size of the effect through the link</span><span style="color:#333333; font-family:"Arial",sans-serif"><a rel="nofollow" href="https://webpower.psychstat.org/models/means03/effectsize.php"><span lang="EN-US" style="color:#0782c1; mso-ansi-language:EN-US"> site https://webpower.psychstat.org/models/means03/effectsize.php</span></a></span><span lang="EN-US" style="color:#333333; font-family:"Arial",sans-serif; mso-ansi-language:EN-US"></span></p><p style="font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2; text-align:start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-style: initial; text-decoration-color: initial;word-spacing:0px"><span lang="EN-US" style="color:#333333; font-family:"Arial",sans-serif; mso-ansi-language:EN-US">Could you offer information on the equation applied in the link?</span></p><p style="font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2; text-align:start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-style: initial; text-decoration-color: initial;word-spacing:0px"><span lang="EN-US" style="color:#333333; font-family:"Arial",sans-serif; mso-ansi-language:EN-US"> </span></p><p style="font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2; text-align:start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-style: initial; text-decoration-color: initial;word-spacing:0px"><span style="color:#333333; font-family:"Arial",sans-serif">Sincerely</span></p><p></p>Other Topicshttps://webpower.psychstat.org/qanda/59/effect-size-anova-equationThu, 04 Apr 2019 19:07:43 +0000Effect Size for 3-arm cluster randomized trial
https://webpower.psychstat.org/qanda/58/effect-size-for-3-arm-cluster-randomized-trial
Hi,<br />
<br />
I am in the process of calculating the effect size for a 3-arm cluster randomized trial. I was successful in calculating it using your software. However, I would like to see the equations that enabled the calculation, so I can repeat it in SAS and references for the equations as I need it for a paper I am writing.<br />
<br />
Thanks!Use of WebPowerhttps://webpower.psychstat.org/qanda/58/effect-size-for-3-arm-cluster-randomized-trialSun, 17 Mar 2019 08:35:08 +0000Representing interaction terms in montecarlo SEM power
https://webpower.psychstat.org/qanda/57/representing-interaction-terms-in-montecarlo-sem-power
Hello,<br />
<br />
I've been rethinking my previous question and I think, I would be able to solve that one if I knew how to represent interaction terms between exogenous variables with lavaan based syntax for a sem montecarlo power estimation.<br />
<br />
Is there anyway I can do it?<br />
<br />
For example when dealing with moderated mediation?Use of WebPowerhttps://webpower.psychstat.org/qanda/57/representing-interaction-terms-in-montecarlo-sem-powerTue, 05 Mar 2019 16:37:41 +0000Sample size for a 3-way moderation and moderated mediation
https://webpower.psychstat.org/qanda/55/sample-size-for-a-3-way-moderation-and-moderated-mediation
Good morning,<br />
<br />
Could you please help me out in a setting a template (R syntax) to simulate power at various sample sizes for<br />
<br />
mod3 <- '<br />
# Model 3 PROCESS Hayes - 3way interaction<br />
# XW, XZ, WZ, XWZ are products of predictors/moderators<br />
Y ~ b1*X + b2*W + b3*Z + b4*XW + b5*XZ + b6*WZ + b7* XWZ<br />
'<br />
fit<-lavaan::sem(mod3, df, se = "boot")<br />
<br />
X, W and Y are continouse<br />
Z is a 2 level factor, coding experimental conditions (treatment vs control)<br />
<br />
I fitted this model on pilot study data where a 3way interaction was hypothesized. Of course I had to manually compute product variables for interaction terms<br />
<br />
Now I'd like to run a sample size simulation for an other study, where both Z and W will be experimental conditions (2x2 between subjects) and the effect size is expected to by small-medium.<br />
I can't figure out, how to handle the fact that XZ, XW, ZW, XWZ are not distinct measured variables but products.<br />
<br />
I'd appreciate your help in sorting this out.<br />
<br />
The lab i'm working in, deals with (in Andrew Hayes PROCESS terminology) moderations (model1 and 3), simple mediation (model4 - that's easy), and moderated mediations (model 7 and model 14).<br />
<br />
I'd love to sort out a workable simulation template for doing sample size calculations at (conservatively) low effect sizes.<br />
<br />
Thank youUse of WebPowerhttps://webpower.psychstat.org/qanda/55/sample-size-for-a-3-way-moderation-and-moderated-mediationTue, 05 Mar 2019 11:22:48 +0000multilevel modeling power analysis
https://webpower.psychstat.org/qanda/52/multilevel-modeling-power-analysis
Hi, I have a two-level nested-design dataset for power analysis. Level 1 represent goals we have subjects listed; level 2 represent differences between individuals. So it is goal nested in person design. The tricky thing is that we do not have treatment/control group; all variables are continuous. Not sure if wecan use WebPower to calculate power.Use of WebPowerhttps://webpower.psychstat.org/qanda/52/multilevel-modeling-power-analysisSat, 29 Sep 2018 17:06:48 +0000accounting for clustered data
https://webpower.psychstat.org/qanda/48/accounting-for-clustered-data
Hi! I'd like to do a power analysis for latent-variable path model (SEM). I will be using clustered data (assessment scores from about 260 children who were in clusters of about 6 children per classroom). I plan to use the option in Mplus to adjust standard errors for clustering, as I'd like to avoid multilevel modeling. Is there a way to account for this clustered data in webpower? Thank you!Use of WebPowerhttps://webpower.psychstat.org/qanda/48/accounting-for-clustered-dataMon, 30 Jul 2018 20:42:06 +0000multivariate skewness and kurtosis online calculation excel file cant be open
https://webpower.psychstat.org/qanda/45/multivariate-skewness-kurtosis-online-calculation-excel
<p>
Hi,</p>
<p>
I have used this webpower to test skewness and kurtosis using the online calculator before. However, since yesterday, my excel file uploaded, when click calculate, it shows <strong>'can't open file'.</strong></p>
<p>
What is causing this? How can i measure my data normality?</p>
<p>
Hope someone can assist me here. Thanks</p>Report bugs/errorshttps://webpower.psychstat.org/qanda/45/multivariate-skewness-kurtosis-online-calculation-excelThu, 17 May 2018 02:44:17 +0000How to perform a post hoc test after completed one-way ANOVA with binary data
https://webpower.psychstat.org/qanda/41/how-perform-post-test-after-completed-anova-with-binary-data
<p class="p1">
<span class="s1">After completed a one-way ANOVA with binary data from the study "</span><span class="s2">Statistical Power Analysis for One-way ANOVA with Binary or Count Data</span><span class="s1">" we would like to performe a post hoc test. Do you have any recommendations for post hoc tests that would be suitable?<span class="Apple-converted-space"> </span></span></p>
<p class="p2">
</p>
<p class="p1">
<span class="s1">Many thanks,<span class="Apple-converted-space"> </span></span></p>
<p class="p1">
<span class="s1">Felicia<span class="Apple-converted-space"> </span></span></p>Other Topicshttps://webpower.psychstat.org/qanda/41/how-perform-post-test-after-completed-anova-with-binary-dataSat, 21 Apr 2018 15:41:14 +0000Could you please guide me in calculating skewness and kurtosis (Mardia's multivariate coefficient): load data, etc
https://webpower.psychstat.org/qanda/37/calculating-skewness-kurtosis-multivariate-coefficient
I have been struggling to upload my data to enable me calculate mulitivariate normality using Mardia's coefficient. Could you please guide or help me with instructions on how to do this?<br />
<br />
<br />
<br />
Many thanks,<br />
<br />
<br />
<br />
SwalaUse of WebPowerhttps://webpower.psychstat.org/qanda/37/calculating-skewness-kurtosis-multivariate-coefficientSun, 27 Aug 2017 00:17:28 +0000Where can I download the WebPower package for R?
https://webpower.psychstat.org/qanda/30/where-can-i-download-the-webpower-package-for-r
I would like to download the WebPower package so that I can incorporate the power analysis code directly into my R scripts. Is this possible or does it only run on a server? If it is possible where I download the package?Use of WebPowerhttps://webpower.psychstat.org/qanda/30/where-can-i-download-the-webpower-package-for-rThu, 20 Apr 2017 21:04:34 +0000A link is provided for a pdf of the power curve, even if the pdf is empty.
https://webpower.psychstat.org/qanda/24/link-provided-for-pdf-of-the-power-curve-even-if-the-pdf-empty
When getting used to using the software, I tried to ask for a power curve while only one sample size value was provided (laterI figured out that the user has to provide multiple sample sizes for the plot). A link for a power curve pdf shows up in the results, however it will not open because the pdf has no pages.Report bugs/errorshttps://webpower.psychstat.org/qanda/24/link-provided-for-pdf-of-the-power-curve-even-if-the-pdf-emptyThu, 05 May 2016 14:59:47 +0000But why you equalize S with the standard error (S.E.)?
https://webpower.psychstat.org/qanda/22/but-why-you-equalize-s-with-the-standard-error-s-e
In the formulae of Sp, S_1^2 and S_2^2 it refers to standard deviation of each population, why you equalize to the standard error?. <br />
<br />
Thanks for your time Johnny!!!Use of WebPowerhttps://webpower.psychstat.org/qanda/22/but-why-you-equalize-s-with-the-standard-error-s-eMon, 14 Mar 2016 08:08:57 +0000but in that case, where do I put the mean values of my samples?
https://webpower.psychstat.org/qanda/18/but-in-that-case-where-do-i-put-the-mean-values-of-my-samples
<p>
Thanks Johnny<span style="font-family: Segoe UI, Segoe UI Web Regular, Segoe UI Symbol, Helvetica Neue, BBAlpha Sans, S60 Sans, Arial, sans-serif; color: #444444;"><span style="font-size: 15px; line-height: 21.3px;">!....but, If I leave the effect size blank, where do I put the values of my means and the standard deviation?. </span></span></p>Use of WebPowerhttps://webpower.psychstat.org/qanda/18/but-in-that-case-where-do-i-put-the-mean-values-of-my-samplesThu, 10 Mar 2016 14:47:48 +0000Can I estimate the detectable differences with Web Power?
https://webpower.psychstat.org/qanda/16/can-i-estimate-the-detectable-differences-with-web-power
<p>
Hello, Im trying to perform a post-hoc analysis to estimate the detectable differences (percentage difference of detectable</p>
<div>
treatment means relative to control means) for a = 0.05 and a power of 80%. Does Web Power do this?...I have been</div>
<div>
</div>
<div>
trying but cant find the correct way. Want to estimate the detectable differences of a t-test (two tailed).</div>
<div>
</div>
<div>
If anyone can help me it would be great!!</div>
<div>
</div>
<div>
My data are:</div>
<div>
</div>
<div>
sample 1) N= 16; mean= 122.4; S.E ± 8.38</div>
<div>
Sample 2) N = 20; mean= 111.4; S.E. ± 6.35</div>
<div>
</div>
<div>
Thanks in advance!</div>
<div>
</div>
<div>
Matías</div>Use of WebPowerhttps://webpower.psychstat.org/qanda/16/can-i-estimate-the-detectable-differences-with-web-powerThu, 10 Mar 2016 13:48:04 +0000How to cite WebPower
https://webpower.psychstat.org/qanda/15/how-to-cite-webpower
<p>
If you would like to cite WebPower, please use the following:</p>
<p>
</p>
<blockquote>
<p>
Zhang, Z., & Yuan, K.-H. (2018). <em>Practical Statistical Power Analysis Using Webpower and R</em> (Eds). Granger, IN: ISDSA Press. [https://webpower.psychstat.org]</p>
</blockquote>FAQhttps://webpower.psychstat.org/qanda/15/how-to-cite-webpowerFri, 08 May 2015 01:26:02 +0000How to register to be a user?
https://webpower.psychstat.org/qanda/13/how-to-register-to-be-a-user
FAQhttps://webpower.psychstat.org/qanda/13/how-to-register-to-be-a-userTue, 04 Nov 2014 12:16:08 +0000How to start a new power analysis?
https://webpower.psychstat.org/qanda/11/how-to-start-a-new-power-analysis
How to use WebPower to start a new power analysis?FAQhttps://webpower.psychstat.org/qanda/11/how-to-start-a-new-power-analysisTue, 04 Nov 2014 12:11:34 +0000How do I calculate sample size using a power
https://webpower.psychstat.org/qanda/9/how-do-i-calculate-sample-size-using-a-power
Use of WebPowerhttps://webpower.psychstat.org/qanda/9/how-do-i-calculate-sample-size-using-a-powerTue, 23 Sep 2014 15:55:11 +0000How to use Q & A?
https://webpower.psychstat.org/qanda/7/how-to-use-q-%26-a
First, use informative question.FAQhttps://webpower.psychstat.org/qanda/7/how-to-use-q-%26-aThu, 10 Apr 2014 14:21:22 +0000