So now the best way to compare the goodness of fittings of different functions is to see how close is the “printout frame->chiSquare” value to 1, am I understanding it right?
Besides, I guess the p-value might also help to tell the goodness, but I am still not sure how to get the p-value of corresponding fitting, anyone know how to do it?
I am not sure I have understood correctly your questions. From this he chisquare value and the number of degree of freedom you can get the p-value for the fit given your function.
To compare different function, one thing you can do is a F-test