[R-sig-ME] Interpretation of lme output with correlation structure specification

Bansal, Udita udit@@b@n@@l17 @ending from imperi@l@@c@uk
Mon Aug 13 17:56:46 CEST 2018


Thank you all for your response. I will try and explain a bit about my study and model and then maybe you can suggest why I get an error when I try to get confidence intervals for the coefficients in my original model.

I am studying the effects of temperature and precipitation across years on the breeding season of a particular bird for which I have data from three different populations. I have the following columns in my dataset:

  1.  Laying date of nest: Date when the clutch was completed for each nest, in Julian days starting from January of each year
  2.  Pre-laying period average temperature: Average temperature for a 30-day period prior to the laying date of each nest
  3.  Pre-laying period average precipitation: Average precipitation for a 30-day period prior to the laying date of each nest
  4.  Population: factor with 3 levels
  5.  Month: month for each laying date (goes from March to July usually)
  6.  Year: 1988-1994, 1994-2017 with a few missing years

My model looks as follows:

lme_m2 <- lme(LD_julian_day ~ prelaying_tmean + prelaying_prec_mean
                 + prelaying_tmean*prelaying_prec_mean + population
                 + prelaying_prec_mean*population + prelaying_tmean*population
                 + prelaying_prec_mean*prelaying_tmean*population,
                 random = ~1|month/year,
                 correlation = corARMA(0.7623, ~1|month/year, 1, 0, fixed = F),
                 data = plovers, method = "ML")

If I use ~1|year/month, it runs the model but throws an error as follows :

Error in intervals.lme(lme_m2) :
  cannot get confidence intervals on var-cov components: Non-positive definite approximate variance-covariance
Consider 'which = "fixed"

Since I want estimates of the random effects as well, I am not putting in which= fixed. If this is just something the package does then I can go ahead without confidence intervals.

Thanks
Udita

From: Guillaume Adeux <guillaumesimon.a2 using gmail.com>
Date: Monday, 13 August 2018 at 2:31 PM
To: "Bansal, Udita" <udita.bansal17 using imperial.ac.uk>
Subject: Re: [R-sig-ME] Interpretation of lme output with correlation structure specification

Indeed your original model makes more sense.
~1|year/month expants to 1|year + 1|year:month (a random intercept for each year plus for each month in each year)
whereas
~1|month/year expands to 1|month +1|month:year (here the random intercept for month will be the same for January 2016 or 2017)
Depending on how a variable is coded, it can be crossed or nested but here "month" has the same levels all the different years, so it has to be nested.
Cheers,
GA2

2018-08-13 11:41 GMT+02:00 Bansal, Udita <udita.bansal17 using imperial.ac.uk<mailto:udita.bansal17 using imperial.ac.uk>>:
Also, in continuation of my previous mail, I found that the error is thrown for intervals() if the model is not correct.

My original model included: ~1|year/month (doesn’t give confidence intervals)
The new model: ~1|month/year (gives me the confidence intervals)

Original model: looks at variation when going from one year to another (~1|year intercept), and whether the effect of going from one month to another changes for different years (~1|month %in% year intercept).

New model: looks at variation when going from one month to another (~1|month), and whether the effect of going from one year to another changes for different months (~1| year %in% month).

To me, the original model makes more sense. Am I not interpreting it correctly? I used the Pinheiro and Bates book for this but maybe I am not getting it right.

Anybody has any understanding on this?

Thanks
Udita

From: <mensurationist using gmail.com<mailto:mensurationist using gmail.com>> on behalf of Andrew Robinson <A.Robinson using ms.unimelb.edu.au<mailto:A.Robinson using ms.unimelb.edu.au>>
Date: Monday, 13 August 2018 at 12:04 AM
To: "Bansal, Udita" <udita.bansal17 using imperial.ac.uk<mailto:udita.bansal17 using imperial.ac.uk>>
Cc: "r-sig-mixed-models using r-project.org<mailto:r-sig-mixed-models using r-project.org>" <r-sig-mixed-models using r-project.org<mailto:r-sig-mixed-models using r-project.org>>
Subject: Re: [R-sig-ME] Interpretation of lme output with correlation structure specification

Hi Udita,

Q1 Yes.  The correlation is taken into account in the model.

Q2 I am not sure that I know what you mean by that.  I tend to leave the value blank and it then gets estimated in the algorithm.

Cheers,

Andrew


On 12 August 2018 at 19:45, Bansal, Udita <udita.bansal17 using imperial.ac.uk<mailto:udita.bansal17 using imperial.ac.uk><mailto:udita.bansal17 using imperial.ac.uk<mailto:udita.bansal17 using imperial.ac.uk>>> wrote:
Dear Andrew,

