runehaubo / ordinal

R package ordinal: Regression Models for Ordinal Data
Other
33 stars 12 forks source link

clmm summary doesn't show p-values #43

Closed iciarjimm closed 2 years ago

iciarjimm commented 3 years ago

Hi! I really need help with this. I run the following model in R:

 clmm_br<-clmm(Grado_amenaza~Life_Form  + size_max_cm + leaf_length_mean  + petals_length_mean + 
 silicua_length_mean + bloom_length + categ_color+ (1|Genero) , data=brasic1)

I didn't get any warning or error but when I run summary(clmm_br) I can't get the p-values:

  summary(clmm_br)

 Cumulative Link Mixed Model fitted with the Laplace approximation

 formula: Grado_amenaza ~ Life_Form + size_max_cm + leaf_length_mean +  
    petals_length_mean + silicua_length_mean + bloom_length +  
    categ_color + (1 | Genero)
 data:    brasic1

 link  threshold nobs logLik AIC    niter      max.grad cond.H
 logit flexible  76   -64.18 160.36 1807(1458) 1.50e-03 NaN   

 Random effects:

  Groups Name        Variance       Std.Dev. 
  Genero (Intercept) 0.000000008505 0.00009222

 Number of groups:  Genero 39 

 Coefficients:
                      Estimate Std. Error z value Pr(>|z|)
Life_Form[T.G]        2.233338         NA      NA       NA
Life_Form[T.Hem]      0.577112         NA      NA       NA
Life_Form[T.Hyd]    -22.632916         NA      NA       NA
Life_Form[T.Th]      -1.227512         NA      NA       NA
size_max_cm           0.006442         NA      NA       NA
leaf_length_mean      0.008491         NA      NA       NA
petals_length_mean    0.091623         NA      NA       NA
silicua_length_mean  -0.036001         NA      NA       NA
bloom_length         -0.844697         NA      NA       NA
categ_color[T.2]     -2.420793         NA      NA       NA
categ_color[T.3]      1.268585         NA      NA       NA
categ_color[T.4]      1.049953         NA      NA       NA

Threshold coefficients:
    Estimate Std. Error z value
1|3   -1.171         NA      NA
3|4    1.266         NA      NA
4|5    1.800         NA      NA
(4 observations deleted due to missingness)

I tried with no random effects and excluding the rows with NAs but it's the same

The structure of my data here:

str(brasic1)
tibble[,13] [80 x 13] (S3: tbl_df/tbl/data.frame)
 $ ID                 : num [1:80] 135 137 142 145 287 295 585 593 646 656 ...
 $ Genero             : chr [1:80] "Alyssum" "Alyssum" "Alyssum" "Alyssum" ...
 $ Cons.stat          : chr [1:80] "LC" "VU" "VU" "LC" ...
 $ Amenazada          : num [1:80] 0 1 1 0 1 0 0 1 0 0 ...
 $ Grado_amenaza      : Factor w/ 5 levels "1","3","4","5",..: 1 2 2 1 4 1 1 2 1 1 ...
 $ Life_Form          : chr [1:80] "Th" "Hem" "Hem" "Th" ...
 $ size_max_cm        : num [1:80] 12 6 7 15 20 27 60 62 50 60 ...
 $ leaf_length_mean   : num [1:80] 7.5 7 11 14.5 31.5 45 90 65 65 39 ...
 $ petals_length_mean : num [1:80] 2.2 3.5 5.5 2.55 6 8 10.5 9.5 9.5 2.9 ...
 $ silicua_length_mean: num [1:80] 3.5 4 3.5 4 25 47.5 37.5 41.5 17.5 2.9 ...
 $ X2n                : num [1:80] 32 NA 16 16 NA NA 20 20 18 14 ...
 $ bloom_length       : num [1:80] 2 1 2 2 2 2 2 2 11 2 ...
 $ categ_color        : chr [1:80] "1" "4" "4" "4" ...

Thank you so much for your help:)

runehaubo commented 3 years ago

It seems that your model fit is singular as indicated by the extreme coefficient for Life_Form[T.Hyd] so in addition to removing the random effects for Genero you should try to simplify the fixed-effects structure of the model.

Cheers Rune