Hi, I am trying to run a multilevel model with time nested in people and people nested in dyads (3 levels of nesting) by initially running a series of models to test whether the slope/intercept should be fixed or random. The problem that I am experiencing appears to arise between the random intercept, fixed slope equation AND. (syntax: rint<-lme(BDIAFTER~BDI+WEEK+CORUMTO, random=~1|DYADID/PARTICIP, data=new) summary(rint)) the random slope, random intercept model (syntax: rslint<-lme(BDIAFTER~BDI+WEEK+CORUMTO, random=~CORUMTO|DYADID/PARTICIP, data=new) summary(rslint)) at which point I obtain the exact same results for each model suggesting that one of the model is not properly specifying the slope or intercept. Or, I receive the following error message when I try to run the random slope/random intercept model. Error in solve.default(pdMatrix(a, fact = TRUE)) : system is computationally singular: reciprocal condition number = 6.77073e-017 (whether I receive an error message or the same results depends on the specific variables in the model). It has been suggested that I may need to change the default starting values in the model because I may be approaching a boundary-is this a plausible explanation for my difficulties? If so, how do I do this in R and can you refer me to a source that might highlight what would be reasonable starting values? If this does not seem like the problem, any idea what the problem may be and how I might fix it? Thank you so much for your assistance, Christine Calmes Christine A. Calmes, MA Dept of Psychology University at Buffalo: The State University of New York Park Hall 216 Buffalo, NY 14260 ccalmes@buffalo.edu (716) 645-3650 x578 [[alternative HTML version deleted]]
Dear Christine I think the problem in your second model is that you are including "CORUMTO" both as a fixed effect and as a random effect. Regards, Christoph -------------------------------------------------------------- Credit and Surety PML study: visit our web page www.cs-pml.org -------------------------------------------------------------- Christoph Buser <buser at stat.math.ethz.ch> Seminar fuer Statistik, LEO C13 ETH Zurich 8092 Zurich SWITZERLAND phone: x-41-44-632-4673 fax: 632-1228 http://stat.ethz.ch/~buser/ -------------------------------------------------------------- Christine A. Calmes writes: > Hi, > > I am trying to run a multilevel model with time nested in people and > people nested in dyads (3 levels of nesting) by initially running a > series of models to test whether the slope/intercept should be fixed or > random. The problem that I am experiencing appears to arise between the > random intercept, fixed slope equation AND. > > (syntax: > rint<-lme(BDIAFTER~BDI+WEEK+CORUMTO, random=~1|DYADID/PARTICIP, > data=new) > summary(rint)) > > the random slope, random intercept model > > (syntax: > rslint<-lme(BDIAFTER~BDI+WEEK+CORUMTO, random=~CORUMTO|DYADID/PARTICIP, > data=new) > summary(rslint)) > > at which point I obtain the exact same results for each model suggesting > that one of the model is not properly specifying the slope or intercept. > > Or, I receive the following error message when I try to run the random > slope/random intercept model. > > Error in solve.default(pdMatrix(a, fact = TRUE)) : > system is computationally singular: reciprocal condition number > = 6.77073e-017 > > (whether I receive an error message or the same results depends on the > specific variables in the model). > > It has been suggested that I may need to change the default starting > values in the model because I may be approaching a boundary-is this a > plausible explanation for my difficulties? If so, how do I do this in R > and can you refer me to a source that might highlight what would be > reasonable starting values? > If this does not seem like the problem, any idea what the problem may be > and how I might fix it? > > Thank you so much for your assistance, > Christine Calmes > > > Christine A. Calmes, MA > Dept of Psychology > University at Buffalo: The State University of New York > Park Hall 216 > Buffalo, NY 14260 > ccalmes at buffalo.edu > (716) 645-3650 x578 > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch 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.
Christine-- You have two and only two individuals per dyad; when you try to fit random slopes at level-2 (within couples), you are attempting to estimate an intercept, slope, and covariance for each individual. Basically, you don't have enough data to do it. If you restrict yourself to a single random-effect at level-2, you shouldn't have any problems. So, it's not a code problem; it's an issue of the amount of data (or nature of your data) relative to the model you're attempting to fit. You might want to see a paper I wrote on HLM with dyadic data (which has an appendix with R code); I discuss this issue some and various strategies for dealing with it: Atkins, D. C. (2005). Using multilevel models to analyze marital and family treatment data: Basic and advanced issues. Journal of Family Psychology, 19, 98-110. Hope that helps. cheers, Dave Hi, I am trying to run a multilevel model with time nested in people and people nested in dyads (3 levels of nesting) by initially running a series of models to test whether the slope/intercept should be fixed or random. The problem that I am experiencing appears to arise between the random intercept, fixed slope equation AND. (syntax: rint<-lme(BDIAFTER~BDI+WEEK+CORUMTO, random=~1|DYADID/PARTICIP, data=new) summary(rint)) the random slope, random intercept model (syntax: rslint<-lme(BDIAFTER~BDI+WEEK+CORUMTO, random=~CORUMTO|DYADID/PARTICIP, data=new) summary(rslint)) at which point I obtain the exact same results for each model suggesting that one of the model is not properly specifying the slope or intercept. Or, I receive the following error message when I try to run the random slope/random intercept model. Error in solve.default(pdMatrix(a, fact = TRUE)) : system is computationally singular: reciprocal condition number = 6.77073e-017 (whether I receive an error message or the same results depends on the specific variables in the model). It has been suggested that I may need to change the default starting values in the model because I may be approaching a boundary-is this a plausible explanation for my difficulties? If so, how do I do this in R and can you refer me to a source that might highlight what would be reasonable starting values? If this does not seem like the problem, any idea what the problem may be and how I might fix it? Thank you so much for your assistance, Christine Calmes Christine A. Calmes, MA Dept of Psychology University at Buffalo: The State University of New York Park Hall 216 Buffalo, NY 14260 ccalmes at buffalo.edu (716) 645-3650 x578 -- Dave Atkins, PhD Assistant Professor in Clinical Psychology Fuller Graduate School of Psychology Email: datkins at fuller.edu Phone: 626.584.5554
"Christine A. Calmes" <ccalmes at buffalo.edu> wrote:> > [...] Basically, I am trying to test a > psychological model in which a person's level of passive, negative > communication with others in their environment (CORUMTO) on one week > predicts their level of depression on the following week (BDIAFTER) > controlling for their level of depression on the same week that that > they co-ruminate (BDI). The WEEK variable accounts for the fact that > there are 7 weeks worth of data in the model and that scores on adjacent > weeks are more closer related than scores on weeks that are further > apart.The alternative would be to fit using the sem package, explicitly modelling the time-series and estimating the lagged effects of CORUMTO and BDI -- it may be possible to disentangle the separate effects (a la instrumental variables type analysis). This would be easiest if there are 7 rounds of observations for everyone. The many time series packages may also be usable for this. 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
Seemingly Similar Threads
- question about warning message in nlme model
- [RFC PATCH v2 0/3] mm/fs: Implement faster stable page writes on filesystems
- [PATCH 06/15] genhd: Add return code to device_add_disk
- [PATCH 06/15] genhd: Add return code to device_add_disk
- [PATCH 1/5] Btrfs: fix bh leak on __btrfs_open_devices path