Dorota_ ☆ Poland, 2024-11-08 19:35 (182 d 10:28 ago) Posting: # 24266 Views: 1,031 |
|
Hi all, I want to write a Python code for calculating 90% CIs for point estimates in a 2x2 BE setup. As a reference set I chose the NCAResult4BE dataset from Kyun-SeopBae's BE library. When I run the code: be2x2(NCAResult4BE, c("Cmax")) I get the following results: $Cmax$`90% Confidence Interval of Geometric Mean Ratio (T/R)` I can easily replicate them using nlme library: cmax_ = lme(log(Cmax) ~ GRP + PRD + TRT, random = ~1|SUBJ, The problem starts in Python (3.11) and statsmodels (0.14.4). model = smf.mixedlm("np.log(Cmax) ~ C(GRP) + C(PRD) + C(TRT, Treatment('R'))", The results are similar, but not the same: Exponentiated 90% Confidence Interval for 'TreatmentT': Honestly, I have no idea what am I missing. Perhaps someone has stumbled upon a similar issue? Could the rounding be a problem or a model? Is there a way I could fix it? D. |