Skip to content
Prev 19384 / 20628 Next

Modelling with uncertain (but not missing) categorical random effect values

Dear Michael,

Maybe something like (0 + w_1 | dad_1) + (0 + w_2 | dad_2) + (0 + w_3 |
dad_3). Where w_1 is the probability of dad_1.

Make sure that dad_1, dad_2 and dad_3 are factors with the same levels.
Then INLA allows you to add this as f(dad_1, w_1, model = "iid") + f(dad_2,
w_2, copy = "dad_"1) + f(dad_3, w_3, copy = "dad_1"). So you end up with a
single random intercept for every dad (dad_2 and dad_3 share their
estimates with dad_1).

mum_id  mum_sp  dad_sp dad_id                    con    dad_1   w_1 dad_2
w_ 2 dad_3 w_3

Af1          A              A           Am1 / Am2             1      Am1
0.6   Am2 0.4  NA 0
Af1          A              A           Am2                       1
Am2    1     NA     0     NA 0
Bf1          B             A           Am1 / Am2 / Am4   0      Am1    0.4
 Am2 0.3   Am4 0.3
Bf2          B              B          Bm1 / Bm3              1      Bm1
0.5   Bm2  0.5  NA 0

Best regards,

ir. Thierry Onkelinx
Statisticus / Statistician

Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND
FOREST
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
thierry.onkelinx at inbo.be
Havenlaan 88 bus 73, 1000 Brussel
www.inbo.be

///////////////////////////////////////////////////////////////////////////////////////////
To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey
///////////////////////////////////////////////////////////////////////////////////////////

<https://www.inbo.be>


Op di 13 jul. 2021 om 12:30 schreef Michael Lawson via R-sig-mixed-models <
r-sig-mixed-models at r-project.org>: