An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20090615/c85f993f/attachment.pl>
Random formula
3 messages · De Smedt Sebastiaan, ONKELINX, Thierry, Luca Borger
Dear Sebastiaan, Models with nested random effects can be done with nlme. Have a loot at section 4.2.3 of Pinheiro and Bates (2000) Mixed effects models in S and S-plus. You will need something like lme(response ~ climate_factor*pruning, random = list(provenance = ~ pruning, tree = ~1)) HTH, Thierry ------------------------------------------------------------------------ ---- ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest Cel biometrie, methodologie en kwaliteitszorg / Section biometrics, methodology and quality assurance Gaverstraat 4 9500 Geraardsbergen Belgium tel. + 32 54/436 185 Thierry.Onkelinx at inbo.be 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 -----Oorspronkelijk bericht----- Van: r-sig-mixed-models-bounces at r-project.org [mailto:r-sig-mixed-models-bounces at r-project.org] Namens De Smedt Sebastiaan Verzonden: maandag 15 juni 2009 16:23 Aan: r-sig-mixed-models at r-project.org Onderwerp: [R-sig-ME] Random formula Hi, I measured leaf characteristics. The leaves are grouped in trees which are, on their turn, grouped in provenances. I want to model those leaf characteristics in function of climate variables (measured on provenance level) and pruning characteristics (measured on tree level). I also want to see if the effect of pruning differs between provenances (provenance-pruning interaction). The problem is that there cannot be an interaction between pruning and tree, because pruning is measured on tree level. in lme4, I think I can specify this model as follows: response ~ climate_factor*pruning + (pruning|provenance) + (1|provenance/tree) Or is there another way? Is it possible to define this model in the nlme library (I need a variance structure, which doesn't exist in lme4)? Thanks a lot! Sebastiaan Sebastiaan De Smedt Department of Bioscience Engineering University of Antwerp Belgium Tel.: +32 (0)3 265 35 17 Fax.: +32 (0)3 265 32 25 _______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is door een geldig ondertekend document. The views expressed in this message and any annex are purely those of the writer and may not be regarded as stating an official position of INBO, as long as the message is not confirmed by a duly signed document.
Hello,
given that you are fitting a gaussian response model and that your random
effects are strictly nested (if I understand it correctly), nlme can be used
easily (unless I get corrected by the experts on the list). You could fit
them:
# m1, no random slope
response ~ climate_factor*pruning,
random = list(provenance =~ 1, tree =~ 1),
# m2, random slope for pruning at provenance level
response ~ climate_factor*pruning,
random = list(provenance =~ pruning, tree =~ 1),
HTH
Cheers,
Luca
----- Original Message -----
From: "De Smedt Sebastiaan" <Sebastiaan.DeSmedt at ua.ac.be>
To: <r-sig-mixed-models at r-project.org>
Sent: Monday, June 15, 2009 10:22 AM
Subject: [R-sig-ME] Random formula
Hi, I measured leaf characteristics. The leaves are grouped in trees which are, on their turn, grouped in provenances. I want to model those leaf characteristics in function of climate variables (measured on provenance level) and pruning characteristics (measured on tree level). I also want to see if the effect of pruning differs between provenances (provenance-pruning interaction). The problem is that there cannot be an interaction between pruning and tree, because pruning is measured on tree level. in lme4, I think I can specify this model as follows: response ~ climate_factor*pruning + (pruning|provenance) + (1|provenance/tree) Or is there another way? Is it possible to define this model in the nlme library (I need a variance structure, which doesn't exist in lme4)? Thanks a lot! Sebastiaan Sebastiaan De Smedt Department of Bioscience Engineering University of Antwerp Belgium Tel.: +32 (0)3 265 35 17 Fax.: +32 (0)3 265 32 25 [[alternative HTML version deleted]]
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models