Re: [R-sig-Geo] Plotting probability exceedance

2023-02-15 Thread Bede-Fazekas Ákos
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, rain1...@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 
> To: r-sig-geo@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@r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>     [[alternative HTML version deleted]]
>
> ___
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

[[alternative HTML version deleted]]

___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


Re: [R-sig-Geo] Plotting probability exceedance

2023-02-15 Thread rain1290--- via R-sig-Geo
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 
To: r-sig-geo@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@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

    [[alternative HTML version deleted]]

___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

[[alternative HTML version deleted]]

___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


Re: [R-sig-Geo] Plotting probability exceedance

2023-02-14 Thread Bede-Fazekas Ákos
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@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

[[alternative HTML version deleted]]

___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo