Why is the design matrix different when using x2fx as opposed to the output of cordexch?

1 view (last 30 days)
Dear all,
I have a problem where I am using a D-optimal interaction design with some categorical variables. However, I found it impossible to reconstruct the design matrix "X" from the predictor matrix "dCe" using the "x2fx" function if the number of tries in the "cordexch" function is more than 1. In terms of code, with an example:
[dCe, X1] = cordexch(2, 40, 'interaction', 'categorical', 1:2, 'levels', [3,3], 'tries', 100);
X2 = x2fx(dCe, 'interaction', 1:2);
Why is X1 ~= X2 ? The predictor matrix dCe is the same in both cases, but both functions come up with different design matrices... I found that using only 1 try gets the same output for both cases, but as soon as 'tries' > 1, the matrices differ...

Answers (0)

Community Treasure Hunt

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

Start Hunting!