Michael, Good news (relatively speaking). I ran your code again, but this time I actually looked at what I pasted in and noticed some errors. When I actually pulled your code into a text editor, there was an issue with one of the comments wrapping to the next line without a new # (probably an email issue).
For others if "## BEGIN" is line 1; the comment issue is on line 44 (# nugget for space is (then the line break) determined by the nugget for time). Once I fixed that, I got slightly different results. ########From Rterm######## Browse[6]> debug: space.nug <- temp[2] Browse[6]> debug: cor.time <- lapply(attr(object[["time"]], "covariate"), function(mat) (1 - time.nug) * exp(-mat/time.rng)) Browse[6]> Traceback: 1: FUN(X[[5L]], ...) 2: lapply(attr(object[["time"]], "covariate"), function(mat) (1 - time.nug) * exp(-mat/time.rng)) 3: corMatrix.corSPT(object) 4: corMatrix(object) 5: unlist(corMatrix(object)) 6: corFactor.corSPT(object) 7: corFactor(object) 8: `coef<-.corSPT`(`*tmp*`, value = c(0, 0, 1.49011611938477e-08)) 9: `coef<-`(`*tmp*`, value = c(0, 0, 1.49011611938477e-08)) 10: `coef<-.modelStruct`(`*tmp*`, value = c(0.375881355354461, 0, 0, 1.490116119 38477e-08)) 11: `coef<-`(`*tmp*`, value = c(0.375881355354461, 0, 0, 1.49011611938477e-08)) 12: logLik.lmeStruct(lmeSt, lmePars) 13: logLik(lmeSt, lmePars) 14: objective(.par, ...) 15: .Call(R_port_nlminb, obj, grad, hess, rho, low, upp, d = rep(as.double(scale ), length.out = length(par)), iv, v) 16: nlminb(c(coef(lmeSt)), function(lmePars) -logLik(lmeSt, lmePars), contro l = list(iter.max = controlvals$msMaxIter, eval.max = controlvals$msMaxEval, trace = controlvals$msVerbose)) 17: lme.formula(fixed = e ~ a, random = ~1 | g, data = df, correlation = corSPT( corExp(c(1, 0.5), form = ~t | g, nugget = TRUE), corExp(c(1, 0.5), form = ~x + y | g, nugget = TRUE)), control = list(msVerbose = TRUE, opt = "nlmin b")) 18: lme(fixed = e ~ a, random = ~1 | g, data = df, correlation = corSPT(corExp(c (1, 0.5), form = ~t | g, nugget = TRUE), corExp(c(1, 0.5), form = ~x + y | g, nugget = TRUE)), control = list(msVerbose = TRUE, opt = "nlminb")) Error in FUN(X[[5L]], ...) : caught access violation - continue with care > ########From Rterm (again, but this time running the code from Xemacs)######## Browse[3]> debug: coef(object[[i]]) <- value[parMap[, i]] Browse[3]> Traceback: 1: `coef<-.modelStruct`(`*tmp*`, value = c(0.47054905560461, 0, 1.49011611938477e-08, 0)) 2: `coef<-`(`*tmp*`, value = c(0.47054905560461, 0, 1.49011611938477e-08, 0)) 3: logLik.lmeStruct(lmeSt, lmePars) 4: logLik(lmeSt, lmePars) 5: objective(.par, ...) 6: .Call(R_port_nlminb, obj, grad, hess, rho, low, upp, d = rep(as.double(scale), length.out = length(par)), iv, v) 7: nlminb(c(coef(lmeSt)), function(lmePars) -logLik(lmeSt, lmePars), control = list(iter.max = controlvals$msMaxIter, eval.max = controlvals$msMaxEval, trace = controlvals$msVerbose)) 8: lme.formula(fixed = e ~ a, random = ~1 | g, data = df, correlation = corSPT(corExp(c(1, 0.5), form = ~t | g, nugget = TRUE), corExp(c(1, 0.5), form = ~x + y | g, nugget = TRUE)), control = list(msVerbose = TRUE, opt = "nlminb")) 9: lme(fixed = e ~ a, random = ~1 | g, data = df, correlation = corSPT(corExp(c(1, 0.5), form = ~t | g, nugget = TRUE), corExp(c(1, 0.5), form = ~x + y | g, nugget = TRUE)), control = list(msVerbose = TRUE, opt = "nlminb")) Error in coef(object[[i]]) <- value[parMap[, i]] : caught access violation - continue with care > Then it occurred to me that RGui sometimes behaves slightly differently, and that you might be using the Gui so I ran it again there and it crashed, froze, and I had to manually kill the process. I don't know if that really helps, but at least I (sort of?) replicated your crashing. Josh <snipped a bunch of stuff because I already included a lot of output> -- Joshua Wiley Senior in Psychology University of California, Riverside http://www.joshuawiley.com/ ______________________________________________ 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.