Title: Distribution of Gaussian Ratios
Version: 3.0.0
Maintainer: Pierre Santagostini <pierre.santagostini@institut-agro.fr>
Description: It is well known that the distribution of a Gaussian ratio does not follow a Gaussian distribution. The lack of awareness among users of vegetation indices about this non-Gaussian nature could lead to incorrect statistical modeling and interpretation. This package provides tools to accurately handle and analyse such ratios: density function, parameter estimation, simulation. An example on the study of chlorophyll fluorescence can be found in A. El Ghaziri et al. (2023) <doi:10.3390/rs15020528> and another method for parameter estimation is given in Bouhlel et al. (2023) <doi:10.23919/EUSIPCO58844.2023.10290111>.
License: GPL (≥ 3)
URL: https://forge.inrae.fr/imhorphen/gaussratiovegind
BugReports: https://forge.inrae.fr/imhorphen/gaussratiovegind/-/issues
Encoding: UTF-8
Config/testthat/edition: 3
Depends: R (≥ 3.5)
Imports: MASS
LazyData: true
Suggests: testthat (≥ 3.0.0)
RoxygenNote: 7.3.3
NeedsCompilation: no
Packaged: 2026-02-19 15:09:51 UTC; psantagosti
Author: Pierre Santagostini [aut, cre], Nizar Bouhlel [aut], Angélina El Ghaziri [aut], David Rousseau [ctb]
Repository: CRAN
Date/Publication: 2026-02-19 16:50:02 UTC

gaussratiovegind: Distribution of Gaussian Ratios

Description

This package provides tools for the distribution of the ratio of Gaussian distributions:

dnormratio

Probability density function

pnormratio

Cumulative distribution function

rnormratio

Sample simulation

estparnormratio

Parameter estimation using the EM (expectation-maximization) algorithm or the variational Bayes method

Details

It is well known that the distribution of Gaussian ratios does not follow a Gaussian distribution.

This issue arises in many vegetation indices based on the ratio of spectral reflectance values from different bands (e.g., near-infrared, red, or chlorophyll content bands) commonly used in remote sensing and agricultural studies. However, the lack of awareness among users of vegetation indices about this non-Gaussian nature often leads to incorrect statistical modeling and interpretation.

This package provides tools to accurately handle and analyze the distribution of such ratios.

Author(s)

Maintainer: Pierre Santagostini pierre.santagostini@institut-agro.fr

Authors:

Other contributors:

References

El Ghaziri, A., Bouhlel, N., Sapoukhina, N., Rousseau, D., On the importance of non-Gaussianity in chlorophyll fluorescence imaging. Remote Sensing 15(2), 528 (2023). doi:10.3390/rs15020528

Bouhlel, N., Mercier, F., El Ghaziri, A., Rousseau, D., Parameter Estimation of the Normal Ratio Distribution with Variational Inference. 2023 31st European Signal Processing Conference (EUSIPCO), Helsinki, Finland, 2023, pp. 1823-1827. doi:10.23919/EUSIPCO58844.2023.10290111

See Also

Useful links:


Statistics on Chlorophyll Fluorescence Parameters

Description

Mean and standard deviation values on healthy and diseased tissues of chlorophyll fluorescence parameters F_0 (minimum fluorescence) and F_m (maximum fluorescence) for a dataset of Arabidopsis thaliana plants infected with fungal pathogen data; parameters of the distribution of the ratio \displaystyle{\frac{F_v}{F_m} = \frac{F_m - F_0}{F_m}}.

Usage

arabidopsis

Format

A data frame with 10 rows and 6 columns:

time

times of the acquisition of chlorophyll fluorescence images

condition

indicates if the plant was inoculated: healthy (inoculated with water) or diseased (inoculated with the pathogen)

mF0, sF0

Mean and standard deviation values of the chlorophyll parameter F_0

mFm, sFm

Mean and standard deviation values of the chlorophyll parameter F_m

beta, rho, delta

