replicateBE solution with interactions [General Sta­tis­tics]

posted by mittyri – Russia, 2019-12-23 14:30 (302 d 14:23 ago) – Posting: # 21020
Views: 3,366

(edited by mittyri on 2019-12-23 15:05)

Dear Nastya,

whenever possible use simple solutions, at least till the moment you must dive into mixed models galaxy ;-)

And more: interaction terms are not the same in SAS and R
take a look at method.B implementation inside replicateBE package
I just modified it a bit

library(replicateBE)
library(nlme)
alpha <- 0.05
options(contrasts=c("contr.treatment","contr.poly"))
Dataset <- rds01
Dataset$group<- factor(ifelse(as.numeric(levels(Dataset$subject))[Dataset$subject]<31, 1,2))
modB <- lme(log(PK) ~ sequence + group + sequence:group + period + period%in%group + treatment, random = ~1 | subject, na.action = na.omit, data = Dataset)

EMA.B <- summary(modB)
PE <- EMA.B$tTable["treatmentT", "Value"] # exp(PE) = 1.157275
CI <- exp(PE + c(-1, +1) * qt(1 - alpha, EMA.B$tTable["treatmentT", "DF"]) * EMA.B$tTable["treatmentT", "Std.Error"])
# CI = 1.071136 1.250340

Kind regards,
Mittyri

Complete thread:

Activity
 Admin contact
21,170 posts in 4,411 threads, 1,474 registered users;
online 6 (0 registered, 6 guests [including 2 identified bots]).
Forum time: Wednesday 05:53 CEST (Europe/Vienna)

But it is in matters beyond the limits of mere rule
that the skill of the analyst is evinced.
He makes in silence a host of observations and inferences…    Edgar Allan Poe

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