Hi everyone,
I'm working on a site-occupancy study. The model selected by unmarked is as following :
mod12 <- occu(~ temperature ~ bush_coverage, data)
Everything works fine when I'm trying to predict and plot data according to siteCovs (bush_coverage) :
nd_cov <- data.frame(bush_coverage = seq(min(site.covs$bush_coverage), max(site.covs$bush_coverage), lenght = 50)) N_pred_cov <- predict(mod12, type = 'state', newdata = nd_cov) plot(nd_cov$bush_coverage, N_pred_cov[,1], colonne) type = "l", lwd = 3, xlab = "Percentage bush coverage", ylab = "Occupancy probability")But when I'm trying to predict detection probability and plot data according to temperature I'm facing a problem :
nd_temp <- data.frame (temp = seq(3,21, by = 0.45)) N_pred_temp <- predict(mod12, type = 'det', newdata = nd_temp)I created a gradient to predict detection in order to get rid of NA values in my obsCovs data frame and nd_temp has the same number of rows as my data. When I'm changing the size of nd_temp I'm only getting a warning, so I'm assuming this gradient size is not the issue here :
'newdata' had 181 rows but variables have 41 rowsI'm sorry if it's a naive question but I can't find where the issue comes from.
Thank you a lot in advance for your help !