R/rspcauchy.R

Defines functions rspcauchy

Documented in rspcauchy

rspcauchy <- function(n, mu, rho) {
  phi <- rho * mu
  U <- Directional::riag( n, numeric( length(mu) ) )
  com <- Rfast::eachrow(U, phi, oper = "+")
  x <- ( 1 - sum(phi^2) ) / Rfast::rowsums( com^2 ) * com
  Rfast::eachrow(x, phi, oper = "+")
}

Try the Directional package in your browser

Any scripts or data that you put into this service are public.

Directional documentation built on Oct. 30, 2024, 9:15 a.m.