Helmut
★★★
avatar
Homepage
Vienna, Austria,
2019-12-20 12:17
(1582 d 00:46 ago)

Posting: # 21006
Views: 3,728
 

 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
(1581 d 23:25 ago)

@ Helmut
Posting: # 21007
Views: 2,905
 

 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
(1581 d 22:18 ago)

@ Shuanghe
Posting: # 21009
Views: 2,854
 

 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
(1581 d 14:15 ago)

@ Shuanghe
Posting: # 21010
Views: 2,831
 

 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,987 posts in 4,824 threads, 1,664 registered users;
85 visitors (0 registered, 85 guests [including 6 identified bots]).
Forum time: 14:04 CEST (Europe/Vienna)

The only way to comprehend what mathematicians mean by Infinity
is to contemplate the extent of human stupidity.    Voltaire

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