Yes, but.... [🇷 for BE/BA]

posted by ElMaestro  – Denmark, 2024-02-23 23:15 (455 d 00:02 ago) – Posting: # 23880
Views: 3,219

(edited on 2024-02-24 00:00)

Hi Mittyri,

❝ may be I misunderstood your


❝ ❝ is not full rank. Neither is does it contain a column for every level of every factor.

❝ The solution you proposed with qr() does not give a column for every level of every factor

> (MakeFullRank(model.matrix(~ f + g)))

❝    Q       

❝ 1  1 0 0 1 0

❝ 2  1 0 1 1 0

❝ 3  1 1 0 0 1

❝ 4  1 0 1 1 0

❝ 5  1 0 0 0 0

❝ 6  1 0 0 0 1

❝ 7  1 0 1 0 0

❝ 8  1 1 0 0 0

❝ 9  1 0 1 1 0

❝ 10 1 1 0 0 0

❝ 11 1 0 0 0 1

❝ 12 1 1 0 0 1


A full rank model matrix means there are not more columns than the rank. Then XtX becomes invertible.
A model matrix with a column for every level of every factor (plus intercept) is not the same. Rather that's redundancy. XtX now becomes trouble :-)
My function creates a full rank model matrix.

Pass or fail!
ElMaestro

Complete thread:

UA Flag
Activity
 Admin contact
23,424 posts in 4,927 threads, 1,683 registered users;
44 visitors (0 registered, 44 guests [including 27 identified bots]).
Forum time: 00:17 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