MATLAB: How to get p-value, RMSE out of fitlm

fitlmMATLAB

I use mdl = fitlm(X,y,'robust','on') to get the statistics of my regression, and I know how to get the Rsquare: R2 = md1.Rsquared.Ordinary;
My question is how do I get the p-value and RMSE out of the fitlm results?
Thanks.

Best Answer

mdl = fitlm(rand(7,1),rand(7,1))
mdl.RMSE
mdl.Coefficients.pValue