get_p: get_p generic.

Description Usage Arguments Methods (by class) Examples

View source: R/get_far.R

Description

Compute the probability of exeeding a given point.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
get_p(object, ...)

## S3 method for class 'gauss_fit'
get_p(object, pnt, ...)

## S3 method for class 'gpd_fit'
get_p(object, pnt, under_threshold = FALSE, ...)

## S3 method for class 'gev_fit'
get_p(object, pnt, ...)

Arguments

object

an object of class gauss_fit, gev_fit, gpd_fit.

...

Arguments to be passed to methods,

pnt

a point which consists of a line of data.frame containing the same variables used for the fit. It can bet set using the function set_pnt

under_threshold

used for gpd_fit. It tells whether it provides an estimated when the point is under the GPD threshold. In which case, gives the empirical probability obtained by quantile regression.

Methods (by class)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
data(tas)

ge_fit <- gev_fit(eur_tas, data=tas, mu_mod=~gbl_tas, sig_mod=~gbl_tas, time_var="year")
gp_fit <- gpd_fit(eur_tas, data=tas, mu_mod=~gbl_tas, sig_mod=~gbl_tas, time_var="year", qthreshold=0.9)
ga_fit <- gauss_fit(eur_tas, data=tas, mu_mod=~gbl_tas, sig_mod=~gbl_tas, time_var="year")

t1 <- 2003
t0 <- 1990
xp <- 1.6
pnt1 <- set_pnt(t1, xp, time_var="year", tas)
pnt0 <- set_pnt(t0, xp, time_var="year", tas)

get_p(ga_fit ,pnt1)
get_far(ga_fit, pnt0, pnt1)

get_p(gp_fit, pnt1)
get_far(gp_fit, pnt0, pnt1)

get_p(ge_fit, pnt1)
get_far(ge_fit, pnt0, pnt1)

thaos/FARg documentation built on May 25, 2019, 8:18 a.m.

Related to get_p in thaos/FARg...