A Pure-Error Lack-of-Fit Test and Replicate-Adjusted R-Square (STB-9: srd13) ------------------------------------------------------------- ^maxr2^ (for use after ^fit^, see ^help fit^.) Description ----------- To obtain a pure error lack-of-fit test and an R-square that is adjusted for the constraints caused by replicated cases. Note that neither ^if^ nor ^in^ are allowed -- this program will automatically make use the same ^if^ and ^in^ commands used in your ^fit^ command; the program will also automatically ignore any cases for which the dependent variable, or any independent variable, is missing. Three blocks of information are presented: 1. The maximum possible R-square for this model on this data set; that is, the presence of replicates (cases tied on all independent variables but differing on the dependent variable) makes an R-square of 1.0 impossible; this is a measure of what the maximum achievable R-square is for these data and this model. Accompanying this are relative R-square and adjusted relative R-square; these are just the actual R-square and actual adjusted R-square divided by the maximum R-square. Note that this is not meaningful unless you have a real regression--that is, a regression where the only independent variable is a dummy will show a max R-square equal to the actual R-square and will be unable to perform the lack-of-fit test. 2. The pure-error lack-of-fit test; this decomposes the residual sum of squares into two parts: that due to variation among the replicates (called the pure error SS) and a remainder (called lack-of-fit SS); the ratio MSLF/MSPE is an F-test for whether the regression is adequate in the sense defined by how good the fit is among the replicates. If the F-test is statistically significant then you have a bad fit. If there are NO replicates, then the results will appear as missing values as this test is not meaningful. 3. The number of actual covariate patterns in the data and what this is as a ratio of the number of cases in the regression: this gives some idea of the extent of replicates; as the ratio approaches 0, you will also notice that the max R-square gets smaller and smaller.