Helmut
★★★
avatar
Homepage
Vienna, Austria,
2019-12-20 12:17
(1667 d 05:43 ago)

Posting: # 21006
Views: 4,203
 

 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
(1667 d 04:22 ago)

@ Helmut
Posting: # 21007
Views: 3,289
 

 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
(1667 d 03:15 ago)

@ Shuanghe
Posting: # 21009
Views: 3,253
 

 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
(1666 d 19:12 ago)

@ Shuanghe
Posting: # 21010
Views: 3,206
 

 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
23,099 posts in 4,857 threads, 1,647 registered users;
100 visitors (0 registered, 100 guests [including 9 identified bots]).
Forum time: 19:01 CEST (Europe/Vienna)

Imagine if every Thursday your shoes exploded
if you tied them the usual way.
This happens to us all the time with computers,
and nobody thinks of complaining.    Jef Raskin

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