Hi,
I am currently doing an analysis of population differences in behavioural variation across a temperature gradient. Here, individuals from 2 populations were repeatedly tested at both a Low temperature (3 repeated measures) and a high temperature (3 repeated measures).
A simplified example of my dataset is as follows:
ID Pop Temp_measured Temp_treatment Trial Behaviour
1 A 25.1 Low 1 603
1 A 28.2 High 2 927
1 A 24.8 Low 3 715
1 A 27.4 High 4 1068
1 A 25.0 Low 5 541
1 A 28.1 High 6 854
2 B 25.0 Low 1 733
2 B 28.1 High 2 813
etc.
One of the things I am interested in investigating is the residual variance of each Population (A or B) at each temperature treatment (Low or High). I have therefore fit something similar to the following model using the brms
package:
Behaviour ~ Pop*scale(Temp_measured)+
scale(Trial)+
(scale(Temp_measured)|gr(ID, by = Pop)),
sigma ~ 0 + Pop*Temp_treatment, family = gaussian)
From this model, I get the following output under Population-Level Effects:
Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
sigma_PopA 5.51 0.07 5.49 5.73 1.00 8353 8811
sigma_PopB 6.22 0.11 6.07 6.51 1.00 6080 7977
sigma_Temp_treatmentLow 0.39 0.09 0.18 0.53 1.00 8325 9092
sigma_PopB:Temp_treatmentLow -0.72 0.13 -0.89 -0.43 1.00 8253 9088
My questions are:
-
Am I correct in that
sigma_PopA
andsigma_PopB
represent the residual variation (on the log scale) for population A and B, respectively, at the High temperature treatment? -
Also, is there a simple way to extract the residual variance for each population at the ‘Low’ temperature treatment? Is it a case of combining the posterior distributions?
For example, something like…
Vresid_PopB_Low <- exp(posterior_samples(Model)$"b_sigma_PopB")^2 + exp(posterior_samples(Model)$"b_sigma_PopB:Temp_treatmentLow")^2
Any help or guidance would be greatly appreciated!
Many thanks!