An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20111117/d8c931a9/attachment.pl>
UNSOLVED: Re: lme4 or other open source mixed model package code equivalent to asreml-R
6 messages · John Clark, David Duffy, Ben Bolker
On Thu, 17 Nov 2011, John Clark wrote:
Thank you for mails. The questions is still open to suggestion. I have improved the description of the model. It is easier to do in stackoverflow to paste figures etc. Please find the improved question. http://stackoverflow.com/questions/7961864/lme4-or-other-open-source-r-package-code-equivalent-to-asreml-r On Wed, Nov 2, 2011 at 1:25 PM, Kevin Wright <kw.stat at gmail.com> wrote:
I have searched for many years for examples of fitting AR1xAR1 type models with open-source software other than ASREML. There are no such examples. Only ASREML (and SAS PROC MIXED) can fit these models.
You might look at the regress and spatialCovariance packages of David Clifford. The former allows fitting of (Gaussian) mixed models where you can specify the structure of the covariance matrix very flexibly (for example, I have used it for pedigree data). The spatialCovariance package uses regress to provide more elaborate models than AR1xAR1, but may be applicable. You may have to correspond with the author about applying it to your exact problem. Just 2c, David Duffy.
David Duffy <David.Duffy at ...> writes:
On Thu, 17 Nov 2011, John Clark wrote:
Thank you for mails. The questions is still open to suggestion. I have improved the description of the model. It is easier to do in stackoverflow to paste figures etc. Please find the improved question.
http://stackoverflow.com/questions/7961864/lme4-or-other-open-source-r-package-code-equivalent-to-asreml-r
On Wed, Nov 2, 2011 at 1:25 PM, Kevin Wright <kw.stat at ...> wrote:
I have searched for many years for examples of fitting AR1xAR1 type models with open-source software other than ASREML. There are no such examples. Only ASREML (and SAS PROC MIXED) can fit these models.
You might look at the regress and spatialCovariance packages of David Clifford. The former allows fitting of (Gaussian) mixed models where you can specify the structure of the covariance matrix very flexibly (for example, I have used it for pedigree data). The spatialCovariance package uses regress to provide more elaborate models than AR1xAR1, but may be applicable. You may have to correspond with the author about applying it to your exact problem.
Hmm. I took a quick look; it is nice to see another implementation of mixed effects models (you can never have too many, especially when they're open and can build on each other ...) -- BUT -- it's not immediately obvious to me (maybe this is the "correspond with the author" part?) how to construct this problem so that the variance structure corresponds to a sum of specified Gaussian values. In particular, would we have to use an outer loop to profile over different values of the scale parameter (or run a 1-dimensional minimum-finder for the negative log-likelihood) ?
On Fri, 18 Nov 2011, Ben Bolker wrote:
David Duffy wrote:
You might look at the regress and spatialCovariance packages of David Clifford. The former allows fitting of (Gaussian) mixed models where you can specify the structure of the covariance matrix very flexibly (for example, I have used it for pedigree data). The spatialCovariance package uses regress to provide more elaborate models than AR1xAR1, but may be applicable. You may have to correspond with the author about applying it to your exact problem.
Hmm. I took a quick look; it is nice to see another implementation of mixed effects models (you can never have too many, especially when they're open and can build on each other ...) -- BUT -- it's not immediately obvious to me (maybe this is the "correspond with the author" part?) how to construct this problem so that the variance structure corresponds to a sum of specified Gaussian values. In particular, would we have to use an outer loop to profile over different values of the scale parameter (or run a 1-dimensional minimum-finder for the negative log-likelihood) ?
Well, I do not have any experience carrying out spatial modelling, but it did seem to me that the covariances arising from the separable AR1xAR1 model must be have a close resemblance to some of the other standard models. Specifically, page 85 of Haskard's thesis http://digital.library.adelaide.edu.au/dspace/bitstream/2440/47972/1/02whole.pdf seems to imply it is equivalent to a anisotropic Matern model. This is offered by the spatialCovariance package, AIUI. It took me a while to understand that the example dataset is the Wheat2 data from the nmle package, which Pinheiro and Bates (2000, P 263) analyse using spherical and rational quadratic models. I am unsure if the OP is particularly interested in the exact models he chose for his example, or whether one can generally match ASREML's functionality, or has data that might be comfortably analysed usibg existing lme correlation structures. Cheers, David.
| David Duffy (MBBS PhD) ,-_|\ | email: davidD at qimr.edu.au ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit, Queensland Institute of Medical Research \_,-._/ | 300 Herston Rd, Brisbane, Queensland 4029, Australia GPG 4D0B994A v
1 day later
On: Chen et al Genet Epidemiol 2011, 35:650-7. The latest (dead tree) issue of Genetic Epidemiology has a paper using simulated and real data to compare methods for testing association between a measured genotype (fixed effect) and a dichotomous outcome in pedigrees, so there is residual correlation between observations. They use a) "ordinary" gaussian linear mixed model treating the trait as 0-1 (in lmekin) b) the binomial-gaussian GLMM using glmer (0.999375-32) c) GEE in geepack. Simulated data were produced under a threshold model and AFAICT [I don't think the paper well-written], a Wald test was used to assess the fixed effect for all three. You can read the abstract, at least, online: they prefer GEE. Their GLMM test Type-1 error tends to drift up a little as the trait prevalence increases. They also experienced problems with GLMM when carrying small sample simulations. They did encounter numerical problems with GEE when the trair prevalence was low, but for this situation they preferred the gaussian LMM, as they found this to have OK Type-I error rates, and better power than the GLMM (though twice as slow ;)). The main weakness of course if that they did not report LRTS results, although they do mention Hauck-Donner effects as a possible cause of their problems. Another possible one is the generating model, which is convenient but different from the logistic-gaussian. And fitting the LMM to binary variables does usually give correct Type I errors, but when a true effect is present overestimates the evidence for association in my experience. Cheers, David Duffy.
| David Duffy (MBBS PhD) ,-_|\ | email: davidD at qimr.edu.au ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit, Queensland Institute of Medical Research \_,-._/ | 300 Herston Rd, Brisbane, Queensland 4029, Australia GPG 4D0B994A v
3 days later
David Duffy <David.Duffy at ...> writes:
On Fri, 18 Nov 2011, Ben Bolker wrote:
[snip]
Well, I do not have any experience carrying out spatial modelling, but it did seem to me that the covariances arising from the separable AR1xAR1 model must be have a close resemblance to some of the other standard models. Specifically, page 85 of Haskard's thesis http://digital.library.adelaide.edu.au/dspace/bitstream/2440/47972/1/02whole.pdf seems to imply it is equivalent to a anisotropic Matern model. This is offered by the spatialCovariance package, AIUI. It took me a while to understand that the example dataset is the Wheat2 data from the nmle package, which Pinheiro and Bates (2000, P 263) analyse using spherical and rational quadratic models. I am unsure if the OP is particularly interested in the exact models he chose for his example, or whether one can generally match ASREML's functionality, or has data that might be comfortably analysed usibg existing lme correlation structures.
Dave Fournier has posted a solution using AD Model Builder at http://groups.google.com/group/admb-users/browse_thread/ thread/96bf76c9f578650b (sorry, URL broken to make Gmane happy) that tackles (almost) this problem (it actually does a spatial GLMM -- a Poisson model layered on the AR1 x AR1 Gaussian random field). Ben Bolker