Linear Regression - Repeat Measurements

8 views (last 30 days)
Anna
Anna on 4 May 2014
Commented: Star Strider on 4 May 2014
Hi Everyone,
I am fairly new to Matlab and have a problem using Linear Regression.
I have an experiment where I have taken multiple repeat measurements. To simplify my problem I have a 10 by 1 vector of predictor variables (independent variables) and a 10 by 5 matrix of response variables (dependent variables). I know that these data should follow a linear trend and I want to evaluate how linear they actually are.
I want to apply a robust least square fitting to the average of my dependent variables at each independent variable. I can do this using robustfit. My problem arises as I also would like to weight the least square fitting method by the variance of the dependent variables at each data point. I can't figure out how to do this.
Any help would be greatly appreciated!
Best,
Siri

Answers (2)

Star Strider
Star Strider on 4 May 2014
Repeated measures problems have their own statistical requirements. I agree with Tom Lane’s answer to: Setting weights for robustfit command because I can’t improve on it. See the documentation for glmfit for details.
  1 Comment
Star Strider
Star Strider on 4 May 2014
After looking around the Statistics Toolbox functions for a few minutes, I suggest you see the documentation: Set Up Multivariate Regression Problems. It seems to be closest to what you need.
(I apologise for the delay ... GMT-6 here.)

Sign in to comment.


Anna
Anna on 4 May 2014
Hi Star Strider,
Thanks for your answer. I have had a look through the documentation for glmfit but I am still a bit confused how to use glmfit with multiple response variables (I assume that's how I would treat my repeat measurements?). Would you perhaps be able to give me an example code line? Do I need to use another function?
thanks,
Siri

Community Treasure Hunt

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

Start Hunting!