MATLAB: Extract model’s p-value from fitnlm

fitnlmp-value

Dear all,
I am using the Statistical Toolbox (Matlab2013b) to perform a regression analysis. Using apply different regression functions to my dataset (linear,quadratic,exponential) using "fitnlm". I want to choose the best function based on R^2 and p-value. The R^2 is found in the model's output fields. The overall p-value I can't find though it is displayed in the command window: Nonlinear regression model, e.g.:
y ~ b1*x1^2 + b2*x1 + b3
Estimated Coefficients:
Estimate SE tStat pValue
b1 0.02495 0.010583 2.3575 0.027708
b2 -0.75062 1.0529 -0.71294 0.48337
b3 14.633 24.854 0.58877 0.56201
Number of observations: 25, Error degrees of freedom: 22 Root Mean Squared Error: 8.27 R-Squared: 0.897, Adjusted R-Squared 0.887 F-statistic vs. constant model: 95.5, p-value = 1.43e-11
My tool should extract the model p-value = 1.43e-11 automatically (not the individual coefficients' pValue in the table). How can I do this?
Thanks!

Best Answer

In 2016a, this information is accessible via: mdl.Coefficients.pValue (assuming that mdl is the structure returned by fitnlm).