英文:
Is there a way to calculate probability of detection for two separate datasets that have different ranges?
问题
我有两个不同的数据集,一个数据集的值范围从0到1(估计值),另一个数据集的值范围从-2到2(观测值)。我想知道估计数据集中的值是否等于或小于0.4,以及观测数据集中的值是否大于1。这两个数据集的长度也不同。对于这种情况,检测概率可能不是最好的选择...如果不是的话,什么是最好的选择?
我的数据如下:
估计数据(df1)df1<-data.frame(est=c(0.2327,0.2443,0.4988, 0.5823))
观测数据(df2)df2<-data.frame(obs=c(0.57,0.24,1.62))
我已经尝试了一些类似问题中找到的不同函数,但没有成功。
感谢您提供的任何帮助!
英文:
I have two different datasets, one with values ranging from 0 to 1(estimated) and the other from -2 to 2(observed). I want to know when values are equal to or less than 0.4 in the estimated dataset and when values are greater than 1 in the observed dataset. The datasets are also of differing lengths. Probability of detection may not be the best choice for this...if not what would be?
My data looks like this:
Estimated data (df1) df1<-data.frame(est=c(0.2327,0.2443,0.4988, 0.5823))
Observed Data (df2) df2<-data.frame(obs=c(0.57,0.24,1.62))
I have tried a few different functions I found on similar questions but without luck.
Thank you for any help you can provide!!
答案1
得分: 1
尝试这个:
library(dplyr)
filtered_df1 <- df1 %>% filter(est <= 0.4)
filtered_df2 <- df2 %>% filter(obs > 1)
英文:
Try this:
library(dplyr)
filtered_df1 <- df1 %>% filter(est <= 0.4)
filtered_df2 <- df2 %>% filter(obs > 1)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论