Skip to content

Brutsaert-Veron shear driven distribution

License

GPL-3.0, GPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE
GPL-3.0
LICENSE.md
Notifications You must be signed in to change notification settings

eliardocosta/BVshear

Repository files navigation

BVshear

The goal of BVshear is to provide density, probability, quantile and random generation functions for the Brutsaert-Veron shear driven distribution.

Installation

You can install the development version of BVshear from GitHub with:

install.packages("remotes")
library(remotes)
install_github("eliardocosta/BVshear")

Examples

These are basic examples showings how to use the functions of the package for the Brutsaert-Veron shear driven distribution:

library(BVshear)
# density at 0.03 for u = 0.5
dBVshear(x = 0.03, u = 0.5) 

# log-density at 0.03 for u = 0.5
dBVshear(x = 0.03, u = 0.5, log = TRUE) 

# P(X <= 0.03) for u = 0.5
pBVshear(q = 0.03, u = 0.5) 

# P(X > 0.03) for u = 0.5
pBVshear(q = 0.03, u = 0.5, lower.tail = FALSE) 

# median of the distribution for u = 0.5
qBVshear(p = 0.5, u = 0.5)

set.seed(1234)
tau <- rBVshear(n = 1E4, u = 0.5)
eps <- 0.005
hist(tau, freq = FALSE, breaks = seq(0, max(tau) + eps, eps), xlim = c(0, 0.2), 
     ylim = c(0, 40), xlab = "Contact time", main = "Histogram of contact times")

About

Brutsaert-Veron shear driven distribution

Resources

License

GPL-3.0, GPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE
GPL-3.0
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages