[R-sig-Geo] Plotting probability exceedance
Bede-Fazekas Ákos
b|@|ev||@t @end|ng |rom gm@||@com
Thu Feb 16 08:55:15 CET 2023
Hello,
As far as I understand, for one point (i.e., one row of the
sf/data.frame) you have several precipitation values, but can calculate
one exceedance probability from these values. So an xy-plot is not the
best choice for visualization of this kind of data. Or you'll have the
same y value (probability) for several x values (precipitation). If this
is not a problem for you, then I suggest using tidyr::pivot_longer() to
transfrom the precipitation values from the several columns to one. Then
you can draw the xy-plot by ggplot or base plot or even lattice plot.
HTH,
Ákos
__________
Ákos Bede-Fazekas
Centre for Ecological Research, Hungary
2023.02.16. 2:52 keltezéssel, rain1290 using aim.com írta:
> Hi Akos,
>
> Thank you so much for this suggestion! Indeed, I have 25 data points
> in each column, and yes, the data are normally distributed. Using the
> pnorm function is actually quite useful, as well. To that end, could
> the values of exceedance probability from pnorm be somehow plotted
> against their associated precipitation thresholds on an xy plot, for
> example?
>
> Another idea that came to mind is the use of Probability Density
> Functions, but can these really be used to graphically show exceedance
> probabilities?
>
> Thanks, again!
>
> -----Original Message-----
> From: Bede-Fazekas Ákos <bfalevlist using gmail.com>
> To: r-sig-geo using r-project.org
> Sent: Wed, Feb 15, 2023 1:59 am
> Subject: Re: [R-sig-Geo] Plotting probability exceedance
>
> Hello,
>
> You should know or make assumptions on the distribution of the
> precipitation. Let's say it is normally distributed (i.e. bell-shaped).
> Then you can calculate the probability of exceeding the quantile /q/ by
> pnorm(q, mean, sd, lower.tail = FALSE).
> If you have several spatial points and a lot of measurments (stored in
> columns of the sf/data.frame) for each of the points, then use
> apply(X, MARGIN = 1, FUN = function(measurements) {return(pnorm(q, mean,
> sd, lower.tail = FALSE))})
> and you can display the probabilities in a map.
>
> HTH,
> Ákos
> __________
> Ákos Bede-Fazekas
> Centre for Ecological Research, Hungary
>
> 2023.02.15. 1:28 keltezéssel, rain1290--- via R-sig-Geo írta:
> > Hi there,
> > I have climate data pertaining to extreme precipitation, as well as
> carbon emissions associated with those precipitation values in a
> dataframe.
> > The goal of my analysis would be to determine the probability of
> exceeding specific thresholds of precipitation extremes, as well as
> showing this graphically (I am imagining this by placing extreme
> precipitation on the the x-axis and exceedance probabilities on the
> y-axis).
> > My question is if anyone has an idea how to approach this, or a good
> starting place? I have looked online, but there is nothing specific to
> really draw on.
> > Thank you for your time, and I look forward to your response!
> > [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-Geo mailing list
> > R-sig-Geo using r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list