Dear people from Research Gate,
I'm currently struggling with linear autocorrelated models. I have correctly simulated some datasets to understand how homocedasticity and heterocedasticity work and now I'm focused on correlated residuals. Therefore I do simulate a dataset with correlated residuals.
The problem: in the end I compare the estimates of the models that do not or do include a specification to model the correlation structure, expecting the latter one to obtain better results and/or estimates. However, all the estimates ARE THE SAME?!?!?!
Simulated dataset:
- 5 subjects
- 3 days
- correlation structure = compound symmetry. Rho value = 0.85 (I've also tried AR1, and I get the same issue, not shown here).
- Variance function: the variance is depending on the mean. Therefore the model is heterocedastic. More specifically, the variance of the residuals = mean of the y values.
Plot of the simulated data (y values vs days).
Output table:
1st model: "raw model". No variance or correlation modeling.
2nd model: Only correlation is modeled.
3rd model: Only variance is modeled.
4th model: Both variance and correlation structure are modeled.
As I said before, I expect the 4th model to give the best results. And it does in terms of AIC or BIC values. However, it is extremely rare that all the estimates are exactly the same and only the standard errors are being modified (std error between parenthesis).
I have also include the R code used to simulate the data and to build the models (the gls() functions was used here).
I hope that somebody can help me here or tell me if I'm doing something wrongly!.
Thank you!
Victoria.