Package {Mobius}


Type: Package
Title: Mobius Transport for Directional Data
Version: 1.0
Date: 2026-09-18
Author: Michail Tsagris [aut, cre]
Maintainer: Michail Tsagris <mtsagris@uoc.gr>
Depends: R (≥ 4.0)
Imports: Directional, grDevices, Rfast, rgl, stats
Suggests: Rfast2
Description: Density evaluation, random generation, and maximum likelihood estimation for the Mobius-von Mises-Fisher and isotropic scaled von Mises-Fisher distributions on the hypersphere, introduced in Garcia-Portugues and Kato (2026) <doi:10.48550/arXiv.2607.29280>. Both distributions arise from Mobius transport of a von Mises-Fisher distribution.
License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
NeedsCompilation: no
Packaged: 2026-09-18 06:18:42 UTC; mtsag
Repository: CRAN
Date/Publication: 2026-09-28 09:10:14 UTC

Mobius Transport for Directional Data

Description

Density evaluation, random generation, and maximum likelihood estimation for the Mobius-von Mises-Fisher and isotropic scaled von Mises-Fisher distributions on the hypersphere, introduced in Garcia-Portugues and Kato (2026). Both distributions arise from Mobius transport of a von Mises-Fisher distribution.

Details

Package: Mobius
Type: Package
Version: 1.0
Date: 2026-09-18

Maintainers

Michail Tsagris <mtsagris@uoc.gr>.

Author(s)

Michail Tsagris mtsagris@uoc.gr

References

Garcia-Portugues E. and Kato S. (2026). Mobius transport on spheres. arXiv preprint arXiv:2607.29280.


Density of the isotropic scaled von Mises-Fisher distribution

Description

Density of the isotropic scaled von Mises-Fisher distribution.

Usage

disvmf(y, mu, kappa, alpha, logden = FALSE)

Arguments

y

A matrix or a vector with the data expressed in Euclidean coordinates, i.e. unit vectors.

mu

The \mu parameter, a unit vector.

kappa

The concentration parameter (\kappa).

alpha

The \alpha parameter.

logden

If you the logarithm of the density values set this to TRUE.

Details

The density of the Mobius-von Mises-Fisher distribution is computed.

Value

A vector with the (log) density values of y.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Garcia-Portugues E. and Kato S. (2026). Mobius transport on spheres. https://arxiv.org/pdf/2607.29280

See Also

dmvmf, isvmf.mle

Examples

mu <- c(0.6, 0.8, 0)
y <- risvmf(100, mu, 10, 2)
f <- disvmf(y, mu, 10, 2)

Density of the Mobius-von Mises-Fisher distribution

Description

Density of the Mobius-von Mises-Fisher distribution.

Usage

dmvmf(y, mu1, mu2, kappa, rho, logden = FALSE)

Arguments

y

A matrix or a vector with the data expressed in Euclidean coordinates, i.e. unit vectors.

mu1

The \mu_1 parameter, a unit vector.

mu2

The \mu_2 parameter, a unit vector.

kappa

The concentration parameter (\kappa).

rho

The \rho parameter.

logden

If you the logarithm of the density values set this to TRUE.

Details

The density of the Mobius-von Mises-Fisher distribution is computed.

Value

A vector with the (log) density values of y.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Garcia-Portugues E. and Kato S. (2026). Mobius transport on spheres. https://arxiv.org/pdf/2607.29280

See Also

mvmf.mle, disvmf

Examples

mu1 <- c(1, 0, 0)
mu2 <- c(0.6, 0.8, 0)
y <- rmvmf(100, mu1, mu2, 5, 0.5)
f <- dmvmf(y, mu1, mu2, 5, 0.5)

Contour plot (on the sphere) of the isotropic scaled von Mises-Fisher distribution

Description

Contour plot (on the sphere) of the isotropic scaled von Mises-Fisher distribution.

Usage

isvmf.contour(mu, kappa, alpha, bgcol = "snow", dat = NULL, col = NULL,
lat = 50, long = 50)

Arguments

mu

The mean direction \mu of the distribution.

kappa

The \kappa parameter of the distribution.

alpha

The \alpha parameter of the distribution.

bgcol

The color of the surface of the sphere.

dat

If you have you want to plot supply them here. This has to be a numerical matrix with three columns, i.e. unit vectors.

col

If you supplied data then choose the color of the points. If you did not choose a color, the points will appear in red.

lat

A positive number determing the range of degrees to move left and right from the latitude center. See the example to better understand this argument.

long

A positive number determing the range of degrees to move up and down from the longitude center. See the example to better understand this argument.

Details

The goal of this function is for the user to see how the isotropic scaled von Mises-Fisher distribution looks like on the sphere.

Value

A plot containing the contours of the distribution.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Garcia-Portugues E. and Kato S. (2026). Mobius transport on spheres. https://arxiv.org/pdf/2607.29280

See Also

disvmf

Examples


mu <- c(0.6, 0.8, 0)
isvmf.contour(mu = mu, kappa = 20, alpha = 5, lat = 20, long = 20)


MLE of the isotropic scaled von Mises-Fisher distribution

Description

MLE of the isotropic scaled von Mises-Fisher distribution.

Usage

isvmf.mle(y, maxit = 1000, tol = 1e-6)

Arguments

y

A matrix with directional data, i.e. unit vectors.

maxit

The maximum number of iterations allowed.

tol

The tolerance value at which to terminate the algorithm.

