gamma_par_from_gen_gamma_par: Gamma parameters from generalized gamma parameters and...

Description Usage Arguments Value Author(s)

View source: R/gamma_par_from_gen_gamma_par_function.R

Description

If a variable x follows a gamma distribution the dependent variable y, which is related to x via a power law relationship y=a*x^b follows a generalized gamma distribution (GG). The parameters of the gamma distribution can be calculated from the input GG parameters and the power law coefficients. Two alternative formulations for the GG exist in the literature, one of which uses parameters named a, d, p while the other one uses mu, sigma, Q (e.g., R package flexsurv). Both parameter sets are accepted by this function. For parameter conversion see also: https://en.wikipedia.org/wiki/Generalized_gamma_distribution

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
gamma_par_from_gen_gamma_par(
  pl.fac,
  pl.exp,
  gg.a,
  gg.d,
  gg.p,
  gg.mu,
  gg.sigma,
  gg.Q,
  flexsurv.form = F
)

Arguments

pl.fac

Power law prefactor

pl.exp

Power law exponent

gg.a

GG parameter

gg.d

GG parameter

gg.p

GG parameter

gg.mu

GG parameter (flexsurv form)

gg.sigma

GG parameter (flexsurv form)

gg.Q

GG parameter (flexsurv form)

flexsurv.form

Switch whether to use the default GG parameter set (a, d, p) or the flexsurv GG parameter set (mu, sigma, Q)

Value

Vector containing gamma parameters shape, scale, rate as well as descriptive statistics mean, var, sd and skewness of the gamma distribution

Author(s)

Nikolai Knapp, nikolai.knapp@ufz.de


niknap/ScalingFunctions documentation built on May 22, 2021, 6:43 a.m.