model_no2 <- terra::rast(paste0(system.file("extdata",package="eva3dm"),
"/camx_no2.Rds"))
omi_no2 <- terra::rast(paste0(system.file("extdata",package="eva3dm"),
"/omi_no2.Rds"))
# generate the statistical indexes
sat(mo = model_no2,ob = omi_no2,rname = 'NO2_statistical')
# generate categorical evaluation using 3.0 as threshold
sat(mo = model_no2,ob = omi_no2,rname = 'NO2_categorical',
eval_function = cate, threshold = 3.0)
# customizing the evaluation function: inclusion of p.value from stats::cor.test()
stat_p <- function(x, y, ...){
table <- eva3dm::stat(x, y, ...)
cor.result <- stats::cor.test(x, y, ... )
table$p.value <- cor.result$p.value
table <- table[,c(1:4,12,5:11)]
return(table)
}
sat(mo = model_no2,ob = omi_no2,rname = 'NO2_statistical_with_p',eval_function = stat_p)
Run the code above in your browser using DataLab