Hi everyone,
I am really glad to know that we can ask question about R.Mark here !
(I am pretty new so I am sorry if my question is too basic.)
I am using "Occupation models" class from the Quebec center of biodiversity science to search my own data about lizards.
I am currently working on lizard with 4 encounter occassions / 3 individual covariates for occupancy (Psi) (TROU/VEG/LINK) + 4 individual covariates about each visits (p) (SO1:SO4).
(Before, I was working on MARK by Gary White, but I would like to test it on R)
During my work, I met a new problem with the "unmarkedFrameOccu" : it says that my number of rows in obsCov is false but with dim I counted that there is 25 lines and 4 rows... What is the problem ? Is it the form ?
Here the following script I used :
####Standardization of variables
###Occupation-related variables: 3"
trou_mean <- mean(donnees_LO$TROU)
trou_sd <- sd(donnees_LO$TROU)
trou_std <- as.data.frame((donnees_LO$TROU - trou_mean))
names(trou_std)[1] = paste("trou_std")
veg_mean <- mean(donnees_LO$VEG)
veg_sd <- sd(donnees_LO$VEG)
veg_std <- as.data.frame((donnees_LO$VEG - veg_mean))
names(veg_std)[1] = paste("veg_std")
link_mean <- mean(donnees_LO$LINK)
link_sd <- sd(donnees_LO$LINK)
link_std <- as.data.frame((donnees_LO$LINK - link_mean))
names(link_std)[1] = paste("trou_std")
"Variables related to each visit: 4"
lumiere = donnees_LO[, c(8:11)] # Lumiere is for (Soleil / Ombre : Sun/Dark on my wall)
lumiere_mean <- mean(as.vector(as.matrix(lumiere)))
lumiere_sd <- sd(as.vector(as.matrix(lumiere)))
lumiere_std <- (lumiere - lumiere_mean)/lumiere_sd
dim(lumiere_std) #
[1] 25 4
# Données LO
LO_data <- unmarkedFrameOccu( y = donnees_LO[, c(1:4)], siteCovs = list(trou_std=trou_std,veg_std=veg_std,link_std=link_std), obsCovs = lumiere_std)
And returns the error message :
Erreur : Incorrect number of rows in obsCovs data frame
And I don’t know the reason… Any advice or help would be appreciated.
Have a nice day,
Best regards,
Jeanne
_______________________________d