I have preference ratings (1-to-7 scale) for k=80 stimuli, obtained from N=30 subjects. I would like to do a multiple regression for these scores, against a small number of weakly-correlated predictors. Some of the predictors are continuous, others are categorical. Also, some of the predictors characterise the subject (e.g. age), while others characterise the stimulus (e.g. loudness).

I am confused whether the regression should take in cross-*stimulus* or cross-*subject* variability. I will be using the 'regress' function in Matlab:

Code:

`b = regress(y,X) returns a p-by-1 vector b of coefficient estimates for a multilinear regression of the responses in y on the predictors in X. X is an n-by-p matrix of p predictors at each of n observations. y is an n-by-1 vector of observed responses.`

My questions are:

1) How should the ratings for the different subjects, and for the different stimuli, be arranged to define the Y and X matrices in the regression formula?

2) Do I need to do a separate regression for each stimulus, and if so, is a multiple comparisons correction necessary?

Thanks!!