multimodel inference with occupancy models through packages unmarked and MuMIn

756 views
Skip to first unread message

Matteo Serafini

unread,
Sep 1, 2014, 2:51:06 PM9/1/14
to unma...@googlegroups.com
Hi,

I just started to work with the unmarked package to build an occupancy model for single season. I have 10 visits in 60 sampling sites where I collected the data for presence/absence. I decided to use 19 variables to model the probability of occupancy and 5 for detection probability . I want use the saturated model (by function "occu") to build a series of models (by funtion "dredge") by exploiting the variables not correlated with each other and sorting through the AIC. To do this following the manual I created my "unmarkedframeoccu"; 
datioccu <- unmarkedFrameOccu (y = y, = siteCovs=siteCovs, obsCovs = obsCovs) 

I standardized the covariates;
 
siteCovs (datioccu) <- scale (siteCovs (datioccu)) 
obsCovs (datioccu) <- scale (obsCovs (datioccu)) 
summary (datioccu) 

unmarkedFrame Object 

60 sites 
Maximum number of observations per site: 10 
Mean number of observations per site: 10 
Sites with at least one detection: 16 

Tabulation of y observations: 
    0 1 <NA> 
  575 25 0 

Site-level covariates: 
      M.ALT 
  Min.: -1.6176 
  1st Qu.: - 0.7610 
  Median: -0.1851 
  Mean: 0.0000 
  3rd Qu .: 0.4670 
  Max.: 3.2359
...

after that I created subsets of pairs of correlated variables to be matched with the function "dredge" in package Mumin. So I created the saturated model for the probability of occupancy and then I used dredge .. 
I encountered two problems that I can't solve .. . 

1) when I make the summary of the saturated model, a warning message appears:

> summary(fm)

Call:
occu(formula = ~1 ~ M.ALT + M.ESP + M.PEND + INDICE.RUGOSITA + 
    RAI.U.SELV + WUDI + DENSITA.STRADE + AREA.PROT + COLTIVI + 
    URBANO + B.LAT + B.CONIF + B.MIX + COPERTURA.BOSCO + ARBUSTI + 
    ACQUA + PRATO.PASCOLI + ROCCIA, data = datioccu)

Occupancy (logit-scale):
                 Estimate   SE      z P(>|z|)
(Intercept)     -218.3990  NaN    NaN     NaN
M.ALT           -100.8181  NaN    NaN     NaN
M.ESP            -71.7237  NaN    NaN     NaN
M.PEND          -186.8668  NaN    NaN     NaN
INDICE.RUGOSITA  200.1589  NaN    NaN     NaN
RAI.U.SELV       -74.8588  NaN    NaN     NaN
WUDI               0.0999  NaN    NaN     NaN
DENSITA.STRADE  -235.1968  NaN    NaN     NaN
AREA.PROT         49.9990  NaN    NaN     NaN
COLTIVI         -114.1952  NaN    NaN     NaN
URBANO            59.1606  NaN    NaN     NaN
B.LAT             46.5793  NaN    NaN     NaN
B.CONIF         -218.2509  NaN    NaN     NaN
B.MIX            103.4909 5057 0.0205   0.984
COPERTURA.BOSCO   -3.7102  NaN    NaN     NaN
ARBUSTI            2.7122  NaN    NaN     NaN
ACQUA            -82.6868  NaN    NaN     NaN
PRATO.PASCOLI    196.2937 8185 0.0240   0.981
ROCCIA            -9.5193  NaN    NaN     NaN

Detection (logit-scale):
 Estimate    SE     z  P(>|z|)
    -1.89 0.215 -8.79 1.46e-18

AIC: 187.9634 
Number of sites: 60
optim convergence code: 0
optim iterations: 60 
Bootstrap iterations: 0 

Warning message:
In sqrt(diag(vcov(obj))) : NaNs produced

I try to use another method for the optim (the only one that not produced NaNs is the  "CG" method but the next warning is : 
 Model did not converge. Try providing starting values or increasing maxit control argment.
). I also try to change the starting values using the same of the null model;

Call:
occu(formula = ~1 ~ 1, data = datioccu)

Occupancy:
 Estimate    SE      z P(>|z|)
   -0.408 0.454 -0.899   0.369

Detection:
 Estimate    SE    z  P(>|z|)
    -2.15 0.326 -6.6 4.21e-11

AIC: 203.4256 

in this way:

fm<-occu(~1 ~M.ALT +...,datioccu, starts=c(-0,408,-2.15))

but the result is another problem..

Error in occu(~1 ~ M.ALT ...  : 
  The number of starting values should be 20

2) the second problem is when I use "dredge": 

> dd<-dredge(fm,subset=subs)
Error in dredge(fm, subset = subs) : 
  unrecognized names in 'subset' expression: "M.ALT", "......

How can I solve this problems?

best regards

Matteo Serafini

Jeffrey Royle

unread,
Sep 1, 2014, 2:55:22 PM9/1/14
to unma...@googlegroups.com
You don't have sufficient data to consider such a complex model. Even if you don't object to this on philosophical grounds, I'm sure you have a basic identifiability problem with only 25 detections in the data set.  You could track this down by building the model stepwise from the null model (having no covariates) and find out "when the data run out"

regards
andy



--
You received this message because you are subscribed to the Google Groups "unmarked" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unmarked+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matteo Serafini

unread,
Sep 6, 2014, 10:22:48 AM9/6/14
to unma...@googlegroups.com
Thank you very much for your reply, Andy, 
I was not going to use the model with all variables but use the "dredge" to create models with all possible combinations of those variables (from 1 to n covariates) and then use the "occu" for the occupancy models. I usually use this approach with logistic regression always using presence data; 

model <-glm (presencedata ~ all variables, family = binomial, data = data) 
dd <-dredge (model, subset = subs) 

where in "subs" imposed which variables should not come together in the model because they related to each other. 

and finally 

model.avg (get.models (dd, delta <4)) 

do you think it is possible to use something with unmarked? 

the few detections are due to the low density of the species (wolf) and the type of monitoring program on a large scale .. 

best regards

matteo
Reply all
Reply to author
Forward
0 new messages