A small point for the code [GxP / QC / QA]

posted by sameep – India, 2022-06-01 15:17 (1086 d 23:31 ago) – Posting: # 23037
Views: 8,741

Dear Helmut,

❝ for (i in 3:n)


Works for all crossover datasets, whereas

❝ for (i in subj:n) {


Works only if the sequence for the first two subjects is the same. If the first two subject's sequences are different (i.e. TR and RT), then it gives the below error, as calculations are not feasible due to zero degree of freedom.

Error in power.TOST(CV = res$CV[i - 1], theta0 = res$PE[i - 1], n = length(unique(tmp$Subject))) :
  n too small. Degrees of freedom <1!
In addition: Warning messages:
1: In qt(a, object$df.residual) : NaNs produced
2: In anova.lm(m) :
  ANOVA F-tests on an essentially perfect fit are unreliable


❝ I was only talking about importing the data from xls(x).


This is what I meant.

❝ I’m still working on the script (in the meantime a monster with 525 lines of code), allowing not only 2×2×2 but also higher-order crossovers. Not fail-safe.


Thanks in advance, looking forward to the goodie.

Regards,
Sameep.

Complete thread:

UA Flag
Activity
 Admin contact
23,424 posts in 4,927 threads, 1,679 registered users;
42 visitors (0 registered, 42 guests [including 25 identified bots]).
Forum time: 14:49 CEST (Europe/Vienna)

Pharmacokinetics may be simply defined as
what the body does to the drug,
as opposed to pharmacodynamics, which may be defined as
what the drug does to the body.    Leslie Z. Benet

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