Helmut
★★★
avatar
Homepage
Vienna, Austria,
2019-12-20 12:17
(1560 d 10:01 ago)

Posting: # 21006
Views: 3,641
 

 Run R-packages in the browser [🇷 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.

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
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 13:39
(1560 d 08:39 ago)

@ Helmut
Posting: # 21007
Views: 2,838
 

 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 14:45
(1560 d 07:33 ago)

@ Shuanghe
Posting: # 21009
Views: 2,785
 

 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)


Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

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

Denmark,
2019-12-20 22:49
(1559 d 23:29 ago)

@ Shuanghe
Posting: # 21010
Views: 2,763
 

 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

Pass or fail!
ElMaestro
UA Flag
Activity
 Admin contact
22,957 posts in 4,819 threads, 1,636 registered users;
80 visitors (0 registered, 80 guests [including 9 identified bots]).
Forum time: 22:18 CET (Europe/Vienna)

Nothing shows a lack of mathematical education more
than an overly precise calculation.    Carl Friedrich Gauß

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