[R] matrix (column-wise) multiple regression

Morgan Hough mhough at fmrib.ox.ac.uk
Fri Nov 23 16:09:50 CET 2007


Hi there,

I am analyzing a table of brain volume measures where each brain area 
(183 of them) is a column with a label and volume values. I have another 
table of explanatory variables (age, gender, diagnosis and 
IntraCranialVol) that I have been using to model the brain volume 
differences. I have been doing this for single volume measures with no 
difficulties but I have been unable to apply this across the whole set 
of brain areas. If I try:

lm(y.df, x.df)
Error in eval(expr, envir, enclos) : object "Left_Lateral_Ventricle" not 
found

Left_Lateral_Ventricle happens to be the first column label. Does this 
not work with tables? I have been unable to find any examples.

Would you recommend another approach if I was doing this again. The 
number of columns (brain areas) depends on the parcellation strategy we 
use so I will probably be reforming these tables again and again. I 
would like the simplest way to analyze all the brain areas and find 
where there are significant differences driven mainly by the diagnosis 
factor.

Thanks in advance for your time.

Cheers,

-Morgan

---------------------------------------------------------------------------
Morgan Hough,
D.Phil. Student,
Oxford University FMRIB Centre

FMRIB, JR Hospital, Headington, Oxford  OX3 9DU, UK
+44 (0) 1865 222466  (fax 222717)
mhough at fmrib.ox.ac.uk    http://www.fmrib.ox.ac.uk/~mhough



More information about the R-help mailing list