I'm running a mixed-effects model with lme in a big for loop of 20,000 iterations. It would take from 20 to 100 hours to finish a typical analysis depending on the complexity of the model. However in the model
Y = X*beta + Z*b + e X and Z are always the same for all the iterations, and the only thing that differs is Y (and the estimates of beta, b and e of course). So I guess there are a lot of unnecessary repetitive computations (matrix operations?) in the loop. How can I achieve higher efficiency with lme? Thank you very much, Gang ______________________________________________ R-help@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.