Dear John, R-sig-mixed-models is a better list for this kind of questions.
It looks like the model finds no evidence for a random slope. Notice the very small variance of the random slope. In the model without random intercept, the random slope tries to mimic the effect of a random intercept. Best regards, Thierry 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.onkel...@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-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Namens John Sorkin Verzonden: dinsdag 12 juni 2012 16:52 Aan: r-help@r-project.org Onderwerp: [R] lme random slope results the same as random slope and intercept model R 2.15.0 Windows XP Can someone help me understand why a random intercept model gives the same results as the random intercept and slope models? I am rather surprised by the results I am getting from lme. I am running three models (1) random intercept fitRI <- lme(echogen~time,random=~ 1 |subject,data=repeatdata,na.action=na.omit) (2) random slope > fitRT <- lme(echogen~time,random=~ > -1+time|subject,data=repeatdata,na.action=na.omit) (3) random intercept and slope. fitRIRT <- lme(echogen~time,random=~ 1+time|subject,data=repeatdata,na.action=na.omit) The results of the (1) random intercept model are different from the (2) random slope model,not a surprise. The results of the (1) random intercept model and the (3) random intercept and slope models are exactly the same, a surprise! Below I copy the results for each model. Further below I give all my output. RESULTS FROM EACH MODEL (1) Random intercept results: Random effects: Formula: ~1 | subject (Intercept) Residual StdDev: 19.1751 10.44601 Fixed effects: echogen ~ time Value Std.Error DF t-value p-value (Intercept) 64.54864 4.258235 32 15.158545 0.0000 time 0.35795 0.227080 32 1.576307 0.1248 Correlation: (Intr) time -0.242 (2) Random slope results Random effects: Formula: ~-1 + time | subject time Residual StdDev: 0.6014915 19.63638 Fixed effects: echogen ~ time Value Std.Error DF t-value p-value (Intercept) 65.03691 3.494160 32 18.613032 0.0000 time 0.22688 0.467306 32 0.485503 0.6306 Correlation: (Intr) time -0.625 (3) Random intercept and slope results Random effects: Formula: ~1 + time | subject Structure: General positive-definite, Log-Cholesky parametrization StdDev Corr (Intercept) 1.917511e+01 (Intr) time 2.032072e-04 0 Residual 1.044601e+01 Fixed effects: echogen ~ time Value Std.Error DF t-value p-value (Intercept) 64.54864 4.258235 32 15.158543 0.0000 time 0.35795 0.227080 32 1.576307 0.1248 Correlation: (Intr) time -0.242 COMPLETE OUTPUT > repeatdata subject time value echogen 1 1 1 22 63 2 1 3 40 60 3 1 NA NA NA 4 1 NA NA NA 5 1 NA NA NA 6 2 1 39 19 7 2 NA NA NA 8 2 NA NA NA 9 2 NA NA NA 10 2 NA NA NA 11 3 1 47 76 12 3 6 43 82 13 3 NA NA NA 14 3 NA NA NA 15 3 NA NA NA 16 4 1 44 44 17 4 3 50 50 18 4 7 67 67 19 4 21 39 39 20 4 NA NA NA 21 5 1 42 58 22 5 3 60 78 23 5 7 86 85 24 5 19 56 60 25 5 35 39 84 26 6 1 57 67 27 6 NA NA NA 28 6 NA NA NA 29 6 NA NA NA 30 6 NA NA NA 31 7 1 71 58 32 7 3 55 67 33 7 10 57 95 34 7 17 62 94 35 7 25 47 73 36 8 1 79 105 37 8 NA NA NA 38 8 NA NA NA 39 8 NA NA NA 40 8 NA NA NA 41 9 1 60 70 42 9 3 64 62 43 9 9 68 65 44 9 NA NA NA 45 9 NA NA NA 46 10 1 47 75 47 10 3 49 73 48 10 9 46 70 49 10 17 48 70 50 10 NA NA NA 51 11 1 57 97 52 11 6 75 108 53 11 NA NA NA 54 11 NA NA NA 55 11 NA NA NA 56 12 1 85 116 57 12 3 77 110 58 12 NA NA NA 59 12 NA NA NA 60 12 NA NA NA 61 13 1 34 51 62 13 NA NA NA 63 13 NA NA NA 64 13 NA NA NA 65 13 NA NA NA 66 14 1 30 59 67 14 3 NA NA 68 14 NA NA NA 69 14 NA NA NA 70 14 NA NA NA 71 15 1 42 47 72 15 3 50 62 73 15 11 33 75 74 15 NA NA NA 75 15 NA NA NA 76 16 1 NA 83 77 16 7 NA 88 78 16 13 NA 74 79 16 NA NA NA 80 16 NA NA NA 81 17 1 NA 51 82 17 7 NA 62 83 17 NA NA NA 84 17 NA NA NA 85 17 NA NA NA 86 18 1 NA 39 87 18 7 NA 44 88 18 NA NA NA 89 18 NA NA NA 90 18 NA NA NA 91 19 1 NA 45 92 19 7 NA 56 93 19 14 NA NA 94 19 NA NA NA 95 19 NA NA NA 96 20 1 NA 45 97 20 7 NA 57 98 20 NA NA NA 99 20 NA NA NA 100 20 NA NA NA 101 21 1 NA 80 102 21 NA NA NA 103 21 NA NA NA 104 21 NA NA NA 105 21 NA NA NA 106 22 1 NA 42 107 22 7 NA 33 108 22 14 NA 36 109 22 21 NA NA 110 22 NA NA NA 111 23 1 NA 69 112 23 7 NA 68 113 23 NA NA NA 114 23 NA NA NA 115 23 NA NA NA 116 24 1 NA 48 117 24 6 NA 58 118 24 14 NA 82 119 24 NA NA NA 120 24 NA NA NA 121 25 1 NA 67 122 25 NA NA NA 123 25 NA NA NA 124 25 NA NA NA 125 25 NA NA NA > > library(nlme) > fitRI <- lme(echogen~time,random=~ 1 > |subject,data=repeatdata,na.action=na.omit) > summary(fitRI) Linear mixed-effects model fit by REML Data: repeatdata AIC BIC logLik 491.097 499.1984 -241.5485 Random effects: Formula: ~1 | subject (Intercept) Residual StdDev: 19.1751 10.44601 Fixed effects: echogen ~ time Value Std.Error DF t-value p-value (Intercept) 64.54864 4.258235 32 15.158545 0.0000 time 0.35795 0.227080 32 1.576307 0.1248 Correlation: (Intr) time -0.242 Standardized Within-Group Residuals: Min Q1 Med Q3 Max -1.61362748 -0.52710871 0.02948022 0.41793307 1.77340062 Number of Observations: 58 Number of Groups: 25 > > fitRT <- lme(echogen~time,random=~ > -1+time|subject,data=repeatdata,na.action=na.omit) > summary(fitRT) Linear mixed-effects model fit by REML Data: repeatdata AIC BIC logLik 515.2225 523.3239 -253.6112 Random effects: Formula: ~-1 + time | subject time Residual StdDev: 0.6014915 19.63638 Fixed effects: echogen ~ time Value Std.Error DF t-value p-value (Intercept) 65.03691 3.494160 32 18.613032 0.0000 time 0.22688 0.467306 32 0.485503 0.6306 Correlation: (Intr) time -0.625 Standardized Within-Group Residuals: Min Q1 Med Q3 Max -2.35381603 -0.69490411 -0.04299361 0.52973023 2.57509584 Number of Observations: 58 Number of Groups: 25 > > fitRIRT <- lme(echogen~time,random=~ > 1+time|subject,data=repeatdata,na.action=na.omit) > summary(fitRIRT) Linear mixed-effects model fit by REML Data: repeatdata AIC BIC logLik 495.097 507.2491 -241.5485 Random effects: Formula: ~1 + time | subject Structure: General positive-definite, Log-Cholesky parametrization StdDev Corr (Intercept) 1.917511e+01 (Intr) time 2.032072e-04 0 Residual 1.044601e+01 Fixed effects: echogen ~ time Value Std.Error DF t-value p-value (Intercept) 64.54864 4.258235 32 15.158543 0.0000 time 0.35795 0.227080 32 1.576307 0.1248 Correlation: (Intr) time -0.242 Standardized Within-Group Residuals: Min Q1 Med Q3 Max -1.61362755 -0.52710871 0.02948008 0.41793322 1.77340082 Number of Observations: 58 Number of Groups: 25 > John David Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of Gerontology Baltimore VA Medical Center 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 (Phone) 410-605-7119 (Fax) 410-605-7913 (Please call phone number above prior to faxing) Confidentiality Statement: This email message, including any attachments, is for th...{{dropped:13}} ______________________________________________ R-help@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.