Details

The functions estimates the parameters of a fitted MLE of the isotropic scaled von Mises-Fisher distribution The function employs a combination of the fixed points iteration algorithm and the optim() function.

Value

A list including:

mu

The \mu vector.

kappa

The \kappa parameter.

alpha

The alpha parameter.

loglik

The maximum log-likelihood value.

iters

The number of iterations performed.

Author(s)

Michail Tsagris and Zehao Yu.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Garcia-Portugues E. and Kato S. (2026). Mobius transport on spheres. https://arxiv.org/pdf/2607.29280

See Also

risvmf, mvmf.mle,

Examples

mu <- c(0.6, 0.8, 0)
y <- risvmf(1000, mu, 5, 0.5)
isvmf.mle(y)

Contour plot (on the sphere) of the Mobius-von Mises-Fisher distribution

Description

Contour plot (on the sphere) of the Mobius-von Mises-Fisher distribution.

Usage

mvmf.contour(mu1, mu2, kappa, rho, bgcol = "snow", dat = NULL, col = NULL,
lat = 50, long = 50)

Arguments

mu1

The \mu_1 vector of the distribution.

mu2

The \mu_2 vector of the distribution.

kappa

The \kappa parameter of the distribution.

rho

The \rho parameter of the distribution.

bgcol

The color of the surface of the sphere.

dat

If you have you want to plot supply them here. This has to be a numerical matrix with three columns, i.e. unit vectors.

col

If you supplied data then choose the color of the points. If you did not choose a color, the points will appear in red.

lat

A positive number determing the range of degrees to move left and right from the latitude center. See the example to better understand this argument.

long

A positive number determing the range of degrees to move up and down from the longitude center. See the example to better understand this argument.

Details

The goal of this function is for the user to see how the isotropic scaled von Mises-Fisher distribution looks like on the sphere.

Value

A plot containing the contours of the distribution. The green box is the \mu_1, and the red box is the mu_2.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Garcia-Portugues E. and Kato S. (2026). Mobius transport on spheres. https://arxiv.org/pdf/2607.29280

See Also

dmvmf

Examples


mu1 <- c(1, 0, 0)
mu2 <- c(0.6, 0.8, 0)
mvmf.contour(mu1 = mu1, mu2 = mu2, kappa = 10, rho = 0.5, lat = 20, long = 20)


MLE of the Mobius-von Mises-Fisher distribution

Description

MLE of the Mobius-von Mises-Fisher distribution.

Usage

mvmf.mle(y, maxit = 1000, tol = 1e-6)
mvmf1.mle(y, maxit = 1000, tol = 1e-6)

Arguments

y

A matrix with directional data, i.e. unit vectors.

maxit

The maximum number of iterations allowed.

tol

The tolerance value at which to terminate the algorithm.

Details

The functions estimates the parameters of a fitted Mobius-von Mises-Fisher distribution. The function employs a combination of the fixed points iteration algorithm and the optim() function. The mvmfm1.mle() function assumes that \mu1=\mu_2.

Value

A list including:

mu1

The \mu_1 vector.

mu2

The \mu_2 vector.

kappa

The \kappa parameter.

rho

The \rho parameter.

loglik

The maximum log-likelihood value.

iters

The number of iterations performed.

In the case of the mvmf1.mle() one \mu is returned.

Author(s)

Michail Tsagris and Zehao Yu.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Garcia-Portugues E. and Kato S. (2026). Mobius transport on spheres. https://arxiv.org/pdf/2607.29280

See Also

rmvmf, isvmf.mle

Examples

mu1 <- c(1, 0, 0)
mu2 <- c(0.6, 0.8, 0)
y <- rmvmf(1000, mu1, mu2, 5, 0.5)
mvmf.mle(y)

Simulation of random values from the isotropic scaled von Mises-Fisher distribution

Description

Simulation of random values from the isotropic scaled von Mises-Fisher distribution.

Usage

risvmf(n, mu, kappa, alpha)

Arguments

n

The sample size.

mu

The \mu parameter, a unit vector.

kappa

The concentration parameter (\kappa).

alpha

The \alpha parameter.

Details

The isotropic scaled vMF distribution uses a straightforward algorithm to generate random vectors.

Value

A matrix with the simulated data.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Garcia-Portugues E. and Kato S. (2026). Mobius transport on spheres. https://arxiv.org/pdf/2607.29280

See Also

isvmf.mle, rmvmf

Examples

mu <- c(0.6, 0.8, 0)
y <- risvmf(100, mu, 10, 2)

Simulation of random values from the Mobius-von Mises-Fisher distribution

Description

Simulation of random values from the Mobius-von Mises-Fisher distribution.

Usage

rmvmf(n, mu1, mu2, kappa, rho)

Arguments

n

The sample size.

mu1

The \mu_1 parameter, a unit vector.

mu2

The \mu_2 parameter, a unit vector.

kappa

The concentration parameter (\kappa).

rho

The \rho parameter.

Details

The Mobius-vMF distribution uses a straight algorithm to generate random vectors.

Value

A matrix with the simulated data.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Garcia-Portugues E. and Kato S. (2026). Mobius transport on spheres. https://arxiv.org/pdf/2607.29280

See Also

mvmf.mle, risvmf

Examples

mu1 <- c(1, 0, 0)
mu2 <- c(0.6, 0.8, 0)
y <- rmvmf(100, mu1, mu2, 5, 0.5)