Confidence interval

Asked

Viewed 84 times

1

I would like to generate the confidence interval values for some explanatory variables of the HUNTED response variable. The data is distributed in 3 distinct time periods. However, when I use the code: library (MASS) confint (allspecies4) I only get error messages (see below). Would anyone know how to improve my script so I can access the confidence interval? Note: My data set is very large, so I only put a part of it here.

allspecies4<-read.csv(file= "dadosGLMM.csv", header= TRUE, sep= ";" )
attach(allspecies4)
library(lme4)
allspecies4<- glmer(HUNTED~ eco+TrophicLevel+age+ log(body_mass)+
                      habitat+ABUND + PERIOD + tabu +(1|Specie),
                    data=dadosGLMM, family=binomial)

library(MASS)
confint(allspecies4)
library(MASS)
> confint(allspecies4)
Computing profile confidence intervals ...
Error in zeta(shiftpar, start = opt[seqpar1][-w]) : 
  profiling detected new, lower deviance
In addition: Warning messages:
1: In nextpar(mat, cc, i, delta, lowcut, upcut) :
  unexpected decrease in profile: using minstep
2: In nextpar(mat, cc, i, delta, lowcut, upcut) :
  unexpected decrease in profile: using minstep
3: In nextpar(mat, cc, i, delta, lowcut, upcut) :
  unexpected decrease in profile: using minstep
4: In nextpar(mat, cc, i, delta, lowcut, upcut) :
  unexpected decrease in profile: using minstep
5: In (function (fn, par, lower = rep.int(-Inf, n), upper = rep.int(Inf,  :
  failure to converge in 10000 evaluations
6: In nextpar(mat, cc, i, delta, lowcut, upcut) :
  unexpected decrease in profile: using minstep
7: In nextpar(mat, cc, i, delta, lowcut, upcut) :
  unexpected decrease in profile: using minstep
8: In nextpar(mat, cc, i, delta, lowcut, upcut) :
  unexpected decrease in profile: using minstep
9: In FUN(X[[i]], ...) : non-monotonic profile for (Intercept)
Specie body_mass TrophicLevel age eco habitat PERIOD HUNTED ABUND tabu
  Cerc_mit      3.70            2  57   2       F DURING      0     2    1
  Cerc_mit      3.70            2  57   2       F  AFTER      0     3    1
  Cerc_mit      3.70            2  57   2       F BEFORE      0     4    1
  Cerc_mit      3.70            2  67   2       F DURING      1     2    1
  Cerc_mit      3.70            2  67   2       F  AFTER      0     2    1
 Chlor_cyn      3.70            2  53   2       S DURING      0     3    0
 Chlor_cyn      3.70            2  74   2       S DURING      0     3    0
 Chlor_cyn      3.70            2  30   2       S DURING      0     4    0
 Chlor_cyn      3.70            2  63   2       S DURING      0     4    0
 Chlor_cyn      3.70            2  54   2       S DURING      0     3    0
 Chlor_cyn      3.70            2  30   2       S DURING      0     4    0
 Chlor_cyn      3.70            2  30   2       S DURING      0     3    0
 Phil_mont      3.69            2  24   3       F DURING      0     3    0
 Phil_mont      3.69            2  24   3       F BEFORE      0     4    0
 Phil_mont      3.69            2  33   3       F  AFTER      1     4    0
 Phil_mont      3.69            2  33   3       F BEFORE      0     4    0
 Phil_mont      3.69            2  33   3       F DURING      0     4    0
 Phil_mont      3.69            2  43   3       F BEFORE      0     4    0
 Phil_mont      3.69            2  43   3       F DURING      0     4    0

    1. This subset of data is not enough, it gives me error "Fixed-Effect model Matrix is rank deficient so dropping 3 Columns / coefficients" and "Warning messages: 2: Hessian is numerically singular: Parameters are not uniquely determined". 2) In its code does allspecies4<-read.csv(...) but then allspecies4<- glmer(..., data=dadosGLMM) when the data name is not the file name, is allspecies4. And you should use another name for the model, never the name of the date.frame. 3) Never use attach, does nothing useful and can be dangerous. Delete that line quickly and don’t think about it anymore.
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.