Using mvregress with only within-subject predictor variables

1 view (last 30 days)
Prabhjot Dhami
Prabhjot Dhami on 2 Dec 2020
Commented: Aditya Patil on 22 Dec 2020
Greetings Matlab community,
I am trying to set up a multivariate linear regression model but am having difficulty doing so.
I have three correlated response variables, and I would like to regress them against the interaction between two within-subject variables.
The first within subject variable is site, and has six levels (site A, B, C, D, E, F), and the second within subject variable is time, with two levels (time1 and time 2).
Unfortunately, I am still struggling to use mvregress, as I don't think I am setting up my table corrrectly. Currently, it is in the follwing format:
response_variable1 response_variable2 response_variable3 ...
SiteA_time1 SiteB_time1 SiteC_time1 SiteD_time1 SiteE_time1 SiteF_time1 ...
SiteA_time2 SiteB_time2 SiteC_time2 SiteD_time2 SiteE_time2 SiteF_time2
Any insight or help would be greatly appreciated.
Thank you.
  1 Comment
Aditya Patil
Aditya Patil on 22 Dec 2020
Can you elaborate on the format of the data? Are these column names that you have mentioned?

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!