The FREQ statement effectively treats each observation in the input data set as though it occurred the number of times indicated by its value in the FREQ variable. When fitting a model, you can use the FREQ statement to enter summarized (aggregated) data containing only the unique, observed combinations of variable values along with a variable indicating the number of times each occurred in the raw data. For example, when modeling categorical data, the FREQ statement can be used when the observations in your data are the cell counts of a contingency table as opposed to observations for each subject. Note that because the FREQ variable is intended to indicate counts, the values are required to be integers. Noninteger values are truncated to integers.
Use the WEIGHT statement when you want the observations to contribute unequally in the fitting of the model. For a procedure using the maximum likelihood estimation method, the weights multiply the contributions of observations to the likelihood function that is maximized by the procedure. In logistic models, weights are often used to adjust for oversampling (sampling with respect to the response levels). While weighting can also be used to adjust the parameter estimates for sampling of populations defined by the predictor variables, it does not assure proper estimation of their standard errors. Survey sampling methods are required for proper variance estimation. These methods are only available in the SURVEY procedures such as the SURVEYMEANS, SURVEYFREQ, and others.
Note that the WEIGHT statement does not change the sample size (N) that is used in formulas for some statistics. The FREQ statement does affect N as described above. Unlike the FREQ variable whose values must be integers, weights can be fractional. Observations with zero or negative FREQ or WEIGHT values are ignored by modeling procedures. This can result in missing predicted values from the modeling procedure. For more discussion on causes of missing predictions, see SAS KB0057141.
In many cases, using an integer-valued variable as a WEIGHT variable or as a FREQ variable results in the same parameter estimates and standard errors. (This is not true for Generalized Estimating Equations (GEE) models fit in the GEE or GENMOD procedure in SAS/STAT® or in the LOGSELECT or GENSELECT procedures in SAS® Viya®.) However, other statistics such as the Schwartz criterion (SC or BIC) might differ if N is involved in their computation. For example, in the Hosmer-Lemeshow test available in PROC LOGISTIC, weights affect the statistic only through their effect on the model parameter estimates, while frequencies affect the observed and total counts in the statistic's formula. Consequently, a variable that is used as a FREQ variable can result in a dramatically different LACKFIT statistic than if it is used as a WEIGHT variable.
In some modeling procedures such as the LOGISTIC and GENMOD procedures, arbitrarily inflating the values of a FREQ or WEIGHT variable (for instance, multiplying them by a constant) drives all effects toward significance. For this reason, weights are typically normalized so that they sum to the actual sample size. You can control weight normalization using the NORMALIZE or NONORMALIZE option in the WEIGHT statement in various procedures in SAS/STAT and SAS Viya.