SPSS Statistics

SPSS Statistics

Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers! 

 View Only
  • 1.  Firth regression warnings in SPSS

    Posted Fri July 21, 2023 02:55 PM

    I am running a binary logistic regression looking at the relationship between a number of categorical IVs on level of social capital, which is categorized into high and low. I decided to try running a Firth regression because we have to few cases in the low social capital group that our null model was predicting with 90% accuracy, which I was told may make it very hard for any of our IVs to show an effect since the null model is already so accurate.

    When I try to run the Firth regression in SPSS (version 29. so R is already included) it forces me to make the DV continuous, it won't accept anything but continuous variables. My first questions is why SPSS requires a continuous DV for a binary regression, is it a bug? And will it being set to continuous affect our output?

    Secondly, I am getting a number of warnings when I run the regression that I didn't get in the regular binary regression output. Here is an image from SPSS:

    Any help appreciated! This is for our master's project in occupational therapy, and we don't have access to statisticians despite all being very new to this work. Would love to get the Firth regression working to see if there are any significant interactions we are missing in the regular binary model!



    ------------------------------
    Dana Boyd
    ------------------------------


  • 2.  RE: Firth regression warnings in SPSS

    Posted Fri July 21, 2023 04:49 PM

     The Firth R module is coded to require that the dependent variable have zero one values rather than being an R factor, so the dialog box is set to require that the variable be declared as continuous.  This is a property of the CRAN module and not something that IBM can control.

    This measurement level does not actually mean anything.  The DV is still treated as a two-valued variable and will give the proper result.  If the dv were given an ordinal or nominal measurement level, it would be converted to a factor in R, and the procedure would not work correctly.  You can set the scalelevel with the VARIABLE LEVEL command or in the Data Editor Variable View.

    Of course, for a variable with only two values, the measurement level could be anything, so there is nothing to worry about.

    As for the warning messages, it looks like there are some numerical problems in the algorithm.  The first thing to try is to increase the number of iterations to see if you get convergence.  It might be that the regressor matrix is too ill conditioned to estimate, so you might want to experiment with a reduced model.  Also, try estimating the stardard logistic model (no penalty) with Firth for comparison.

    The last message that refers to X11 tells me that you are on a Mac.  (I am not a Mac user.)  Some R modules try to use some X11 code that requires an additional library not included in the standard R or Mac OS distribution.  (Apple used to ship that software but stopped doing it some time ago).  This has no effect on the logistic results but may impede the plots.  You will need to download and install Quartz on your Mac.

    --