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

Posting: # 21006
Views: 3,714
 

 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
(1579 d 08:39 ago)

@ Helmut
Posting: # 21007
Views: 2,895
 

 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
(1579 d 07:33 ago)

@ Shuanghe
Posting: # 21009
Views: 2,843
 

 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
(1578 d 23:29 ago)

@ Shuanghe
Posting: # 21010
Views: 2,821
 

 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,984 posts in 4,822 threads, 1,652 registered users;
51 visitors (0 registered, 51 guests [including 4 identified bots]).
Forum time: 23:19 CEST (Europe/Vienna)

You can’t fix by analysis
what you bungled by design.    Richard J. Light, Judith D. Singer, John B. Willett

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