Hi Gang,
I'm having trouble getting 3dLME to run with a GLT involving a quantitative variable. The problem seems to be that `3dLME -help` instructs me to code a GLT testing the effect of a covariate `runidx` by coding `-gltCode 'runidx :'`, but this means that lop$gltCode[[n]] is `[1] "runidx" ":"` at 3dLME.R:568, so that the first argument to `gltConstr` in
gltConstr(lop$gltCode[[n]][-c(QVpos, QVpos+1)], lop$dataStr)
is `character(0)`, so that `1:nvar` is `1:0` which is not empty because R is crazy. Maybe this has something to do with the comment at the beginning of gltConstr:
# NEED to solve the problem when a quantitative variable is tested alone:
# with pairwise = NULL!!!
Am I just doing something dumb? Is this a documentation issue, where the instructions for how to do this GLT are out of date? Is this just not implemented yet? Is it a remnant of splitting 3dLME and 3dMVM apart? (I still see several notes in the 3dLME help that either mention 3dMVM options, or advise the user to use 3dLME instead of 3dLME...)
I tried changing `1:nvar` to `(if(nvar) 1:nvar else integer(0))` at 3dLME.R:410 (in `gltConstr`), and the analysis is running, but I'll have to wait until tomorrow to report whether the results were garbage or not.
Isaac
EDIT: It looks like this change did not break the analysis. I don't know whether the results I got are right, but they aren't all zero and they don't vary wildly the way one would expect them to look if they resulted from trying to invert an ill-conditioned matrix. I also found the `seq_len` function, which does what I was trying to do much more cleanly than that horrible if expression.
Edited 1 time(s). Last edit at 07/10/2014 11:18AM by Isaac Schwabacher.