Looking at the original code, it should work, except that mean2 is not defined in this example. That may be simply due to a typo, but it would explain the results that you obtained. Now as far as the last question about including random subject effects--the only way I have seen that done is with data in the long format, sorted by subject. There are a couple of example in the documentation on NLMIXED that hit on this. Steve Denham
... View more