[pymvpa] basic GLM

Daqiang Sun sundaqiang at yahoo.com
Wed Jun 10 01:09:29 UTC 2009


Hi,

Could anybody show me the right way to run GLM?
I have a dataset and a design array (mydesign) as:
array([[1, 1, 1, 1, 1, ..., 0, 0, 0, 0, 0],
       [0, 1, 2, 3, 4, 5, ..., 6, 7, 8, 9]])

I tried:

myglm = measures.glm.GLM(N.transpose(mydesign), voi='pe')
myglm(dataset)

but the the number of elements in output array is the same as feature number, 
not nfeatures * nregressors. I tried more designs with more regressors too, 
but got the same issue. I'm not sure what's going wrong there.
Also should the design array have dummy coding for the intercept?
I tried scipy.stats.glm by the way, but it seems to me that it only deals with 
dichotomous regressors. 

I just found that rather than resorting to other packages, running non-classification 
things within is such a convenience. I really appreciate your extra efforts to include 
so many useful features in the package.


Thanks and best,

Daqiang

---------------------------
Daqiang Sun
Clinical Neuroscience Lab
Department of Psychology
UCLA
---------------------------


      



More information about the Pkg-ExpPsy-PyMVPA mailing list