有没有一种方法可以计算两个具有不同范围的单独数据集的检测概率?

huangapple go评论54阅读模式
英文:

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&lt;-data.frame(est=c(0.2327,0.2443,0.4988, 0.5823))

Observed Data (df2) df2&lt;-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 &lt;- df1 %&gt;% filter(est &lt;= 0.4)
filtered_df2 &lt;- df2 %&gt;% filter(obs &gt; 1)

huangapple
  • 本文由 发表于 2023年6月15日 08:59:08
  • 转载请务必保留本文链接:https://go.coder-hub.com/76478425.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定