Density, distribution function, quantile function, and random generation for transformed global horizontal irradiance (GHI).

dsolarGHI(x, Ct, alpha, beta, pdf_Y, log = FALSE, link = "invgumbel")

psolarGHI(
  x,
  Ct,
  alpha,
  beta,
  cdf_Y,
  log.p = FALSE,
  lower.tail = TRUE,
  link = "invgumbel"
)

qsolarGHI(
  p,
  Ct,
  alpha,
  beta,
  cdf_Y,
  log.p = FALSE,
  lower.tail = TRUE,
  link = "invgumbel"
)

rsolarGHI(n, Ct, alpha, beta, cdf_Y, link = "invgumbel")

Arguments

x

Numeric vector of quantiles.

Ct

Numeric scalar or vector of clear-sky radiation values.

alpha

Numeric scalar. Lower transformation parameter.

beta

Numeric scalar. Scale transformation parameter. Typically beta > 0 and alpha + beta < 1.

pdf_Y

Function. Density function of the latent variable Y.

log

Logical. If TRUE, dsolarGHI() returns log-densities.

Character string specifying the transformation link. Supported values are "invgumbel", "gumbel", "logis", and "norm".

cdf_Y

Function. Distribution function of the latent variable Y.

log.p

Logical. If TRUE, probabilities are supplied or returned on the log scale.

lower.tail

Logical. If TRUE, probabilities are \(P[X \le x]\); otherwise, \(P[X > x]\).

p

Numeric vector of probabilities.

Value

  • dsolarGHI() returns a numeric vector of density values.

  • psolarGHI() returns a numeric vector of probabilities.

  • qsolarGHI() returns a numeric vector of quantiles.

  • rsolarGHI() returns a numeric vector of random draws.

Details

Consider a latent random variable \(Y\) with density pdf_Y and distribution function cdf_Y. With the inverse Gumbel link, the transformed solar radiation variable is $$R_t(y) = C(t) (1-\alpha-\beta \exp(-\exp(y)))$$ with support \([C(t)(1-\alpha-\beta), C(t)(1-\alpha)]\).

Note

Version 1.0.0.

Examples

alpha <- 0.001
beta <- 0.9
Ct <- 7
dsolarGHI(c(3, 5), Ct, alpha, beta, dnorm)
#> [1] 0.1609695 0.1722155
psolarGHI(c(3, 5), Ct, alpha, beta, pnorm)
#> [1] 0.2161542 0.5558880
qsolarGHI(c(0.1, 0.9), Ct, alpha, beta, pnorm)
#> [1] 2.220151 6.821243

set.seed(1)
rsolarGHI(3, Ct, alpha, beta, pnorm)
#> [1] 3.301378 3.931476 5.098486