APFlores ☆ Philippines, 2014-06-23 10:14 (3962 d 14:06 ago) Posting: # 13119 Views: 7,930 |
|
Hi! I'm working on an Excel project that would calculate Power for a sequential BE, based on the journal from Potvin, et al. Unfortunately, I couldn't exactly replicate the calculation of Power at stage 1, as the =NORMSDIST(x) function seemed to be incorrect for this purpose. If anyone could give me the equation for the cumulative dist. function for student's t-dist (given x and DF), I will appreciate it very much. Kind regards, Aflores |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2014-06-23 16:08 (3962 d 08:12 ago) @ APFlores Posting: # 13126 Views: 7,158 |
|
Hi Aflores, ❝ I'm working on an Excel project that would calculate Power for a sequential BE, based on the journal from Potvin, et al. […] the =NORMSDIST(x) function seemed to be incorrect for this purpose. Avoid Excel! BTW, you are not interested in the standard normal distribution – the function you are looking for is TINV(p, df) . Potvin et al. claim in their paper to have used the method of Hauschke et al. (1992).1 Note that this is only
method % power I recommend to use the freeware R / package PowerTOST … instead of recreating the wheel in a lousy software.If you are interested in setting up your own simulations (let’s say the T/R-ratio, target power, or acceptance range are not covered in one of the publications) maybe you are interested in this thread. Note that the convergence of empiric α (i.e., simulating at T/R 1.25) is slow. You need 106 simulations to get a stable estimate. Sim’s of empiric power (i.e., simulating at the expected T/R) converge faster; 105 sim’s are sufficient. Results obtained by Power2Stage / function Power.2stage generally agree2 with results reported by Potvin et al. (the few differences might be due to different seeds of the pseudo-random number generator).n1 CV% a b c n1 CV% a b c In simulations with Power.2stage I suggest method="nct" . Results are pretty close to the exact ones, but the code runs much faster. On the other hand the boost in speed by method="shifted" is negligible. The gain in accuracy by method="exact" is not worth the efforts. Comparison on my machine of “Method B”, n1 12, CV 20%; 106 sim’s each:
Method alpha runtime (min) Good luck and happy coding!
— Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
APFlores ☆ Philippines, 2014-06-24 06:40 (3961 d 17:40 ago) @ Helmut Posting: # 13131 Views: 6,911 |
|
Dear Helmut, Thanks sir for your immediate response ![]() BTW, great site! |
ElMaestro ★★★ Denmark, 2014-06-24 11:59 (3961 d 12:21 ago) @ APFlores Posting: # 13132 Views: 6,925 |
|
Hi APFlores, ❝ (...) If anyone could give me the equation for the cumulative dist. function for student's t-dist (given x and DF), I will appreciate it very much. further to Helmut's suggestion and relating to the TINV function which you can use to find critical values: If I recall correctly in Excel you have to specify the probability as 0.1 rather than 0.05 as you would do with certain other stats programs. It has to do with the number of tails considered. — Pass or fail! ElMaestro |
APFlores ☆ Philippines, 2014-06-25 05:03 (3960 d 19:17 ago) @ ElMaestro Posting: # 13139 Views: 6,875 |
|
Dear ElMaestro, Thank you for your input! Since I'm still a long way from learning R coding, I was able to find the correct Excel function Ft(x,DF) from an add-in from EasyfitXL, which is the =StudentCdf. With this I was finally able to replicate Potvin's Example#2 Method B. Optimal n was achieved by tabulating 20 incrementing n's, and using a lookup function to find the lowest >80% power. I admit this method is crude, but for our current purpose, it will probably do. Best regards, Abel. |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2014-06-25 15:58 (3960 d 08:22 ago) @ APFlores Posting: # 13143 Views: 6,916 |
|
Hi Abel, ❝ Since I'm still a long way from learning R coding,… It is not that complicated as it seems. See this post about downloading/installation. In many cases you have to use just one line of code. In the following Potvin’s Example 2; both for Methods B and C. From the ANOVA/GLM you get an MSE of 0.0326336. If the software you are using doesn’t give you the CVintra (18.2%) in the output, you can type mse2CV(0.0326336) and will get 0.1821316 .
![]() For the complete stuff see this presentation. BTW, Potvin et al. aimed at 80% power for the entire framework; in many cases power is higher. Slide 9 shows that for Method B the expected power for 20 subjects and CV 18% is 88.73%. Therefore, you shouldn’t be too worried about drop-outs compromising power. If you want to simulate CV 18.2…%:
— Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
APFlores ☆ Philippines, 2014-06-26 10:38 (3959 d 13:42 ago) @ Helmut Posting: # 13148 Views: 6,806 |
|
Hi Helmut, Good day! Already installed R in my computer. As for PowerTOST, I still need to update my Winzip in order to extract the files. Right now, I'm looking at threads on sample size estimates (n1) for sequential design -- seems that there are a lot of discussions in this area that I still need to read before I post another question ![]() Thanks again and more power (pun intended)! Abel |
yjlee168 ★★★ ![]() ![]() Kaohsiung, Taiwan, 2014-06-26 12:36 (3959 d 11:44 ago) @ APFlores Posting: # 13149 Views: 6,884 |
|
Hi Abel, I don't think that you need Winzip to install any R package. After installing R, open R console and type install.packages("Power2Stage") and then select CRAN mirror that is close to your from pop-up list to install Power2Stage. Done! And then type library(Power2Stage) to load the package first. Next follow Helmut's codes to run it. Not need to know how to do coding stuffs in R too, if you just want to run Power2Stage. If you install Power2Stage this way, it will also install PowerTOST simultaneously for you. If you prefer downloading Power2Stage.zip first from CRAN mirror site; you can open R console and click Packages on the top menu and select Install package(s) from local zip files... and then find your Power2Stage.zip. It will install Power2Stage too. IMHO, I don't recommend this way because it will not install dependent package (if any) simultaneously. If it is the case, you will need to install these dependent packages manually. AFAIK, Power2Stage requires PowerTOST. That means you have to install PowerTOST manually if you have not installed it yet. ❝ ... Already installed R in my computer. As for PowerTOST, I still need to update my Winzip in order to extract the files. — All the best, -- Yung-jin Lee bear v2.9.2:- created by Hsin-ya Lee & Yung-jin Lee Kaohsiung, Taiwan https://www.pkpd168.com/bear Download link (updated) -> here |
APFlores ☆ Philippines, 2014-06-27 10:58 (3958 d 13:22 ago) @ yjlee168 Posting: # 13153 Views: 6,755 |
|
Hi yjlee168, Thanks for the info. I'll be doing your tip later this evening. Best regards. Abel |