> lme(values ~ time*treatment + ratings,data=lme_data,random = ~1 + ratings | subj)
> I get the following error message:
> nlminb problem, convergence error code = 1
> message = iteration limit reached without convergence (10)
This is basically what 3dLME does except for a couple of differences (see below). Basically it failed to converge at that voxel for some numerical reason. Try a different voxel, and see if it converges.
> lme(values ~ time*treatment + ratings,data=lme_data,random = ~1 + ratings | subj)
The reasons you had some different results from 3dLME are:
1) A different dummy coding scheme is adopted in 3dLME than the default in the nlme package. I use "deviation coding" (contr.sum in R) in 3dLME while the simple "dummy coding" (contr.treatment in R) is used in the nlme package. The consequence of the different coding strategies is that the intercept is interpreted totally different between the two.
2) The default for the type of sums of squares in 3dLME is "marginal" (or type 3) while the default in the nlme package is "sequential" (or type 1). And this is why you see the different F-values (and p-values as well) between your analyses except for the last term (interaction). See more discussion about the issue here:
[
afni.nimh.nih.gov]
Gang