[R-sig-ME] Modelling with uncertain (but not missing) categorical random effect values
Thierry Onkelinx
th|erry@onke||nx @end|ng |rom |nbo@be
Tue Jul 13 13:09:34 CEST 2021
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 using 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 using r-project.org>:
> I have a dataset where I have offspring paternity of females with
> males of different species. However, many of the offspring have
> ambiguous paternity - where I know the offspring must be from
> particular fathers, but not from others. The data currently looks a
> bit like this (but with many more rows per mum_id):
>
> mum_id mum_sp dad_sp dad_id con
>
> Af1 A A Am1 / Am2 1
> Af1 A A Am2 1
> Bf1 B A Am1 / Am2 / Am4 0
> Bf2 B B Bm1 / Bm3 1
>
> Which I have so far run as a binomial GLMM with con (conspecific mating) as
> a binary response, mum_sp and dad_sp (species) as fixed factors and
> mum_id as a random factor - and have just not included dad_id as
> a random factor. The ambiguously assigned fathers in dad_id is also
> non-random, i.e.
> certain individuals are more likely to be ambiguously assigned than
> others, so just leaving these cases as NA is problematic.
>
> For some of the ambiguous assignments, I can also extract
> probabilities that a possible male is the father of the offspring,
> e.g. for the first row, father Am1 is 60% likely to be the father and
> Am2 40% likely.
>
> Are there any approaches where I can include the ambiguous dad_id in
> a GLMM framework? - where the uncertainty of the assignment contributes to
> the
> overall uncertainty in the tested relationship.
>
> Thank you for any suggestions,
> Mike
>
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list