BookmarkSubscribeRSS Feed
cbt2119
Obsidian | Level 7

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

3 REPLIES 3
Rick_SAS
SAS Super FREQ

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.

ballardw
Super User

@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.

cbt2119
Obsidian | Level 7

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
Percent
Row Pct
Col Pct

No

Yes

Total

Positive

28
8.86
9.06
100.00

281
88.92
90.94
97.57

309
97.78


Negative

0
0.00
0.00
0.00

7
2.22
100.00
2.43

7
2.22


Total

28
8.86

288
91.14

316
100.00

 

Thanks,

Cara

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 608 views
  • 1 like
  • 3 in conversation