MATLAB Answers

Accounting for Covariates: which is the best test and how to do this in matlab

4 views (last 30 days)
Rayvara123 on 3 May 2020
Edited: Adam Danz on 5 May 2020
I would really appreciate some help. I have been trying to find out which is the best test to account for Covariates. I have a repeated measures design. For instance participants will see on of two stimuli, and we will collect two or more continuous data relating to that stimuli. For instance how long they perceived the stimuli to last and the time it took to respond. There are a few other similar continous stimuli.
I have done repeated measures t test for all of these dependant variables. However, I am mostly interested how long they perceived the stimuli to last. I now want to see if my data is still significant considering the other continous data as possible covariates. (FYI this is just an example)
From reading around (although it seems unclear) I think I need a mancova. However can you advise what is the best test to run and how to run it in matlab (or point me in the direction)?


Sign in to comment.

Answers (1)

Adam Danz
Adam Danz on 3 May 2020
You could perform an analysis of covariance using anovan() and explicitly identiying the covariates. Here's an example from data I recently analyzed,
[p,tbl,stats,terms] = anovan(y,{cc, factor}, 'Continuous',1,'model','interaction',...
where cc is the continuous covariate and factor is the categorical variable. Importantly, note that the Continuous property indicates that the first variable in the 2nd input is continuous. If there's more than 1 continuous covariate, use a vector of indices. This is all described in the documentation, as well.


Show 4 older comments
Rayvara123 on 4 May 2020
All participants will rate all the case studies. They will rate the person with depression and the person with anxiety, and any other mh illness.
Is this not something you would consider repeated measures?
Rayvara123 on 4 May 2020
This is as opposed to option where some participants rate the case with anxiety, and the rest of the participants rating the case with depression
Adam Danz
Adam Danz on 4 May 2020
That is a repeated measures and covariates (money and ratings) could potentially vary between the mh groups so the link I shared on constant covariates does not apply.
From your question, ' I am mostly interested how long they perceived the stimuli to last. ', but I don't see that variable in your description.
What's the exact question you're asking because that will determine which statistic to use.

Sign in to comment.


Translated by