0todd0000 / spm1d

One-Dimensional Statistical Parametric Mapping in Python
GNU General Public License v3.0
60 stars 21 forks source link

SPM regression #289

Open zb16 opened 1 month ago

zb16 commented 1 month ago

Hello, I am investigating movement smoothness via joint angles and its relation to running economy. The running economy data is simply one value per participant (the average of two running trials). For each joint of interest we have about 200 values throughout the trial (one for each time point)- the data is time normalized and we have 200 data points per person per joint angle. Would it be possible to conduct a multiple linear regression on spm with this data, using only the one RE value as a dependent variable and the different joints and their values as independent variables? Otherwise, would it be possible to do a simple linear regression with the RE value as a dependent variable again and the time-normalized 200 data points for one joint an independent variable?

If so, how can this be done with the regression script?

There is also a recently published article ("Lower Extremity Kinematic and Kinetic Characteristics as Effects on Running Economy of Recreational Runners") in which SnPM regression was used to find the relationship between running efficiency (RE) and the sagittal kinematic and ground reaction force (GRF) patterns (both vertical and anterior-posterior GRF), so it seems like it can be done.

0todd0000 commented 1 month ago

Would it be possible to conduct a multiple linear regression on spm with this data, using only the one RE value as a dependent variable and the different joints and their values as independent variables?

Please note that the current version of spm1d supports ONLY dependent 1D variables. If it is appropriate to model the 1D observations as the dependent variable then you can indeed conduct multiple linear regression using spm1d.stats.glm.



would it be possible to do a simple linear regression with the RE value as a dependent variable again and the time-normalized 200 data points for one joint an independent variable?

If you can model the 1D data as a dependent variable then this can be done with spm1d's simple linear regression procedure:

spm = spm1d.stats.regress(y, x)

where y contains the 1D observations and x contains the RE value. Formally y is the dependent variable, but this shouldn't matter because the idea is to quantify correlation between the two variables.