How to create table of results [Power / Sample Size]
Hi BE-proff,
try this:
you can easily put it inside a little function if the purpose is specifcally to "return" the data frame (as in, a table).
You can make the code totally fancier and totally unreadable by using
try this:
library(PowerTOST)
arrGMR=c(0.85, 0.9, 0.95, 1.0, 1.05, 1.10, 1.15, 1.20)
myCV=0.26
N=arrGMR
for (i in 1:length(arrGMR))
N[i]=sampleN.TOST(theta0=arrGMR[i], CV=myCV, targetpower=0.8) [1,7]
A=data.frame(arrGMR, N)
print(A)
you can easily put it inside a little function if the purpose is specifcally to "return" the data frame (as in, a table).
You can make the code totally fancier and totally unreadable by using
sapply
or some similar function - I am sure this is what the code police recommends.
—
Pass or fail!
ElMaestro
Pass or fail!
ElMaestro
Complete thread:
- How to create table of results BE-proff 2017-07-20 14:09 [Power / Sample Size]
- How to create table of resultsElMaestro 2017-07-20 14:32
- How to create table of results BE-proff 2017-07-20 15:02
- How to create table of sample sizes / powers Helmut 2017-07-20 15:18
- How to create table of sample sizes / powers BE-proff 2017-07-20 16:00
- Symmetrical in log-scale Helmut 2017-07-20 17:12
- Symmetrical in log-scale BE-proff 2017-07-24 11:42
- RTFM Helmut 2017-07-24 18:18
- Symmetrical in log-scale BE-proff 2017-07-24 11:42
- Symmetrical in log-scale Helmut 2017-07-20 17:12
- How to create table of sample sizes / powers BE-proff 2017-07-20 16:00
- How to create table of resultsElMaestro 2017-07-20 14:32