Helmut
★★★
avatar
Homepage
Vienna, Austria,
2019-12-20 11:17

Posting: # 21006
Views: 800
 

 Run R-packages in the browser [R for BE/BA]

Dear all,

I discovered a site where you can run R-packages in the browser (CRAN, Bioconductor). Useful when traveling. ;-)

Here the link to yesterday’s release of PowerTOST. Navigate to the bottom


Try the PowerTOST package in your browser


and change

help(PowerTOST)

to

sampleN.TOST(CV = 0.3)

click

      Run (Ctrl-Enter)       

to get


+++++++++++ Equivalence test - TOST +++++++++++
            Sample size estimation
-----------------------------------------------
Study design:  2x2 crossover
log-transformed data (multiplicative model)

alpha = 0.05, target power = 0.8
BE margins = 0.8 ... 1.25
True ratio = 0.95,  CV = 0.3

Sample size (total)
 n     power
40   0.815845


The Man pages are available as well (e.g., the one of sampleN.TOST).

Note that there is a runtime limit of 10 seconds. Hence, demanding stuff like

scABEL.ad(CV = 0.3, n = 34, design = "2x2x4")

will not work.

Cheers,
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
Shuanghe
★★  

Spain,
2019-12-20 12:39

@ Helmut
Posting: # 21007
Views: 496
 

 Run R-packages in the browser

Many thanks, Helmut!

Now I can estimate sample size and do some basic plotting on my iPhone! I guess I can show off in the meeting now. :-P

All the best,
Shuanghe
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2019-12-20 13:45

@ Shuanghe
Posting: # 21009
Views: 488
 

 Run R-packages in the browser

Hi Shuanghe,

» Now I can estimate sample size and do some basic plotting on my iPhone!

Didn’t expect plotting to be possible…

x <- pa.ABE(CV = 0.3)
plot(x)


Crazy stuff:

CV  <- c(0.3, 0.4, 0.5, 0.57382)
rc  <- reg_const("USER", r_const = 0.76,
                 CVswitch = 0.4, CVcap = 0.5) # ANVISA < 2016
res <- data.frame(CV = CV, EMA.L = NA, EMA.U = NA,
                  HC.L = NA, HC.U = NA,
                  ANVISA.2015.L = NA, ANVISA.2015.U = NA)
for (i in seq_along(CV)) {
  res[i, 2:3] <- sprintf("%.2f%%", 100*scABEL(CV = CV[i], regulator = "EMA"))
  res[i, 4:5] <- sprintf("%.1f%%", 100*scABEL(CV = CV[i], regulator = "HC"))
  res[i, 6:7] <- sprintf("%.2f%%", 100*scABEL(CV = CV[i], regulator = rc))
}
print(res, row.names = FALSE)


Cheers,
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
ElMaestro
★★★

Belgium?,
2019-12-20 21:49

@ Shuanghe
Posting: # 21010
Views: 448
 

 Run R-packages in the browser

» Now I can estimate sample size and do some basic plotting on my iPhone! I guess I can show off in the meeting now. :-P

Except people will laugh at you for using an iPhone :-D

Le tits now.

Best regards,
ElMaestro
Activity
 Admin contact
20,345 posts in 4,273 threads, 1,402 registered users;
online 4 (1 registered, 3 guests [including 2 identified bots]).
Forum time (Europe/Vienna): 20:32 CET

No one wants to learn from mistakes, but we cannot learn enough
from successes to go beyond the state of the art.    Henry Petroski

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5