the \beta, \rho and \delta_y parameters of the distribution of \displaystyle{\frac{F_v}{F_m} = \frac{F_m - F_0}{F_m}} (distributed according to a normal ratio distribution, see Details)

Details

On each leaf picture, the F_0 and F_m values are normally distributed. Hence, \displaystyle{\frac{F_0}{F_m}} is a ratio of two normal distributions.

Let \mu_{F_0} and \sigma_{F_0} the mean and standard deviation of F_0 and \mu_{F_m} and \sigma_{F_m} the mean and standard deviation of F_m. The parameters \beta, \rho and \delta_y are given by:

\beta = \frac{\mu_{F_0}}{\mu_{F_m}}

\rho = \frac{\sigma_{F_m}}{\sigma_{F_0}}

\delta_y = \frac{\sigma_{F_m}}{\mu_{F_m}}

References

El Ghaziri, A., Bouhlel, N., Sapoukhina, N., Rousseau, D., On the importance of non-Gaussianity in chlorophyll fluorescence imaging. Remote Sensing 15(2), 528 (2023). doi:10.3390/rs15020528

Pavicic, M., Overmyer, K., Rehman, A.u., Jones, P., Jacobson, D., Himanen, K. Image-Based Methods to Score Fungal Pathogen Symptom Progression and Severity in Excised Arabidopsis Leaves. Plants, 10, 158 (2021). doi:10.3390/plants10010158


Density Function of a Normal Ratio Distribution

Description

Density of the ratio of two Gaussian distributions.

Usage

dnormratio(z, bet, rho, delta, r = 0)

Arguments

z

length p numeric vector.

bet, rho, delta

numeric values. The parameters (\beta, \rho, \delta_y) of the distribution, see Details.

r

numeric. The correlation coefficient. Default r=0 (the two distributions are considered independent).

Details

Let two independent random variables X \sim N(\mu_x, \sigma_x) and Y \sim N(\mu_y, \sigma_y).

If we denote \beta = \frac{\mu_x}{\mu_y}, \displaystyle{\rho = \frac{\sigma_y}{\sigma_x}} and \displaystyle{\delta_y = \frac{\sigma_y}{\mu_y}}, the probability distribution function of the ratio \displaystyle{Z = \frac{X}{Y}} is given by:

\displaystyle{ f_Z(z; \beta, \rho, \delta_y) = \frac{\rho}{\pi (1 + \rho^2 z^2)} \left[ \exp{\left(-\frac{\rho^2 \beta^2 + 1}{2\delta_y^2}\right)} + \sqrt{\frac{\pi}{2}} \ q \ \text{erf}\left(\frac{q}{\sqrt{2}}\right) \exp\left(-\frac{\rho^2 (z-\beta)^2}{2 \delta_y^2 (1 + \rho^2 z^2)}\right) \right] }

with \displaystyle{ q = \frac{1 + \beta \rho^2 z}{\delta_y \sqrt{1 + \rho^2 z^2}} } and \displaystyle{ \text{erf}\left(\frac{q}{\sqrt{2}}\right) = \frac{2}{\sqrt{\pi}} \int_0^{\frac{q}{\sqrt{2}}}{\exp{(-t^2)}\ dt} }

Another expression of this density, used by the estparnormratio() function, is:

\displaystyle{ f_Z(z; \beta, \rho, \delta_y) = \frac{\rho}{\pi (1 + \rho^2 z^2)} \ \exp{\left(-\frac{\rho^2 \beta^2 + 1}{2\delta_y^2}\right)} \ {}_1 F_1\left( 1, \frac{1}{2}; \frac{1}{2 \delta_y^2} \frac{(1 + \beta \rho^2 z)^2}{1 + \rho^2 z^2} \right) }

