MATLAB: Average and new observation confidence bounds for predicting Non linear models

averagecurvefalsefitnlmlinearMATLABmeanmodelnewnonobservationspredictpredictionsimultaneoustrue

I am using the "fitnlm" function to fit a non linear model. 
I am then using the predict the function to predict the model for given confidence bounds. However, I also need the predictions for the fitted mean values and the new observations. 
How do I get this?

Best Answer

You can use the "Prediction" name-value pair argument to change the type of prediction performed by the "predict" function. 
Type of prediction:
  • 'curve' — predict predicts confidence bounds for the fitted mean values.
  • 'observation' — predict predicts confidence bounds for the new observations.