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