[R-sig-ME] glmmTMB: testing for temporal variation in effect of fixed predictor on response variable

Thierry Onkelinx thierry@onkelinx @ending from inbo@be
Wed Nov 7 16:53:31 CET 2018


Dear Brenna,

Please keep the mailing list in cc.

(1 + fixed|year) fits a random intercept and a random slope along "fixed"
for every "year". Keep in mind that you need enough data to support such a
model. See e.g.
https://www.muscardinus.be/2018/02/highly-correlated-random-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 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 wo 7 nov. 2018 om 14:18 schreef Brenna Levine <levine.brenna.a using gmail.com
>:

> Hi Thierry,
>
> Thanks for your detailed response. I have one fixed effect that is not
> discrete. How should I fit this interaction in this case?
>
> Thanks!
>
> Brenna
>
> On Wed, Nov 7, 2018, 3:35 AM Thierry Onkelinx <thierry.onkelinx using inbo.be
> wrote:
>
>> Dear Brenna,
>>
>> Adding a random effect (1|year:fixed) makes sense, assuming that both
>> year and fixed are discrete. Note that adding this allows for a very
>> liberal temporal variantion by the fixed effect. Each level of the
>> interaction is independent from all other levels.
>>
>> 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 wo 7 nov. 2018 om 00:16 schreef Brenna Levine <
>> levine.brenna.a using gmail.com>:
>>
>>> Dr. Bolker,
>>>
>>> I'm hoping that I might be able to bother you with a quick question. I am
>>> trying to *test whether there is significant temporal variation in the
>>> effect of a fixed predictor on my response variable *with a model in
>>> which
>>> year is specified as a random effect (I have 20 years of data).
>>> Currently,
>>> I am doing this by fitting an interaction between the fixed effect and
>>> the
>>> random effect of year as* (1|year:fixed)* (per a recommendation that I
>>> saw
>>> on RSeek.org at some point and some tips that I have read on this
>>> list-serve), and am testing the significance of this random interaction
>>> with a LRT (i.e., with a model lacking this interaction).
>>>
>>> Could you tell me if (a) (1|year:fixed) is the correct way to specify
>>> this,
>>> and (b) if not, do you have a recommendation for how I should specify
>>> this
>>> interaction to test for temporal variation in the effect of a fixed
>>> predictor on my response variable?
>>>
>>> Thanks.
>>>
>>>         [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> 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