where _1 F_1\left(a, b; x\right) is the confluent hypergeometric function (Kummer's function):

\displaystyle{ _1 F_1\left(a, b; x\right) = \sum_{n = 0}^{+\infty}{ \frac{ (a)_n }{ (b)_n } \frac{x^n}{n!} } }

If X and Y are not independent, let r = Cor(X, Y) = \frac{Cov(X, Y)}{\sigma_X \sigma_Y}, the probability distribution of Z = \frac{X}{Y} is:

\displaystyle{ f_Z(z; \beta, \rho, \delta_y, r) = \frac{\rho \sqrt{1 - r^2}}{\pi (\rho^2 z^2 - 2r \rho z +1)} \ \exp{\left(-\frac{\rho^2 \beta^2 - 2r \beta \rho + 1}{2(1 - r^2) \delta_y^2}\right)} \ {}_1 F_1\left( 1, \frac{1}{2}; \frac{1}{2(1 - r^2) \delta_y^2} \frac{(\beta \rho^2 z - r\rho(z + \beta) + 1)^2}{\rho^2 z^2 - 2r \rho z + 1} \right) }

Value

Numeric: the value of density.

Author(s)

Pierre Santagostini, Angélina El Ghaziri, Nizar Bouhlel

References

El Ghaziri, A., Bouhlel, N., Sapoukhina, N., Rousseau, D., On the importance of non-Gaussianity in chlorophyll fluorescence imaging. Remote Sensing 15(2), 528 (2023). doi:10.3390/rs15020528

Marsaglia, G. 2006. Ratios of Normal Variables. Journal of Statistical Software 16. doi:10.18637/jss.v016.i04

Díaz-Francés, E., Rubio, F.J., On the existence of a normal approximation to the distribution of the ratio of two independent normal random variables. Stat Papers 54, 309–323 (2013). doi:10.1007/s00362-012-0429-2

Pham-Gia, T., Turkkan, N., Marchand, E. (2006) Density of the Ratio of Two Normal Random Variables and Applications, Communications in Statistics - Theory and Methods, 35:9, 1569-1591. doi:10.1080/03610920600683689

See Also

pnormratio(): probability distribution function.

rnormratio(): sample simulation.

estparnormratio(): parameter estimation.

Examples

# First example: ratio of independent variables
beta1 <- 0.15
rho1 <- 5.75
delta1 <- 0.22
dnormratio(0, bet = beta1, rho = rho1, delta = delta1)
dnormratio(0.5, bet = beta1, rho = rho1, delta = delta1)
curve(dnormratio(x, bet = beta1, rho = rho1, delta = delta1),
      from = -0.1, to = 0.7)

# Second example: ratio of correlated variables
beta2 <- 2
rho2 <- 2
delta2 <- 2
r2 <- 0.8
dnormratio(0, bet = beta2, rho = rho2, delta = delta2, r = r2)
dnormratio(1, bet = beta2, rho = rho2, delta = delta2, r = r2)
curve(dnormratio(x, bet = beta2, rho = rho2, delta = delta2, r = r2),
      from = -1.5, to = 2.5)


Estimation of the Parameters of a Normal Ratio Distribution

Description

Estimation of the parameters of a ratio \displaystyle{Z = \frac{X}{Y}}, X and Y being two random variables distributed according to Gaussian distributions, using the EM (estimation-maximization) algorithm or variational inference. Depending on the estimation method, the estparnormatio function calls estparEM (EM algorithm) or estparVB (variational Bayes).

Usage

estparnormratio(z, method = c("EM", "VB"), indep = TRUE, eps = 1e-06,
                       na.rm = FALSE, display = FALSE, graph = FALSE,
                       xlim = NULL, ylim = NULL, mux0 = 1, sigmax0 = 1,
                       alphax0 = NULL, betax0 = NULL, muy0 = 1, sigmay0 = 1,
                       alphay0 = NULL, betay0 = NULL,
                       cov0 = 0)

estparEM(z, indep = TRUE, eps = 1e-06, na.rm = FALSE,
               display = FALSE, graph = FALSE, xlim = NULL, ylim = NULL,
               mux0 = 1, sigmax0 = 1, muy0 = 1, sigmay0 = 1, cov0 = 0)

estparVB(z, eps = 1e-06, na.rm = FALSE, display = FALSE,
                       graph = FALSE, xlim = NULL, ylim = NULL,
                       mux0 = 1, sigmax0 = 1, alphax0 = 1, betax0 = 1,
                       muy0 = 1, sigmay0 = 1, alphay0 = 1, betay0 = 1)

Arguments

z

numeric.

method

the method used to estimate the parameters of the distribution. It can be "EM" (expectation-maximization) or "VB" (Variational Bayes).

indep

logical. If indep=TRUE (default) X and Y are two independent Gaussian variables and the parameters \beta, \rho and delta_y parameters of Z=\frac{X}{Y} are estimated. If indep=FALSE, X and Y can be correlated, and the correlation coefficient r is also estimated.

eps

numeric. Precision for the estimation of the parameters (see Details).

na.rm

a logical evaluating to TRUE or FALSE indicating whether NA values should be stripped before the computation proceeds.

display

logical. When TRUE the successive values of the parameters are printed.

graph

logical. When TRUE the successive values of the parameters are plotted.

xlim, ylim

if graph is TRUE, the x and y limits of the plot. Default: xlim = c(0, 1000) and ylim depend on the initial values of the parameters: ylim = 10*c(0, max(theta)).

mux0, sigmax0, muy0, sigmay0

initial values of the means and standard deviations of the X and Y variables. Default: mux0 = 1, sigmax0 = 1, muy0 = 1, sigmay0 = 1.

alphax0, betax0, alphay0, betay0

initial values for the variational Bayes method. Omitted if method="EM". If method="VB", if omitted, they are set to 1.

cov0

initial value of the covariance of X and Y. If indep is FALSE, cov0 must be different from 0.

Details

Let a random variable: \displaystyle{Z = \frac{X}{Y}},

X and Y being normally distributed: X \sim N(\mu_x, \sigma_x) and Y \sim N(\mu_y, \sigma_y).

The probability density of Z is:

\displaystyle{ f_Z(z; \beta, \rho, \delta_y, r) = \frac{\rho \sqrt{1 - r^2}}{\pi (\rho^2 z^2 - 2r \rho z +1)} \ \exp{\left(-\frac{\rho^2 \beta^2 - 2r \beta \rho + 1}{2(1 - r^2) \delta_y^2}\right)} \ {}_1 F_1\left( 1, \frac{1}{2}; \frac{1}{2(1 - r^2) \delta_y^2} \frac{(\beta \rho^2 z - r\rho(z + \beta) + 1)^2}{\rho^2 z^2 - 2r \rho z + 1} \right) }

with: \displaystyle{\beta = \frac{\mu_x}{\mu_y}}, \displaystyle{\rho = \frac{\sigma_y}{\sigma_x}}, \displaystyle{\delta_y = \frac{\sigma_y}{\mu_y}}, r = Cor(X, Y) = \frac{Cov(X, Y)}{\sigma_X \sigma_Y}.

and _1 F_1\left(a, b; x\right) is the confluent hypergeometric function (Kummer's function):

\displaystyle{ _1 F_1\left(a, b; x\right) = \sum_{n = 0}^{+\infty}{ \frac{ (a)_n }{ (b)_n } \frac{x^n}{n!} } }

If X and Y are independent (r = 0), the probability density is:

\displaystyle{ f_Z(z; \beta, \rho, \delta_y, r = 0) = f_Z(z; \beta, \rho, \delta_y) = \frac{\rho}{\pi (1 + \rho^2 z^2)} \ \exp{\left(-\frac{\rho^2 \beta^2 + 1}{2\delta_y^2}\right)} \ {}_1 F_1\left( 1, \frac{1}{2}; \frac{1}{2 \delta_y^2} \frac{(1 + \beta \rho^2 z)^2}{1 + \rho^2 z^2} \right) }

If method = "EM", the means and standard deviations \mu_x, \sigma_x, \mu_y and \sigma_y and the correlation coefficient r are estimated with the EM algorithm.

When r = 0, \mu_x, \sigma_x, \mu_y and \sigma_y are estimated using the algorithm presented in El Ghaziri et al.

If method = "VB", they are estimated with the variational Bayes method as presented in Bouhlel et al. For now, this method is available only for the case when X and Y are independent, i.e. r = 0.

Then the parameters \beta, \rho, \delta_y of the Z distribution are computed from these means and standard deviations.

The estimation of \mu_x, \sigma_x, \mu_y and \sigma_y uses an iterative algorithm. The precision for their estimation is given by the eps parameter.

The computation uses the kummer function.

If there are ties in the z vector, it generates a warning, as there should be no ties in data distributed among a continuous distribution.

Value

A list of 4 elements beta, rho, delta, r: the estimated parameters of the Z distribution \hat{\beta}, \hat{\rho}, \hat{\delta}_y and \hat{r}, with three attributes attr(, "epsilon") (precision of the result), attr(, "k") (number of iterations) and attr(, "method") (estimation method).

If indep=FALSE, r is not estimated, it is set to 0.

Author(s)

Pierre Santagostini, Angélina El Ghaziri, Nizar Bouhlel

References

El Ghaziri, A., Bouhlel, N., Sapoukhina, N., Rousseau, D., On the importance of non-Gaussianity in chlorophyll fluorescence imaging. Remote Sensing 15(2), 528 (2023). doi:10.3390/rs15020528

Bouhlel, N., Mercier, F., El Ghaziri, A., Rousseau, D., Parameter Estimation of the Normal Ratio Distribution with Variational Inference. 2023 31st European Signal Processing Conference (EUSIPCO), Helsinki, Finland, 2023, pp. 1823-1827. doi:10.23919/EUSIPCO58844.2023.10290111

See Also

dnormratio(): probability density of a normal ratio.

rnormratio(): sample simulation.

Examples


# First example: ratio of independent variables
beta1 <- 0.15
rho1 <- 5.75
delta1 <- 0.22

set.seed(1234)
z1 <- rnormratio(800, bet = beta1, rho = rho1, delta = delta1)

# With the EM method:
estparnormratio(z1, method = "EM", indep = TRUE)

# With the variational method:
estparnormratio(z1, method = "VB")

# Second example: ratio of correlated variables
beta2 <- 0.24
rho2 <- 4.21
delta2 <- 0.25
r2 <- 0.8

set.seed(1234)
z2 <- rnormratio(800, bet = beta2, rho = rho2, r = r2, delta = delta2)

# With the EM method:
estparnormratio(z2, method = "EM", indep = FALSE)



Confluent D-Hypergeometric Function

Description

Computes the Kummer's function, or confluent hypergeometric function.

Usage

kummer(a, b, z, eps = 1e-06)

Arguments

a

numeric.

b

numeric

z

numeric vector.

eps

numeric. Precision for the sum (default 1e-06).

Details

The Kummer's confluent hypergeometric function is given by:

\displaystyle{_1 F_1\left(a, b; z\right) = \sum_{n = 0}^{+\infty}{ \frac{ (a)_n }{ (b)_n } \frac{z^n}{n!} }}

where (z)_p is the Pochhammer symbol (see pochhammer).

The eps argument gives the required precision for its computation. It is the attr(, "epsilon") attribute of the returned value.

Value

A numeric value: the value of the Kummer's function, with two attributes attr(, "epsilon") (precision of the result) and attr(, "k") (number of iterations).

Author(s)

Pierre Santagostini, Angélina El Ghaziri, Nizar Bouhlel

References

El Ghaziri, A., Bouhlel, N., Sapoukhina, N., Rousseau, D., On the importance of non-Gaussianity in chlorophyll fluorescence imaging. Remote Sensing 15(2), 528 (2023). doi:10.3390/rs15020528


Logarithm of the Pochhammer Symbol

Description

Computes the logarithm of the Pochhammer symbol.

Usage

lnpochhammer(x, n)

Arguments

x

numeric.

n

positive integer.

Details

The Pochhammer symbol is given by:

\displaystyle{ (x)_n = \frac{\Gamma(x+n)}{\Gamma(x)} = x (x+1) ... (x+n-1) }

So, if n > 0:

\displaystyle{ log\left((x)_n\right) = log(x) + log(x+1) + ... + log(x+n-1) }

If n = 0, \displaystyle{ log\left((x)_n\right) = log(1) = 0}

Value

Numeric value. The logarithm of the Pochhammer symbol.

Author(s)

Pierre Santagostini, Nizar Bouhlel

See Also

pochhammer, kummer

Examples

lnpochhammer(2, 0)
lnpochhammer(2, 1)
lnpochhammer(2, 3)


Cumulative Distribution of a Normal Ratio Distribution

Description

Cumulative distribution of the ratio of two Gaussian distributions.

Usage

pnormratio(z, bet, rho, delta, r = 0)

Arguments

z

length p vector of quantiles.

bet, rho, delta

numeric values. The parameters (\beta, \rho, \delta_y) of the distribution, see Details.

r

numeric. The correlation coefficient. Default r=0 (the two distributions are considered independent).

Details

Let two random variables X \sim N(\mu_x, \sigma_x) and Y \sim N(\mu_y, \sigma_y) with correlation coefficient r.

If we denote \displaystyle{ f_Z(z; \beta, \rho, \delta_y, r)} the probability distribution function of the ratio \displaystyle{Z = \frac{X}{Y}}, with \beta = \frac{\mu_x}{\mu_y}, \displaystyle{\rho = \frac{\sigma_y}{\sigma_x}}, \displaystyle{\delta_y = \frac{\sigma_y}{\mu_y}} and \displaystyle{r = Cor(X, Y) = \frac{Cov(X, Y)}{\sigma_x \sigma_y}} (see dnormratio(), Details section).

The cumulative distribution for Z is given by:

\displaystyle{F(z; \beta, \rho, \delta_y) = \int_{-\infty}^z{f_Z(z; \beta, \rho, \delta_y, r) dz}}

This integral is computed using numerical integration.

Value

Numeric: the value of density.

Author(s)

Pierre Santagostini, Angélina El Ghaziri, Nizar Bouhlel

References

El Ghaziri, A., Bouhlel, N., Sapoukhina, N., Rousseau, D., On the importance of non-Gaussianity in chlorophyll fluorescence imaging. Remote Sensing 15(2), 528 (2023). doi:10.3390/rs15020528

Marsaglia, G. 2006. Ratios of Normal Variables. Journal of Statistical Software 16. doi:10.18637/jss.v016.i04

Díaz-Francés, E., Rubio, F.J., On the existence of a normal approximation to the distribution of the ratio of two independent normal random variables. Stat Papers 54, 309–323 (2013). doi:10.1007/s00362-012-0429-2

See Also

dnormratio(): density function.

rnormratio(): sample simulation.

estparnormratio(): parameter estimation.

Examples

# First example: ratio of independent variables
beta1 <- 0.15
rho1 <- 5.75
delta1 <- 0.22
pnormratio(0, bet = beta1, rho = rho1, delta = delta1)
pnormratio(0.5, bet = beta1, rho = rho1, delta = delta1)
curve(pnormratio(x, bet = beta1, rho = rho1, delta = delta1), from = -0.1, to = 0.7)

# Second example: ratio of correlated variables
beta2 <- 2
rho2 <- 2
delta2 <- 2
r2 <- 0.8
pnormratio(0, bet = beta2, rho = rho2, delta = delta2, r = r2)
pnormratio(1, bet = beta2, rho = rho2, delta = delta2, r = r2)
curve(pnormratio(x, bet = beta2, rho = rho2, delta = delta2, r = r2),
      from = -1.5, to = 2.5)


Pochhammer Symbol

Description

Computes the Pochhammer symbol.

Usage

pochhammer(x, n)

Arguments

x

numeric.

n

positive integer.

Details

The Pochhammer symbol is given by:

\displaystyle{ (x)_n = \frac{\Gamma(x+n)}{\Gamma(x)} = x (x+1) ... (x+n-1) }

Value

Numeric value. The value of the Pochhammer symbol.

Author(s)

Pierre Santagostini, Nizar Bouhlel

See Also

lnpochhammer, kummer

Examples

pochhammer(2, 0)
pochhammer(2, 1)
pochhammer(2, 3)


Simulate from a Normal Ratio Distribution

Description

Simulate data from a ratio of two Gaussian distributions.

Usage

rnormratio(n, bet, rho, delta, r = 0)

Arguments

n

integer. Number of observations. If length(n) > 1, the length is taken to be the nmber required.

bet, rho, delta

numeric values. The parameters (\beta, \rho, \delta_y) of the distribution, see Details.

r

numeric. The correlation coefficient. Default r=0 (the two distributions are considered independent).

Details

Let two random variables X \sim N(\mu_x, \sigma_x) and Y \sim N(\mu_y, \sigma_y)

with probability densities f_X and f_Y.

The parameters of the distribution of the ratio Z = \frac{X}{Y} are: \displaystyle{\beta = \frac{\mu_x}{\mu_y}}, \displaystyle{\rho = \frac{\sigma_y}{\sigma_x}}, \displaystyle{\delta_y = \frac{\sigma_y}{\mu_y}} and \displaystyle{r = Cor(X, Y) = \frac{Cov(X, Y)}{\sigma_x \sigma_y}}.

\mu_x, \sigma_x, \mu_y and \sigma_y are computed from \beta, \rho and \delta_y (by fixing arbitrarily \mu_x = 1).

If X and Y are independent, i.e. r=0, two random samples \left( x_1, \dots, x_n \right) and \left( y_1, \dots, y_n \right) are simulated.

If X and Y are not independent, a sample \left( (x_1, y_1), \dots, (x_n, y_n) \right) is simpulated using MASS::mvrnorm().

Then \displaystyle{\left( \frac{x_1}{y_1}, \dots, \frac{x_n}{y_n} \right)} is returned.

Value

A numeric vector: the produced sample.

Author(s)

Pierre Santagostini, Angélina El Ghaziri, Nizar Bouhlel

References

El Ghaziri, A., Bouhlel, N., Sapoukhina, N., Rousseau, D., On the importance of non-Gaussianity in chlorophyll fluorescence imaging. Remote Sensing 15(2), 528 (2023). doi:10.3390/rs15020528

Marsaglia, G. 2006. Ratios of Normal Variables. Journal of Statistical Software 16. doi:10.18637/jss.v016.i04

Díaz-Francés, E., Rubio, F.J., On the existence of a normal approximation to the distribution of the ratio of two independent normal random variables. Stat Papers 54, 309–323 (2013). doi:10.1007/s00362-012-0429-2

Pham-Gia, T., Turkkan, N., Marchand, E. (2006) Density of the Ratio of Two Normal Random Variables and Applications, Communications in Statistics - Theory and Methods, 35:9, 1569-1591. doi:10.1080/03610920600683689

See Also

dnormratio(): probability density of a normal ratio.

pnormratio(): probability distribution function.

estparnormratio(): parameter estimation.

Examples

# First example: ratio of independent variables
beta1 <- 0.15
rho1 <- 5.75
delta1 <- 0.22
rnormratio(20, bet = beta1, rho = rho1, delta = delta1)

# Second example: ratio of correlated variables
beta2 <- 0.24
rho2 <- 4.21
delta2 <- 0.25
r2 <- 0.8
rnormratio(20, bet = beta2, rho = rho2, delta = delta2, r = r2)