Due to sparse data and separation issue, I am running Firth or exact logistic regression instead of regular logistic regression. The statistics of interest is risk difference instead of odds ratio. I noticed that I can run "%nlmeans" with output from proc logistic firth but there is warning message "WARNING: The final Hessian matrix is not positive definite, and therefore the estimated covariance matrix is not full rank and may be
As mentioned in the Warning, the results may not be reliable. You should try to modify your model in some way so that the Warning does not occur, or possibly try an alternative analysis method. For example, if all of your predictors are categorical, you might be able to use a stratified approach in PROC FREQ or PROC MULTTEST as shown in this note. With the nonmodel-based stratified analysis in PROC FREQ, you could use the COMMONRISKDIFF option to get an estimate of the risk difference. Exact analysis is another option if the data set is small. However, since the LSMEANS and ESTIMATE statements cannot be used with exact analysis, the NLMeans macro, which uses results from one of these statements, cannot be used with the exact analysis results.
Thanks for the reply. Soon after I posted this question, I saw the documentation here that states that the warning sign can be ignored. Running the Firth logistic regression itself does not produce any warning or error messages. The model converges. Yes, all of the covariates are categorical and has sufficient counts. The number of events are generally low hence the use of Firth. So my question on the validity of NLMeans output for Firth logistic regression still stands.
Also, while these modeling approaches might run into similar estimation problems, you could try the log-linked binomial model or the modified Poisson model as described in this note on estimating the relative risk.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.