Thank you for suggesting the book. I went through the relevant parts of the book which helped me clarify my third question.

But I still am not clear on phi. What I understood is that it is the within group correlation (which is solved by the model?) whose value ranges from -1 to 1. What I didn’t understand is as follows:
Q1: Is any value of phi acceptable since it is the correlation of the within group observations which is taken into account by the model?
Q2: The AR1 parameter estimate (the “value”) I provide while specifying the model is calculated based on AR model. How does the phi value relate with that? The book did not say much on it.

Any help will be appreciated!

Thanks
Udita Bansal

From: Andrew Robinson <apro using unimelb.edu.au<mailto:apro using unimelb.edu.au><mailto:apro using unimelb.edu.au<mailto:apro using unimelb.edu.au>>>
Date: Saturday, 11 August 2018 at 11:16 PM
To: "r-sig-mixed-models using r-project.org<mailto:r-sig-mixed-models using r-project.org><mailto:r-sig-mixed-models using r-project.org<mailto:r-sig-mixed-models using r-project.org>>" <r-sig-mixed-models using r-project.org<mailto:r-sig-mixed-models using r-project.org><mailto:r-sig-mixed-models using r-project.org<mailto:r-sig-mixed-models using r-project.org>>>, "Bansal, Udita" <udita.bansal17 using imperial.ac.uk<mailto:udita.bansal17 using imperial.ac.uk><mailto:udita.bansal17 using imperial.ac.uk<mailto:udita.bansal17 using imperial.ac.uk>>>
Subject: Re: [R-sig-ME] Interpretation of lme output with correlation structure specification


Hi Udita,

You should read the book cited in the package. It’s really worthwhile.

Best wishes,

Andrew

--
Andrew Robinson
Director, CEBRA, School of BioSciences
Reader & Associate Professor in Applied Statistics Tel: (+61) 0403 138 955
School of Mathematics and Statistics Fax: (+61) 03 8344 4599
University of Melbourne, VIC 3010 Australia
Email: apro using unimelb.edu.au<mailto:apro using unimelb.edu.au><mailto:apro using unimelb.edu.au<mailto:apro using unimelb.edu.au>>
Website: http://cebra.unimelb.edu.au/
On 12 Aug 2018, 7:34 AM +1000, Bansal, Udita <udita.bansal17 using imperial.ac.uk<mailto:udita.bansal17 using imperial.ac.uk><mailto:udita.bansal17 using imperial.ac.uk<mailto:udita.bansal17 using imperial.ac.uk>>>, wrote:

Hi all,

I was modeling the laying date of bird nests against moving averages of weather variables for several years of data. I used Durbin-Watson test and found considerable amount of autocorrelation in the residuals of simple linear and mixed effect models (with month as a random factor). So, I decided to run lme models with correlation structure specified. When I compare the AIC of the models with and without the correlation structure, I find that the models with the correlation structure are better.
Question 1.: How can I interpret the phi (parameter estimate for correlation structure) value in the model output?
Question 2.: Does the interpretation of phi affect the interpretation of the random effect?
Question 3.: How can I interpret the random effect (since this is different from what lmer output shows which I am used to of)?

An example output is as below:

Random effects:
Formula: ~1 | month
(Intercept) Residual
StdDev: 12.53908 5.009051

Correlation Structure: AR(1)
Formula: ~1 | month
Parameter estimate(s):
Phi
0.324984

I could not find much on the interpretation for these online. Any help will be much appreciated.

Thanks
Udita Bansal

[[alternative HTML version deleted]]

_______________________________________________
R-sig-mixed-models using r-project.org<mailto:R-sig-mixed-models using r-project.org><mailto:R-sig-mixed-models using r-project.org<mailto:R-sig-mixed-models using r-project.org>> mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

[[alternative HTML version deleted]]

_______________________________________________
R-sig-mixed-models using r-project.org<mailto:R-sig-mixed-models using r-project.org><mailto:R-sig-mixed-models using r-project.org<mailto:R-sig-mixed-models using r-project.org>> mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models



--
Andrew Robinson
Director, CEBRA, School of BioSciences
Reader & Associate Professor in Applied Statistics  Tel: (+61) 0403 138 955
School of Mathematics and Statistics                        Fax: (+61) 03 8344 4599
University of Melbourne, VIC 3010 Australia
Email: apro using unimelb.edu.au<mailto:apro using unimelb.edu.au><mailto:apro using unimelb.edu.au<mailto:apro using unimelb.edu.au>>
Website: http://www.ms.unimelb.edu.au/~andrewpr

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-mixed-models using r-project.org<mailto: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