Skip to content

multivariate mixed nested model

5 messages · Claudio, Ludovico Frate, Thierry Onkelinx

#
Hi all.
I collected six body features (bf1-bf6)from three populations of a
salamander and from two populations of another sister species of
salamander.
I would evaluate how the species (fixed) and population belonging
(random) affect the body features, by comparing models built with lme4.
For some models, I also want to include bf6 as covariate. Thus, in case
of univariate analyses, some models, for example, could be:
mo1<-lmer(bf1~species+(1|species:population), data, REML=FALSE)
mo2<-lmer(bf1~species+bf6+(1|species:population), data, REML=FALSE)

However, I want to fit multivariate models, and my post is about this.
First, I melted the data:
mdata<-melt(data, id.vars = c("species", "population", "bf6"),
measure.vars = c("bf1", "bf2","bf3","bf4","bf5"), variable.name =
"traits)

Now the question.
1) Are the multivariate versions of the models mo1 and mo2 above
mumo1<-lmer(value~traits -1 + species + (1|species:populations) +
(1|individuals), mdata, REML=FALSE)
mumo1<-lmer(value~traits -1 + species + bf6 + (1|species:populations) +
(1|individuals), mdata, REML=FALSE)

A secondary question, which in case I will move to a new post:
it seemed to me that building multivariate models with MCMCglmm is
easier. However, cbind did not work, even without missing values: to
your knowledge, is there any issue?

thanks in advance
Claudio ?
1 day later
#
Hi Claudio, for multivariate data see the mvabund package as well as the boral package.
Regards,
Ludovico

Ottieni Outlook per Android<https://aka.ms/ghei36>


Da: Claudio
Inviato: sabato 28 gennaio, 16:45
Oggetto: [R-sig-ME] multivariate mixed nested model
A: r-sig-mixed-models at r-project.org

Hi all. I collected six body features (bf1-bf6)from three populations of a salamander and from two populations of another sister species of salamander. I would evaluate how the species (fixed) and population belonging (random) affect the body features, by comparing models built with lme4. For some models, I also want to include bf6 as covariate. Thus, in case of univariate analyses, some models, for example, could be: mo1
#
Hi Ludovico,
thanks for your suggestion. However, it seems that they both deal with
abundance data, while I measured body features.
best regards
Claudio

Il giorno lun, 30/01/2017 alle 06.22 +0000, Ludovico Frate ha scritto:
#
Hi Claudio,

both packages can deal with different family, i.e. poisson and negative binomial for counts, beta for proportion, normal...

Ragards,

Ludovico



Dott. For. Ludovico Frate, Ph.D.

Environmetrics Lab,
Dipartimento di Bioscienze e Territorio - Universit? degli Studi del Molise.
Contrada Fonte Lappone, 86090 - Pesche (IS) - ITALIA.
Cel: ++39 3333767557|Fax: ++39 (0874) 404123
E-mail: frateludovico at gmail.com<mailto:frateludovico at gmail.com>|ludovicofrate at hotmail.it<mailto:ludovicofrate at hotmail.it>
#
Dear Claudio,

I this you need to add the interaction with traits to all the fixed and
random effects. Otherwise you assume that these have the same effect for
each trait. Note that 0 + traits is identical to traits - 1.

mumo1 <- lmer(value~0 + traits + traits:species + (0 +
traits|species:populations) + (0 + traits|individuals), mdata, REML=FALSE)

Your second question needs a reproducible example.

Best regards,

ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium

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

2017-01-28 16:43 GMT+01:00 Claudio <oppela at gmail.com>: