Dear Madam or Sir I am writing you hoping, that you can help me with a problem concerning the output of regressions done with the function lme in R. I would need the standard deviations for intercepts and predictors, but in the output I can only find those for the intercepts. Could it be, that this is my fault? (I am just a beginner with R and multilevel modeling). I am sorry to annoy you with this problem but I could not deal with the problem with the help of books, internet or friends. So my hope is that you would be so kind and you find some minutes to look through one of my examples. I would be deeply greatful. My R script: library (nlme) #Datei laden randomInterceptDIQAGQ <- lme(NoteD ~ IQ + AGQ, data = Gind, random = ~1|Klnr, method = "ML", na.action = na.exclude) summary (randomInterceptDIQAGQ) intervals (randomInterceptDIQAGQ) my Output: Final model, : 2 predictors, no RandomSlope> randomInterceptDIQAGQ <- lme(NoteD ~ IQ + AGQ, data = Gind, random = ~1|Klnr, method = "ML", na.action = na.exclude)> summary (randomInterceptDIQAGQ)Linear mixed-effects model fit by maximum likelihood Data: Gind AIC BIC logLik 943.9653 964.7289 -466.9826 Random effects: Formula: ~1 | Klnr (Intercept) Residual StdDev: 0.3208885 0.6210003 Fixed effects: NoteD ~ IQ + AGQ Value Std.Error DF t-value p-value (Intercept) 1.8093739 0.06661912 439 27.159979 0.0000 IQ -0.1565731 0.04810124 439 -3.255074 0.0012 AGQ -0.4987539 0.04430031 439 -11.258476 0.0000 Correlation: (Intr) IQ IQ 0.001 AGQ 0.005 -0.503 Standardized Within-Group Residuals: Min Q1 Med Q3 Max -2.40082246 -0.62266936 -0.07491225 0.54494014 3.77426037 Number of Observations: 470 Number of Groups: 29 With best regards from Austria Sylvia Opriessnig [[alternative HTML version deleted]]
Dear Sylvia, R-sig-mixed-models is a better list for questions about mixed models. The summary gives you the standard error for the fixed effects. See the output in your mail. E.g. AGQ has a standard error of 0.044 Have a look at http://glmm.wikidot.com/faq, it covers some topics on mixed models. Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance Kliniekstraat 25 1070 Anderlecht Belgium + 32 2 525 02 51 + 32 54 43 61 85 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-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] Namens Sylvia Opriessnig Verzonden: dinsdag 30 oktober 2012 9:08 Aan: r-help at R-project.org Onderwerp: [R] help with lme Dear Madam or Sir I am writing you hoping, that you can help me with a problem concerning the output of regressions done with the function lme in R. I would need the standard deviations for intercepts and predictors, but in the output I can only find those for the intercepts. Could it be, that this is my fault? (I am just a beginner with R and multilevel modeling). I am sorry to annoy you with this problem but I could not deal with the problem with the help of books, internet or friends. So my hope is that you would be so kind and you find some minutes to look through one of my examples. I would be deeply greatful. My R script: library (nlme) #Datei laden randomInterceptDIQAGQ <- lme(NoteD ~ IQ + AGQ, data = Gind, random = ~1|Klnr, method = "ML", na.action = na.exclude) summary (randomInterceptDIQAGQ) intervals (randomInterceptDIQAGQ) my Output: Final model, : 2 predictors, no RandomSlope> randomInterceptDIQAGQ <- lme(NoteD ~ IQ + AGQ, data = Gind, random > ~1|Klnr, method = "ML", na.action = na.exclude)> summary (randomInterceptDIQAGQ)Linear mixed-effects model fit by maximum likelihood Data: Gind AIC BIC logLik 943.9653 964.7289 -466.9826 Random effects: Formula: ~1 | Klnr (Intercept) Residual StdDev: 0.3208885 0.6210003 Fixed effects: NoteD ~ IQ + AGQ Value Std.Error DF t-value p-value (Intercept) 1.8093739 0.06661912 439 27.159979 0.0000 IQ -0.1565731 0.04810124 439 -3.255074 0.0012 AGQ -0.4987539 0.04430031 439 -11.258476 0.0000 Correlation: (Intr) IQ IQ 0.001 AGQ 0.005 -0.503 Standardized Within-Group Residuals: Min Q1 Med Q3 Max -2.40082246 -0.62266936 -0.07491225 0.54494014 3.77426037 Number of Observations: 470 Number of Groups: 29 With best regards from Austria Sylvia Opriessnig [[alternative HTML version deleted]] ______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. * * * * * * * * * * * * * D I S C L A I M E R * * * * * * * * * * * * * 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.
Hi, This is my first time posting to the list so please forgive any breeches of etiquette! I am new to mixed-effects modeling. This is my dataset: subject treatment day replicate outcome 1 1 1 1 0.0 1 1 4 1 0.0 1 1 8 1 14.5 1 1 8 2 15.4 2 1 2 1 0.0 2 1 4 1 0.0 2 1 7 1 12.1 2 1 7 2 11.9 3 1 2 1 0.0 3 1 4 1 0.0 3 1 7 1 0.0 4 1 2 1 4.2 4 1 2 2 5.0 4 1 4 1 8.5 4 1 4 2 10.0 4 1 6 1 16.4 4 1 6 2 18.1 5 1 2 1 0.0 5 1 4 1 0.0 5 1 7 1 0.0 6 2 2 1 0.0 6 2 4 1 9.1 6 2 4 2 9.7 6 2 7 1 12.6 6 2 7 2 10.3 7 2 1 1 3.3 7 2 1 2 4.8 7 2 4 1 6.2 7 2 4 2 6.4 7 2 7 1 12.9 7 2 7 2 13.1 8 2 2 1 0.0 8 2 4 1 0.0 8 2 8 1 0.0 9 2 2 1 2.7 9 2 2 2 3.2 9 2 4 1 5.6 9 2 4 2 5.4 9 2 8 1 14.9 9 2 8 2 14.8 10 2 1 1 0.0 10 2 4 1 10.7 10 2 4 2 11.0 10 2 7 1 13.7 10 2 7 2 12.9 11 2 1 1 0.0 11 2 4 1 0.0 11 2 7 1 0.0 12 2 1 1 0.0 12 2 4 1 0.0 12 2 7 1 0.0 It can be made using this: subject=c(1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12) treatment=c(rep(1, 20), rep(2, 31)) day=c(1, 4, 8, 8, 2, 4, 7, 7, 2, 4, 7, 2, 2, 4, 4, 6, 6, 2, 4, 7, 2, 4, 4, 7, 7, 1, 1, 4, 4, 7, 7, 2, 4, 8, 2, 2, 4, 4, 8, 8, 1, 4, 4, 7, 7, 1, 4, 7, 1, 4, 7) replicate=c(1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1) outcome=c(0, 0, 14.5, 15.4, 0, 0, 12.1, 11.9, 0, 0, 0, 4.2, 5.0, 8.5, 10.0, 16.4, 18.1, 0, 0, 0, 0, 9.1, 9.7, 12.6, 10.3, 3.3, 4.8, 6.2, 6.4, 12.9, 13.1, 0,0,0, 2.7,3.2, 5.6, 5.4, 14.9, 14.8, 0, 10.7, 11.0, 13.7, 12.9, 0, 0, 0, 0, 0, 0) data<-data.frame(cbind(subject, treatment, day, replicate, outcome)) I have two groups of subjects, each given a different treatment. The outcome (growth) was observed post-treatment on each of three days. If there was growth, it was measured in duplicate measurements. There are uneven numbers of subjects in my two treatment groups. Also, the outcome was always observed on 3 days, but the exact day of observation is not always consistent. I just want to know the effect of treatment on outcome. This is the model I've run: model <- lme(outcome ~ treatment * day, random = list(subject = pdDiag(~ day)), data = data) summary(model) Can any experts out there let me know if I'm doing this right? Thanks!!!