Answering an unasked question [RSABE / ABEL]
❝ Sometimes it would be helpful to RTFM .
Oh, I did. You will note that I hacked your code of
CVp2CV()
for my function sep2s()
. ❝ Note that the ratio
is here the ratio of variances.
Exactly. But I was interested in the ratio of standard errors instead.
library(PowerTOST)
sep2s <- function(CV, ratio=1) {
sp <- CV2mse(CV)
swt <- sqrt(2)*sqrt(sp)*ratio/sqrt(ratio^2+1)
swr <- sqrt(2)*sqrt(sp)/sqrt(ratio^2+1)
r <- se2CV(c(swt, swr))
return(r)
}
CV <- 0.07
ratio <- 2
r1 <- CVp2CV(CV=CV, ratio=ratio)
mse1 <- CV2mse(r1)
se1 <- CV2se(r1)
r2 <- sep2s(CV=CV, ratio=ratio)
mse2 <- CV2mse(r2)
se2 <- CV2se(r2)
cat("Function CVp2CV()\n",
"CV", CV, "split based on the variance ratio:", signif(r1, 3), "\n",
"variances:", signif(mse1, 3), "ratio:", signif(mse1[1]/mse1[2], 3), "\n",
"standard errors:", signif(se1, 3), "ratio:", signif(se1[1]/se1[2], 3),
"\nFunction sep2s()\n",
"CV", CV, "split based on the SE ratio:", signif(r2, 3), "\n",
"variances:", signif(mse2, 3), "ratio:", signif(mse2[1]/mse2[2], 3), "\n",
"standard errors:", signif(se1, 3), "ratio:", signif(se2[1]/se2[2], 3), "\n")
Which gives:
Function CVp2CV()
CV 0.07 split based on the variance ratio: 0.0809 0.0571
variances: 0.00652 0.00326 ratio: 2
standard errors: 0.0807 0.0571 ratio: 1.41
Function sep2s()
CV 0.07 split based on the SE ratio: 0.0886 0.0442
variances: 0.00782 0.00196 ratio: 4
standard errors: 0.0807 0.0571 ratio: 2
Dif-tor heh smusma 🖖🏼 Довге життя Україна!
Helmut Schütz
The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
Complete thread:
- 3 period full replicate Dr_Dan 2015-06-24 13:55 [RSABE / ABEL]
- 3 period full replicate ElMaestro 2015-06-24 14:11
- 3 period full replicate Helmut 2015-06-24 14:29
- 3 period full replicate d_labes 2015-06-24 14:38
- 3 period full replicate Dr_Dan 2015-06-24 16:43
- 3 period full replicate Helmut 2015-06-24 18:00
- 3 period full replicate ElMaestro 2015-06-24 18:11
- 3 period full replicate Helmut 2015-06-24 18:25
- 3 period full replicate d_labes 2015-06-25 08:52
- 3 period full replicate ElMaestro 2015-06-25 10:37
- 3 period full replicate d_labes 2015-06-25 08:52
- 3 period full replicate Helmut 2015-06-24 18:25
- 3 period full replicate ElMaestro 2015-06-24 18:11
- CVs (borderline OT) Helmut 2015-06-26 13:51
- CVs (R, T) from pooled CV d_labes 2015-07-02 09:09
- Answering an unasked questionHelmut 2015-07-02 13:03
- Answer to an unasked answer d_labes 2015-07-02 14:21
- Bloody typo! Helmut 2015-07-02 14:33
- Answer to an unasked answer d_labes 2015-07-02 14:21
- Answering an unasked questionHelmut 2015-07-02 13:03
- CVs (borderline OT) zizou 2015-07-05 19:20
- Degrees of freedom 3-period full replicate d_labes 2015-07-06 11:10
- Degrees of freedom 3-period full replicate ElMaestro 2015-07-06 11:59
- Degrees of freedom 3-period full replicate d_labes 2015-07-06 13:53
- Degrees of freedom 3-period full replicate zizou 2015-07-06 17:25
- Degrees of freedom 3-period full replicate ElMaestro 2015-07-06 11:59
- Degrees of freedom 3-period full replicate d_labes 2015-07-06 11:10
- CVs (R, T) from pooled CV d_labes 2015-07-02 09:09
- 3 period full replicate Helmut 2015-06-24 18:00
- 3 period full replicate Dr_Dan 2015-06-24 16:43
- The almighty oracle has spoken! Helmut 2015-07-23 23:54
- Almighty oracle's mysterious saying d_labes 2015-07-24 08:23