**1: Why am I getting error messages in SAS-Callable SUDAAN when I try to use SUDAAN's PROC LOGISTIC?**

**7: Why am I getting the error message "No Data on File"?**

**1: Why am I getting error messages in SAS-Callable SUDAAN when I try to use SUDAAN's PROC LOGISTIC?**

SAS has a procedure named LOGISTIC. To use SAS-Callable SUDAAN’s LOGISTIC procedure you must use the procedure alias, RLOGIST.

**2: In MULTILOG and LOGISTIC what does the following message mean? "WARNING: One or more parameters are approaching infinity. The data may have singularities for the model you are trying to fit."**

There are some models and data for which one or more of the parameters are logically infinite. Correspondingly, the probabilities for some or all of the observations become 0 or 1. The process cannot converge in these cases, and may produce floating point divide errors, exponential overflow errors, or other unpredictable results. SUDAAN now analyzes the data before fitting the model in PROCs LOGISTIC and MULTILOG and removes records which are logically associated with infinite betas. In some cases where the number of observations in a cell in the table created by crossing the response variable with the independent effect is very small but nonzero, even removing these records may not completely alleviate the problem. This is the reason for this warning. We recommend that in cases such as this you first run PROC CROSSTAB with a table of the form DEPVAR*(independent effects), and print NSUM and WSUM for each cell. Consider removing observations associated with near-zero cells in the table, and /or removing these terms from the model.

**Example:**

Suppose you have the following statements in PROC LOGISTIC, and you are getting the warning message above.

- PROC LOGISTIC DATA=mydat FILETYPE=SAS DESIGN=WR;

NEST STR PSU;

WEIGHT WGT;

SUBGROUPS A B C;

LEVELS 2 3 4;

MODEL Y = A B A*C;

Execute the following PROC CROSSTAB:

- PROC CROSSTAB DATA=mydat FILETYPE=SAS DESIGN=WR;

NEST STR PSU;

WEIGHT WGT;

RECODE Y = (0 1);

SUBGROUPS A B C Y;

LEVELS 2 3 4 2;

TABLES Y*(A B A*C);

PRINT NSUM WSUM;

**3: In the modeling procedures, what does this message mean? "DATA WARNING: The matrix for estimable parameters is singular. The model may be overspecified. You should reduce the number of variables on the right-hand side and refit the model before attempting to draw any conclusions."**

This message is printed during execution of the modeling procedures when the rank of the estimation matrix (MODELCOV in REGRESS, LOGISTIC, LOGLINK, and MULTILOG) is less than the maximum number of estimable parameters for the model. Consider eliminating one variable at a time from the model to determine which variable(s) are causing the problem.

**4: What does this message mean? "There is a problem with nest variable STRVAR=2 in record 100. It has only one PSUVAR whose value is 17."**

During the processing of your data, SUDAAN encountered a stratum that contains only one unique PSU. In this example, SUDAAN determined that the stratum coded as STRVAR=2 contained only one PSU, coded PSUVAR=17.

Two or more PSUs are needed in each stratum in order for SUDAAN to be able to estimate variance. You can verify whether this is the case by looking at a cross-tabulation of your strata and PSU variables.

If each of your strata contains two or more unique PSUs, then you may need to sort your data in the order given by the variables on the NEST statement. This sorting needs to be done prior to running SUDAAN.

If one of your strata does contain only one PSU, then the following are possible solutions:

- 1. If you subsetted the data in order to obtain estimates for a specific domain, you should instead try using SUDAAN's SUBPOPN statement to specify the domain. You should not subset your data prior to running SUDAAN since this can result in a loss from the data file of part of the design.

2. Manually combine or collapse the stratum that contains only one PSU with another stratum. This should be done prior to running SUDAAN. You may want to consult with a statistician prior to combining strata.

3. Use the MISSUNIT option on the NEST statement. This option causes the variance contribution of the PSU to be estimated as the difference between the PSU's value and the overall mean value for the population. Chapter 3 of the SUDAAN User's Manual gives further information about this option. You may want to consult with a statistician prior to using this option.

**5: What does this message mean? "WARNING: MAX relative difference during matrix inversion was 0.001."**

This warning indicates that for your data there is a possible problem with the inversion of the X'X matrix. The model that you specify yields an X matrix that is not numerically stable.

**6: We got the following warning message while running PROC LOGISTIC: "WARNING: DDF (32) < maximum number of independent parameters in the model (40)" Can we ignore it?**

The estimate of the variance-covariance matrix for all 40 parameters is likely to be inaccurate and misleading. The true variance-covariance matrix will have rank=40, whereas the estimated matrix will have at most rank=32. Your data do not support such a large model.

**7: Why am I getting the error message "No Data on File"?**

The message "No Data on File" usually indicates that SUDAAN has not found any valid data on file. Remember that SUDAAN rejects records on which the WEIGHT variable is non-positive. In addition, in the modeling procedures SUDAAN rejects all records on which any model variable (left or right-hand side) is missing. SUBGROUP variables outside the range of 1…LEVEL are considered missing.

Suppose you have the following program and you are getting the "No Data on File" Message:

- PROC MULTILOG DATA=in.test FILETYPE=SAS DESIGN=WR;

NEST STRATUM PSU;

WEIGHT WGT;

SUBGROUP SEX AGEGRP EDUC OVERWT;

LEVELS 2 6 5 2;

MODEL OVERWT = SEX AGEGRP EDUC;

PRINT BETA SEBETA;

You can check to see whether you have these sorts of problems by executing a program similar to the following RECORDS procedure:

- PROC RECORDS DATA=in.test FILETYPE=SAS CONTENTS COUNTREC;

/* SUBPOPN statement selects only records which SUDAAN can use in the model */

- SUBPOPN WGT>0 & SEX<0 & SEX<=2 & AGEGRP>0 & AGEGRP<=6 & EDUC>0 & EDUC<=5 OVERWT>0 & OVERWT<=2;

/* Print the first few valid records */

- PRINT / MAXREC=20;

If printing the data does not clarify the problem, then send the program and data (zipped!) to sudaan@rti.org so that we can help you.