Multivariate regression input for multivariable problem
Show older comments
Hi everyone!
I acquired some data from images to be processed for a master thesis, and since I've decided I need to look at all the variable together, I had a look at the page on multivariate regression, but I am a bit confused as how I should input the design matrix.
Let me first explain the kind of data I have to work on: I segment images of eyeball model, that I can rotate on a stage both in the vertical (up/down) and horizontal(left/right) sense. From the images I extract a vector linking two points of interest on the eye, that I divide in the x and y component. I am interested to see the linearity of the relation between the vertical rotation and the horizontal and vertical offset and the horizontal rotation and the horizontal and vertical offset (even if ideally vertical rotations should only depend on the vertical offset etc.)
The data I have are: the vertical and horizontal rotations, which I know, and the grid I obtain rotating the eye vertically, then scanning horizontally, the rotating vertically again etc. Say, I have pictures with the eye at 5 degrees vertical rotation for horizontal degrees ranging from -30 to 30 degrees, and then I acquire again the same horizontal range but with 10 degrees vertical rotation, and so on. For each image I have two outputs (the x an y offset, that is the vectors components). so if I have a 9x9 grid, my matrix will be 9x9x2 and the vector with the known angles will be 9x2. My unknowns will be 6: 2 intercepts and 4 slopes (relative to both rotations and both offsets for each rotation).
I don't really understand how I should input these data into the mvregress command, especially the part regarding the fact that I have more than one response variable (in my case 2), that is the dimension of the response matrix Y. If this happens, it says:
If d > 1 and all d dimensions have the same design matrix, then you can specify X as a single n-by-p design matrix (not in a cell array).
If d > 1 and all n observations have the same design matrix, then you can specify X as a cell array containing a single d-by-K design matrix.
If d > 1 and all n observations do not have the same design matrix, then specify X as a cell array of length n containing d-by-K design matrices.
What does exactly means? How can I understand in which case am I? How should I input the data anyway?
Thank you all very much!
Accepted Answer
More Answers (0)
Categories
Find more on Linear Predictive Coding in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!