Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two-way mixed ANOVA or linear mixed model possible with SPM1D ? #12

Closed
AurelieS opened this issue May 20, 2015 · 1 comment
Closed

Two-way mixed ANOVA or linear mixed model possible with SPM1D ? #12

AurelieS opened this issue May 20, 2015 · 1 comment

Comments

@AurelieS
Copy link

Hi Todd,

I am successfully analyzing EMG and kinematical signals with SPM1d (Spyder 2.3.4/ Python 2.7) and two-way ANOVAs (factor “group” 2 levels and factor “speed” 3 levels). I therefore use only one cycle per subject (no repeated measures).

However, I would like to perform a more thorough analysis and take into account every recorded cycle for every subject, so add a random variable “subject” into the analysis.

Furthermore, if possible, I would like to take into account the factor “speed” as a continuous variable and not as a categorical variable.

In conclusion I would like to know if a linear mixed model is possible with SPM1D, or at least a two-way mixed ANOVA (if I keep the factor “speed” as a categorical variable)… I have seen the “repeated measures ANOVA” issue opened on 6 August 2014, and I was wondering if any updates were available since.

Thanks!
Best regards,
Aurelie

@0todd0000
Copy link
Owner

0todd0000 commented May 20, 2015

Hi Aurelie,

Thanks for your question, it's good to know that the main analyses are working! There are no specific updates yet, but I think the current version of spm1d might be able to handle your analyses...

Repeated-measures n-way ANOVA will be available in the next major release of spm1d (version 0.3). This will be available for download later this year. Nevertheless, the current version of spm1d supports linear mixed modeling for some repeated measures designs through a two-level procedure:

  1. Estimate subject-specific effects.
  2. Test those effects across subjects (this regards SUBJECT as random).

Here is a worked example.

For your experiment I think this two-level approach could work as follows:

(Level 1) Estimate speed effects once for each individual, separately for each group. You can have an arbitrary number of trials for each subject. This will yield one β trajectory per subject, per group; that β trajectory represents the least-squares estimate of the slope.

(Level 2) Compare the β trajectories for the two groups using a paired t test (for a repeated measures design) or a two-sample t test (otherwise).

This two-level approach is equivalent to a full repeated-measures mixed model which incorporates SPEED (as a continuous variable), GROUP (as a fixed categorical variable) and SUBJECT (as a random variable). Both spm1d v.0.2 and currently planned future versions will continue to support arbitrary linear mixed modeling through this two-level approach.

Cheers,

Todd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants