0todd0000 / spm1dmatlab

One-Dimensional Statistical Parametric Mapping in Matlab.
GNU General Public License v3.0
28 stars 13 forks source link

Data setup for regression #151

Closed 0todd0000 closed 2 years ago

0todd0000 commented 3 years ago

(This is paraphrased from an email question.)

I would like to make use of the SPM correlation function but I'm not quite sure how to set the data up to run this. I have two continuous time-normalised functions, and I would like to know how both correlate to a scalar variable. I would appreciate any and all help in this regard.

0todd0000 commented 3 years ago

From your data description it sounds like two separate linear regression tests might be appropriate. In the spm1d package a relevant example script is:

./spm1d/examples/stats1d/ex1d_regression.m

Note that there are two different built-in datasets you can use for this script; the Y and x variables in these datasets should clarify the required data format.