dtcG: Meta-Gaussian models distributions

View source: R/tcG.R

dtcGR Documentation

Meta-Gaussian models distributions

Description

Density, distribution function, quantile function and random generation of a meta-Gaussian distribution with parameters theta.

Usage

dtcG(y, theta, name, ym = 0, step = 0)

ptcG(y, theta, name, ym = 0, step = 0)

qtcG(p, theta, name, ym = 0, step = 0)

rtcG(n, theta, name, ym = 0, step = 0)

Arguments

y

vector of quantiles (rainfall)

theta

model parameters

name

name of the anamorphosis, one of 'power','power-exp', 'quadratic-power', 'gp'

ym

minimal value that can be observed

step

discretization step

p

vector of probabilities

n

number of observations to generate

Details

Four meta-Gaussian models are available (name argument): 'power','power-exp', 'quadratic-power', 'gp'

Value

dtcG gives the density, ptcG gives the distribution function, qtcG gives the quantile function and rtcG generates random deviates.

Functions

  • ptcG: probability function

  • qtcG: quantile function

  • rtcG: random generation function

Examples

theta=c(-1,0.2,0.9,0.1)
s=seq(0,2,0.01)

sim = rtcG(1e4, theta, "gp")
d = dtcG(s, theta, "gp")
hist(sim, probability=TRUE)
lines(s, d, col=2)

mbtgy/tcG documentation built on Oct. 19, 2023, 3:10 p.m.