Dear SAS Community
I have an outcome that is a qualitative PCR test (Positive vs. Negative) and the Cycle threshold results for this test (numerical, ~20-36).
I have been using a linear regression model to predict a higher Ct number and increased likelihood of a negative result, but I also want to model the data using logistic regression for the dichotomous outcome, Positive vs. Negative.
I have a low case number (7) for a sample size of 316. When I run fit a logistic model using a dichotomous predictor, vl50 (0=No, 1=Yes), I get this warning:
NOTE: PROC LOGISTIC is fitting the generalized logit model. The logits modeled contrast each
response category against the reference category (pcr='Positive').
WARNING: There is possibly a quasi-complete separation of data points. The maximum likelihood
estimate may not exist.
WARNING: The LOGISTIC procedure continues in spite of the above warning. Results shown are based
on the last maximum likelihood iteration. Validity of the model fit is questionable.
I did some googling and tried using a logistic regression model and a penalized Firth correction with the " exact predictor / estimate=both;" statement, but returned the same warning.
Does anyone know if there is a better procedure for fitting data like this?
My model is attached:
proc logistic data=work_ct descending;
class pcr (ref='Positive') / param=ref;
class vl50 (ref='No') / param=ref;
model pcr = vl50 / link=glogit;
exact vl50 / estimate=both;
format pcr pcrf. vl50 binaryf.;
quit;
Thank you
Cara
I don't know what a "small case number" is, but often this error indicates that the explanatory variable (vl50) is able to perfectly predict the response variable (pcr). To find out, use
proc freq data=work_ct;
tables pcr * vl50;
run;
If there is Post the results. I think you will see that one or more of the cells in the table is empty. For example, the cell for vl50=1 and PCR='Positive' might have zero counts.
BTW, for a binary response, you don't have to use the GLOGIT link function. You can use the default link, which is logit.
@Rick_SAS wrote:
I don't know what a "small case number" is, but often this error indicates that the explanatory variable (vl50) is able to perfectly predict the response variable (pcr). To find out, use
proc freq data=work_ct;
tables pcr * vl50;run;
If there is Post the results. I think you will see that one or more of the cells in the table is empty. For example, the cell for vl50=1 and PCR='Positive' might have zero counts.
BTW, for a binary response, you don't have to use the GLOGIT link function. You can use the default link, which is logit.
Make you use the same formats that you did for the variables in the Proc Logistic code.
I do have a 2x2 cell with a zero value. I tried using Firth correction but the model still isn't appropriate for the data. I might just have to scrap the regression.
Table of pcr by vl50 | |||
PCR | vl50 | ||
Frequency | No | Yes | Total |
Positive | 28 | 281 | 309 |
Negative | 0 | 7 | 7 |
Total | 28 | 288 | 316 |
Thanks,
Cara
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.