Skip to content

correlation between random effects

6 messages · Jana Dlouha, Ben Bolker, Thierry Onkelinx

#
Dear Jana,

Please keep the mailing list in cc.

I meant both centering and scaling.

Based on the summary of the model, you have on average 3.7
observations per species, which is a bit small for a random slope
model. What worries me is that the summary of the data indicates
several species with > 20 observation. Hence you will have lot of
species with only 1 or 2 observations. A species with only 2
observations, a small difference in dB1 and a large difference in MC
will likely result in a large random slope for dB1. You'll need to
investigate which species have a strong random slope and why. Most of
the time that is obvious once you plotted the data for that species.
Tip: plot the observations, the fitted values of the model and the
predictions using only the fixed effects.

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
///////////////////////////////////////////////////////////////////////////////////////////




2018-02-13 11:23 GMT+01:00 Jana Dlouha <jana.dlouha at inra.fr>:
#
Dear Thierry,

You are right, some species are represented only by one or two specimens, actually we did not want to use the mixed-effect models but the reviewers of our paper asked us to do that - but if I understand well from what you say, it is maybe not very smart considering the structure of our sample?
I am struggling to know which species is behaving differently - is there any efficient method to visualize that? I have plotted the random effects using plot_model function but not able to change the y_axis in order to be able to read it, with 600 Species everything is overlapped...
Thanks in advance

Jana

-----Message d'origine-----
De?: Thierry Onkelinx [mailto:thierry.onkelinx at inbo.be] 
Envoy??: mardi 13 f?vrier 2018 11:44
??: Jana Dlouha <jana.dlouha at inra.fr>
Cc?: r-sig-mixed-models at r-project.org
Objet?: Re: [R-sig-ME] correlation between random effects

Dear Jana,

Please keep the mailing list in cc.

I meant both centering and scaling.

Based on the summary of the model, you have on average 3.7 observations per species, which is a bit small for a random slope model. What worries me is that the summary of the data indicates several species with > 20 observation. Hence you will have lot of species with only 1 or 2 observations. A species with only 2 observations, a small difference in dB1 and a large difference in MC will likely result in a large random slope for dB1. You'll need to investigate which species have a strong random slope and why. Most of the time that is obvious once you plotted the data for that species.
Tip: plot the observations, the fitted values of the model and the predictions using only the fixed effects.

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 ///////////////////////////////////////////////////////////////////////////////////////////




2018-02-13 11:23 GMT+01:00 Jana Dlouha <jana.dlouha at inra.fr>:
#
you can use as.data.frame(ranef(fitted_model)) to extract the random
effects as a data frame, then do anything you want to look at the most
extreme species ...
On Tue, Feb 13, 2018 at 10:29 AM, Jana Dlouha <jana.dlouha at inra.fr> wrote:
#
I agree with Ben. Look at 20 species with the most extreme random
effects. Plot those, one at a time. See what is happening for those
and decide what would be a sensible way to deal with it. That could be
to alter the model or to remove data which doesn't contain the
information needed by the model. E.g. all species with less than x
observations.

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
///////////////////////////////////////////////////////////////////////////////////////////




2018-02-13 18:34 GMT+01:00 Ben Bolker <bbolker at gmail.com>:
1 day later
#
Hi all again,

Thanks to Thierry and Ben for their advices and sorry to answer so late, I was out of the lab yesterday.

I looked at the 20 species with the most extreme random effects and unfortunately, it is not systematically the least represented species, one has 13 repetitions so I think it is not possible to exclude them based on the quantitative criterion. There are probably some measurement problems but not related specifically to some species or families so...is there any way to handle it? What did you mean by altering the model?

Best regards
Jana


-----Message d'origine-----
De?: Thierry Onkelinx [mailto:thierry.onkelinx at inbo.be] 
Envoy??: mercredi 14 f?vrier 2018 09:47
??: Ben Bolker <bbolker at gmail.com>
Cc?: Jana Dlouha <jana.dlouha at inra.fr>; r-sig-mixed-models at r-project.org
Objet?: Re: [R-sig-ME] correlation between random effects

I agree with Ben. Look at 20 species with the most extreme random effects. Plot those, one at a time. See what is happening for those and decide what would be a sensible way to deal with it. That could be to alter the model or to remove data which doesn't contain the information needed by the model. E.g. all species with less than x observations.

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 ///////////////////////////////////////////////////////////////////////////////////////////




2018-02-13 18:34 GMT+01:00 Ben Bolker <bbolker at gmail.com>:
#
Dear Jana,

Can you provide the data? Without the data we can only hypothesise on
what might be wrong. It will be a lot easier when we can look at the
data ourselves. It is OK to anonymize the data. Or send it privately.

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
///////////////////////////////////////////////////////////////////////////////////////////




2018-02-15 13:48 GMT+01:00 Jana Dlouha <jana.dlouha at inra.fr>: