I've got a matrix A containing 1000 x 9 data " Predictor Variables", and a Y matrix containing 1000×1 data " Response Variable". I need to launch automatically lots of FitLM commands but with only 3 data of A matrix each time (not 9 all together). The combination of 3 data from 9 from A matrix are 84 that I can obtain with NchooseK:
v = [1 2 3 4 5 6 7 8 9];p = nchoosek(v,3)
about FitLM the command is this but I need to use only 3 column/data from A predictor and not 9 as the following code.
mdl = fitlm(A,Y)
How can combine NchooseK data with FitLM with a FOR loop or something else??? I need to bring and put each time a different combination of 3 data from row of NchooseK and put it in FitLM, but I don't know how do that.
Thanks for help.
Best Answer