Last data update: 2014.03.03

R: This function finds the bivariate joint probability or the...
omegaR Documentation

This function finds the bivariate joint probability or the binary correlation from the corresponding Gaussian correlation x

Description

This function finds the bivariate joint probability or the binary correlation from the corresponding Gaussian correlation x

Usage

omega(x = 0.5, p0_v1 = 0.5, p0_v2 = NA, correlation = FALSE)

Arguments

x

value of expected correlation between the corresponding Gaussian-distributed variables

p0_v1,p0_v2

probability of no precipitation occurences for the v1 and v2 time series respectively. See Notes.

correlation

logical numeric value. Default is FALSE. If TRUE the function returns the binary correlation like eq. 6 of Mhanna, et al.,2011.

Value

probability of no precipitation occurence in both v1 and v2 simultaneously. It is a matrix if x is a matrix.

Note

This function makes use of normal copula. A graphical introduction to this function (with its inverse) makes is present in the following URL references: http://onlinelibrary.wiley.com/doi/10.1002/joc.2305/abstract and http://www.sciencedirect.com/science/article/pii/S0022169498001863 (See fig. 1 and par. 3.2) If the argument p0_v2, the two marginal probabily values must be given as a vector through the argument p0_v1: p0_v1=c(p0_v1,p0_v2) . In case x is a correlation/covariance matrix the marginal probabilities are given as a vector through the argument p0_v1.

Author(s)

Emanuele Cordano

References

D.S. Wilks (1998), Multisite Generalization of a Daily Stochastic Precipitation Generation Model, Journal of Hydrology, Volume 210, Issues 1-4, September 1998, Pages 178-191, http://www.sciencedirect.com/science/article/pii/S0022169498001863

Muamaraldin Mhanna and Willy Bauwens (2011) A Stochastic Space-Time Model for the Generation of Daily Rainfall in the Gaza Strip, International Journal of Climatology, Volume 32, Issue 7, pages 1098-1112, http://dx.doi.org/10.1002/joc.2305

See Also

normalCopula,pcopula

Examples

rho <- 0.4
p00 <- omega(x=rho,p0_v1=0.5,p0_v2=0.5)
cor00 <- omega(x=rho,p0_v1=0.5,p0_v2=0.5,correlation=TRUE)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(RGENERATEPREC)
Loading required package: copula
Loading required package: RGENERATE
Loading required package: RMAWGEN
Loading required package: chron
Loading required package: date
Loading required package: vars
Loading required package: MASS
Loading required package: strucchange
Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

Loading required package: sandwich
Loading required package: urca
Loading required package: lmtest

Attaching package: 'vars'

The following object is masked from 'package:copula':

    A

Loading required package: blockmatrix
Loading required package: Matrix
Loading required package: stringr

Attaching package: 'stringr'

The following object is masked from 'package:strucchange':

    boundary

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/RGENERATEPREC/omega.Rd_%03d_medium.png", width=480, height=480)
> ### Name: omega
> ### Title: This function finds the bivariate joint probability or the
> ###   binary correlation from the corresponding Gaussian correlation 'x'
> ### Aliases: omega
> 
> ### ** Examples
> 
> rho <- 0.4
> p00 <- omega(x=rho,p0_v1=0.5,p0_v2=0.5)
> cor00 <- omega(x=rho,p0_v1=0.5,p0_v2=0.5,correlation=TRUE)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>