# Statistics toolbox predict new data non linear regression

1 view (last 30 days)

Show older comments

Hi!

After building a non linear model, the example in the matlab statistics toolbox predicts new data. I dont understand

'Xnew = [200,200,200;100,200,100;500,50,5];'

- we have 3 columns with each 13 rows and our output rate. Why does this row has 9 values? And what does ypred?

Please see below the example:

This is our data (X):

470 300 10

285 80 10

470 300 120

470 80 120

470 80 10

100 190 10

100 80 65

470 190 65

100 300 54

100 300 120

100 80 120

285 300 10

285 190 120

Data output(Y):

8.55000000000000

3.79000000000000

4.82000000000000

0.0200000000000000

2.75000000000000

14.3900000000000

2.54000000000000

4.35000000000000

13

8.50000000000000

0.0500000000000000

11.3200000000000

3.13000000000000

.... (Building model - Step 1-5)....

Step 6. Predict for new data

Create some new data and predict the response from both models.

Xnew = [200,200,200;100,200,100;500,50,5];

[ypred yci] = predict(mdl,Xnew)

ypred =

1.8762

6.2793

1.6718

yci =

1.6283 2.1242

5.9789 6.5797

1.5589 1.7846

[ypred1 yci1] = predict(mdl1,Xnew)

ypred1 =

1.8984

6.2555

1.6594

yci1 =

1.6260 2.1708

5.9323 6.5787

1.5345 1.7843

Even though the model coefficients are dissimilar, the predictions are nearly identical.

Thank you!

##### 0 Comments

### Accepted Answer

Roger Wohlwend
on 17 Jun 2014

### More Answers (0)

### See Also

### Community Treasure Hunt

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

Start Hunting!