rnormratio: Simulate from a Normal Ratio Distribution

rnormratioR Documentation

Simulate from a Normal Ratio Distribution

Description

Simulate data from a ratio of two independent Gaussian distributions.

Usage

rnormratio(n, bet, rho, delta)

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.

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}}.

\mu_x, \sigma_x, \mu_y and \sigma_y are computed from \beta, \rho and \delta_y (by fixing arbitrarily \mu_x = 1) and two random samples \left( x_1, \dots, x_n \right) and \left( y_1, \dots, y_n \right) are simulated.

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). \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3390/rs15020528")}

Marsaglia, G. 2006. Ratios of Normal Variables. Journal of Statistical Software 16. \Sexpr[results=rd]{tools:::Rd_expr_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). \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s00362-012-0429-2")}

See Also

dnormratio(): probability density of a normal ratio.

pnormratio(): probability distribution function.

estparnormratio(): parameter estimation.

Examples

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

# Second example
beta2 <- 0.24
rho2 <- 4.21
delta2 <- 0.25
rnormratio(20, bet = beta2, rho = rho2, delta = delta2)


gaussratiovegind documentation built on June 16, 2025, 5:09 p.m.