I have a dataframe of four columns (https://www.dropbox.com/s/hho5sgwjhlk4185/data.csv?dl=0). I populated the rtp
column based on the other ones, using the equation 0.03385*(pp**2)*(mv**0.94500)*(cc**(-0.03047))
. Now, I would like to see the uncertainty of this equation and I do not know how to do this. Should I use a form of pseudo dataset or monte carlo and if so, how can I do this for the rtp
column? I use R.
Asked
Active
Viewed 287 times
2

geo_dd
- 283
- 1
- 5
- 22
-
3The uncertainty needs to be derived from the process that created that equation. – Roland Nov 10 '20 at 13:32
-
Hi @Roland, thanks for your comment. Do you suggest something like R2 or error propagation? I believe that error propagation is not derived from the application of the equation(?). – geo_dd Nov 10 '20 at 14:03
-
1No, I'm not suggesting R². I'm probably not suggesting error propagation either (unless your pp, mv, cc values have a known associated uncertainty). You should talk to a local expert. – Roland Nov 10 '20 at 14:06
-
5Seems this belongs on stats.stackexchange.com not stackoverflow.com. – s_baldur Nov 12 '20 at 14:14
-
@sindri_baldur, thank you, kust posted it there. however, can I delete this question from here? – geo_dd Nov 13 '20 at 08:31
-
I think it is best if you can delete the question here. – s_baldur Nov 13 '20 at 08:38
1 Answers
3
As far as I understood your data.csv table, you have one row for each sample. So if I understand it correctly, you already have all the samples with the proper distribution.
You calculated the rtp
column on these samples. Then, if you want the distribution (standard error, confidence intervals) of the rtp
, just take it directly from the rtp sample values! :
dat <- read.csv("data.csv")
mean(dat$rtp)
# [1] 0.008637943
median(dat$rtp)
# [1] 0.005488155
sd(dat$rtp)
# [1] 0.01236283
quantile(dat$rtp, c(0.025, 0.975))
# 2.5% 97.5%
# 0.0007099517 0.0436855541
As simple as this. This is exactly the same principle as you would do it on the MCMC samples, but you already have the samples in each row so no need to use MCMC to generate them.

Tomas
- 57,621
- 49
- 238
- 373
-
thank you for your reply. actually, I used the propagate function and the MC gave me similar values to the above. I wouldn't think to do this so simple. Thanks again! – geo_dd Nov 19 '20 at 07:15
-
@geo_dd yeah! Simplicity can be sometimes very confusing, I know! :-)) Thanks! – Tomas Nov 19 '20 at 18:47