Clear Filters
Clear Filters

Reading Robustfit Stats Results

8 views (last 30 days)
balsip
balsip on 13 May 2017
Commented: John McDowell on 3 Dec 2018
Using robustfit, I'm looking to find the R^2 and p-value for the resulting linear regression. I'm using two vectors, and returning stats. The code takes the form:
[X,STATS] = robustfit(A,B)
Is anything in the resulting STATS structure the R^2 or the p-value?
Clearly, the p listed within STATS is a tantalizing possibility, but why is it a 2x1 matrix? I would expect it to be a single value; one R^2 value for the linear regression.
The Matlab documentation for robustfit ( https://www.mathworks.com/help/stats/robustfit.html ) tells me that p is the "p-values for t", and t is the "Ratio of b to se", and you can see how a newbie to stats might be perplexed at this point.
I do not have any additional toolboxes, FYI.
Full disclosure: I am slowly getting familiar with statistics in general, so please excuse the shortcomings and oversights.
Thanks, everyone.
  1 Comment
John McDowell
John McDowell on 3 Dec 2018
Did you ever work out the answer to this question? I am trying to work out the similarity between two curves, and had been recommended robusfit(). However, the 2x1 matrix of pvalues confuses me also, and I can find no plainly worded explanation of the STAT outputs.

Sign in to comment.

Answers (0)

Categories

Find more on Descriptive Statistics in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!