fixed or mixed effects model [BE/BA News]
partly updated script (change below
# aggregate results
). Then:dropouts <- 0
missings <- 0
CV : 0.225
T/R-ratio : 0.95
lower limit : 0.8000
upper limit : 1.2500
power : at least 0.8
alpha : 0.0500
n : 24
data package function subject df method PE lower upper width
balanced stats lm fixed 22 Residual 93.71542 85.34248 102.90983 17.56735
balanced nlme lme random 22 Residual 93.71542 85.34247 102.90983 17.56736
balanced lmerTest lmer random 22 Satterthwaite 93.71542 85.34248 102.90983 17.56735
balanced lmerTest lmer random 22 Kenward-Roger 93.71542 85.34248 102.90983 17.56735
df : degrees of freedom =
n – 2 for Residual, approximated by Satterthwaite and Kenward-Roger
method: df method applied
PE : Point Estimate
lower : lower limit of the 90% CI
upper : upper limit of the 90% CI
dropouts <- 1
missings <- 0
CV : 0.225
T/R-ratio : 0.95
lower limit : 0.8000
upper limit : 1.2500
power : at least 0.8
alpha : 0.0500
n : 24
dropout(s) : 1 (both periods)
data package function subject df method PE lower upper width
imbalanced stats lm fixed 21 Residual 92.9679 84.36634 102.44643 18.08008
imbalanced nlme lme random 21 Residual 92.9679 84.36634 102.44644 18.08010
imbalanced lmerTest lmer random 21 Satterthwaite 92.9679 84.36634 102.44643 18.08008
imbalanced lmerTest lmer random 21 Kenward-Roger 92.9679 84.36634 102.44643 18.08008
df : degrees of freedom =
n – 2 for Residual, approximated by Satterthwaite and Kenward-Roger
method: df method applied
PE : Point Estimate
lower : lower limit of the 90% CI
upper : upper limit of the 90% CI
dropouts <- 1
missings <- 1
CV : 0.225
T/R-ratio : 0.95
lower limit : 0.8000
upper limit : 1.2500
power : at least 0.8
alpha : 0.0500
n : 24
dropout(s) : 1 (both periods)
missing(s) : 1 (second period)
data package function subject df method PE lower upper width
imbal, incompl stats lm fixed 20.0 Residual 92.19586 83.31751 102.02028 18.70277
imbal, incompl nlme lme random 20.0 Residual 92.03122 83.19633 101.80431 18.60798
imbal, incompl lmerTest lmer random 20.2 Satterthwaite 92.03122 83.20136 101.79815 18.59679
imbal, incompl lmerTest lmer random 20.1 Kenward-Roger 92.03122 83.19399 101.80718 18.61319
df : degrees of freedom =
n – 2 for Residual, approximated by Satterthwaite and Kenward-Roger
method: df method applied
PE : Point Estimate
lower : lower limit of the 90% CI
upper : upper limit of the 90% CI
if (dropouts == 0 & missings == 0) {
res <- data.frame(data = rep("balanced", 4),
package = "", FUN = "", subject = "", df = NA_real_,
method = "", PE = NA_real_, lower = NA_real_,
upper = NA_real_, width = NA_real_)
res[1:4, 2:9] <- tmp0
}
if (dropouts > 0 & missings == 0) {
res <- data.frame(data = rep("imbalanced", 4),
package = "", FUN = "", subject = "", df = NA_real_,
method = "", PE = NA_real_, lower = NA_real_,
upper = NA_real_, width = NA_real_)
res[1:4, 2:9] <- tmp1
}
if (dropouts > 0 & missings > 0) {
res <- data.frame(data = rep("imbal, incompl", 4),
package = "", FUN = "", subject = "", df = NA_real_,
method = "", PE = NA_real_, lower = NA_real_,
upper = NA_real_, width = NA_real_)
res[1:4, 2:9] <- tmp2
}
TODO: dropouts == 0 & missings > 0
res[, 5] <- round(res[, 5], 1)
res[, 10] <- res[, 9] - res[, 8]
res[, 7:10] <- round(res[, 7:10], 5)
names(res)[3] <- "function"
t1 <- paste("CV :", sprintf("%.4g", CV),
"\nT/R-ratio :", sprintf("%.4g", theta0),
"\nlower limit :", sprintf("%.4f", theta1),
"\nupper limit :", sprintf("%.4f", theta2),
"\npower : at least", sprintf("%.4g", target),
"\nalpha :", sprintf("%.4f", alpha),
"\nn :", n)
if (dropouts > 0)
t1 <- paste(t1, "\ndropout(s) :", sprintf("%2i", dropouts), "(both periods)")
if (missings > 0)
t1 <- paste(t1, "\nmissing(s) :", sprintf("%2i", missings), "(second period)")
if (!per.effect[2] == 0)
t1 <- paste(t1, "\nperiod effect:", per.effect[2])
if (!carryover[1] == 0 & !carryover[2] == 0)
t1 <- paste(t1, "\ncarryover :", paste(carryover, collapse = ", "))
t1 <- paste(t1, "\n\n")
t2 <- paste("\ndf : degrees of freedom =",
"\n n – 2 for Residual,",
"approximated by Satterthwaite and Kenward-Roger",
"\nmethod: df method applied",
"\nPE : Point Estimate",
"\nlower :",
sprintf("lower limit of the %.4g%% CI", 100*(1-2*alpha)),
"\nupper :",
sprintf("upper limit of the %.4g%% CI\n", 100*(1-2*alpha)))
cat(t1); print(res, row.names = FALSE, right = FALSE); cat(t2)
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:
- ICH M13A: Changes to Step 2
Helmut 2024-07-31 13:16
- ICH M13A: Changes to Step 2 Helmut 2024-07-31 14:19
- AUCres mittyri 2024-08-05 21:08
- ‘Percentage covered’ Helmut 2024-08-05 22:13
- ICH M13A: Changes to Step 2 BEQool 2024-09-09 05:48
- fixed or mixed effects model Helmut 2024-09-09 07:04
- fixed or mixed effects model BEQool 2024-09-09 10:18
- fixed or mixed effects model Helmut 2024-09-09 11:13
- fixed or mixed effects model BEQool 2024-09-10 07:35
- fixed or mixed effects model Helmut 2024-09-09 11:13
- fixed or mixed effects modelHelmut 2024-09-10 08:12
- fixed or mixed effects model BEQool 2024-09-09 10:18
- fixed or mixed effects model Helmut 2024-09-09 07:04
- AUCres mittyri 2024-08-05 21:08
- ICH M13A: Changes to Step 2 Helmut 2024-08-05 12:53
- period within group and formulation mittyri 2024-08-05 20:42
- period within group and formulation Helmut 2024-08-05 22:29
- ICH M13A: Step 4 → 5 Helmut 2024-08-08 11:57
- Formal ICH Procedure Helmut 2024-08-09 09:45
- ICH M13A: Changes to Step 2 Helmut 2024-09-06 08:04
- ICH M13A: Changes to Step 2 Helmut 2024-07-31 14:19