Reputation: 1079
I am trying to use RSM and calculate 3rd order polynomials.for quadratic below is given in Matlab Help:
stats = regstats(rsmOutput,rsmMatrix,'quadratic','beta');
b = stats.beta; % Model coefficients
How can I calculate 3rd order coefficients? My reason is that with quadratic I have rsquare of 93% and my observed responses is third order.
Upvotes: 2
Views: 2615
Reputation: 1079
modelMatrix = [0 0 0;
1 0 0;
0 1 0;
0 0 1;
1 1 0;
1 0 1;
0 1 1;
2 0 0;
0 2 0;
0 0 2;
1 1 1;
2 1 0;
2 0 1;
1 2 0;
1 0 2;
0 2 1;
3 0 0;
0 3 0;
0 0 3];
stats = regstats(rsmOutput,rsmMatrix,modelMatrix,'beta');
Upvotes: 0
Reputation:
For
stats = regstats(y,X,model,whichstats)
the 'model' can be a matrix of model terms accepted by the 'x2fx' function. See x2fx for a description of this matrix and for a description of the order in which terms appear. You can use this matrix to specify other models including ones without a constant term.
Upvotes: 1