r Reduced chi-squared statistic How do you perform Reduced chi-squared test in r. Are there any r routines or functions related to this Reduced chi-squared test ? 
I didn't find any examples regarding these tests . Does anyone have any advice?
 A: A reduced chi-square would (assuming the values of the $\sigma_i$ are truly the population standard deviations of the $Y_i$ and all the usual assumptions hold) have the distribution of a chi-squared divided by its degrees of freedom.
All one need do is then multiply by the degrees of freedom (the value previously used to 'reduce' the chi-squared statistic), getting back to an ordinary unreduced chi-squared statistic, and calculate an ordinary chi-squared upper tail probability. 
If the chi-squared value is sufficiently large (the corresponding p-value is sufficiently small -- how small will depend on your area) but the assumptions all hold, then a correct model would be unlikely to produce a value at least as large as this (and so would be regarded as untenable).
[This is straightforward in almost any statistics package - even many spreadsheet programs. For example, in R, if X is the reduced chi-squared statistic and df is the corresponding degrees of freedom, then  pchisq(X*df,df,lower.tail=FALSE) should do it.]
Note that if the model is nonlinear in parameters, or if the parameters are not estimated efficiently, the df may not be correct, or indeed the statistic may not actually be distributed as a chi-squared.
