sosruko
sosruko

Reputation: 1079

Response Surface Methodology-Third Order

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

Answers (2)

sosruko
sosruko

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

anon
anon

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

Related Questions