Why does R show "NaN" for standard error and p values of coefficients from binomial regression model (using logbin function)?

261 views Asked by At

I have used the "logbin" function in R to create the following binomial regression model:

logbintest1 <- logbin(anydiagnosis ~ gender + age + socioeco_status+dsdm_category+family_history+mental_before_hiv
                     +relations+sexual_life+stigma_discrimination,data=finaldata, method="cem")

I have tried using different methods ("cem", "em", "ab").

First of all, running the model takes a long time (even though my dataset consists of only 428 participants).

Secondly, when I use the "summary" function to find the coefficients of the binomial regression model, the standard error and p values are not shown. It only says "NaN".

I get the following output when using the "summary" command:

Call:
logbin(formula = anydiagnosis ~ gender + age + socioeco_status + 
    dsdm_category + family_history + mental_before_hiv + relations + 
    sexual_life + stigma_discrimination, data = finaldata, method = "ab")

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-1.7197  -0.5736  -0.4313  -0.3938   2.3071  

Coefficients:
                         Estimate Std. Error z value Pr(>|z|)
(Intercept)            -1.515e+00        NaN     NaN      NaN
gender2                 1.500e-01        NaN     NaN      NaN
age                    -3.339e-03        NaN     NaN      NaN
socioeco_status2       -2.920e-01        NaN     NaN      NaN
socioeco_status3       -2.418e-01        NaN     NaN      NaN
socioeco_status5       -3.077e+02        NaN     NaN      NaN
dsdm_category2          3.826e-01        NaN     NaN      NaN
dsdm_category3          2.086e-01        NaN     NaN      NaN
dsdm_category4          7.268e-01        NaN     NaN      NaN
family_history2        -6.611e-01        NaN     NaN      NaN
mental_before_hiv2      4.848e-01        NaN     NaN      NaN
mental_before_hiv3      1.748e+00        NaN     NaN      NaN
relations2              2.402e-01        NaN     NaN      NaN
relations3              3.571e+02        NaN     NaN      NaN
sexual_life2            5.043e-01        NaN     NaN      NaN
sexual_life3           -1.726e+02        NaN     NaN      NaN
stigma_discrimination2  6.379e-01        NaN     NaN      NaN
stigma_discrimination3 -1.849e+02        NaN     NaN      NaN

    Null deviance: 381.36  on 427  degrees of freedom
Residual deviance: 331.44  on 410  degrees of freedom

  AIC: 367.44 
AIC_c: 369.11 

Number of iterations: 508

Warning message:
MLE on boundary of parameter space, cannot use asymptotic covariance matrix

Do you have any idea why I am getting these NaNs? I have removed NAs from my dataset.

And what does the message "MLE on boundary of parameter space, cannot use asymptotic covariance matrix" mean?

Thanks a lot!

0

There are 0 answers