There are different views on how to assess goodness of fit for nonlinear models. Many investigators want a R^2 value, but some statisticians feel that R^2 values should not be calculated for nonlinear models. The book by Ratkowsky summarizes this perspective. However, I side with others that an "R^2-type" of statistic has value. This is not reported by NLIN, but can be determined manually. The statistic is sometimes called a pseudoR^2, and is defined using just one of the standard definitions for linear models:
pseudoR2 = 1 - (SSerror/SStotal(corrected))
You get SSerror directly from the table in the NLIN output. However, the SStotal(corrected) is not given in this table. There are reasons for this, but I won't go into these here. The NLIN output gives the uncorrected total SS (sum of squares around 0). You can get the total corrected sum of squares (sum of squares around the mean) for y using css with proc means:
proc means data=a css mean var ;
Then do the calculation by hand.With a very bad fit of a model, the pseudo-R2 could actually be negative.
Note: in linear models with an intercept, the mean y corresponds to a reduced model (with an intercept and no other parameters). Thus, the regular R2 is a nice comparison of the relative change in sums of squares between a full and reduced model. But with most nonlinear models, the mean y does not correspond to a reduced model compared with the full model (the nonlinear one being fitted). This is partly why some do not like the idea of R2 for nonlinear models. To me, however, it is still interesting to see the fit of the nonlinear model relative to a model with only the mean y (even though this is not a special case of the other). I realize that others may write in disagreement with my view. I do agree that one must be cautious in interpretation.
There are other statistics, such as MSE, that can/should be used.
You probably want to look at residuals. Just add an output statement in NLIN like:
output out=preds predicted=p residual=r student=s;
There are other keywords that could be added. You can then plot the studentized residuals versus predicted values using GPLOT or SGSCATTER.
Another caution: it can be shown that there can still be a trend in the residual plot even when the appropriate nonlinear model is being fitted. The textbook by Schabenberger and Pierce discuss this at length. There are other types of residuals to consider, but these are tedious to calculate.
Finally: the NLIN procedure will have a nice upgrade in 9.3 of SAS. In particular, there will be some nice ods graphics that will enable you to do a wide range of model assessments.
Thank you for your reply. I know little about SAS.Could you explain that a little more.
"You probably want to look at residuals. Just add an output statement in NLIN like:
output out=preds predicted=p residual=r student=s;"
I run the sentences ,but I didn't get the residuals. why?
how can use GPLOT or SGSCATTER get plot the studentized residuals versus predicted values?