Last data update: 2014.03.03

R: Contour plot of a mixture of von Mises-Fisher distributions...
mixvmf.contourR Documentation

Contour plot of a mixture of von Mises-Fisher distributions model for spherical data only.

Description

Contour lines are produced of mixture model for spherical data only.

Usage

mixvmf.contour(u, mod)

Arguments

u

A two column matrix. The first column is the longitude and the second is the latitude.

mod

This is mix.vmf object. Run a mixture model and save it as mod for example, mod = mix.vmf(x, 3).

Details

The contour plot is displayed with latitude and longitude in the axes. No Lambert projection is used here. This works for spherical data only which are given as longitude and latitude.

Value

A plot including: The points and the contour lines.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris <mtsagris@yahoo.gr> and Giorgos Athineou <athineou@csd.uoc.gr>

References

Kurt Hornik and Bettina Grun (2014). movMF: An R Package for Fitting Mixtures of von Mises-Fisher Distributions http://cran.r-project.org/web/packages/movMF/vignettes/movMF.pdf

See Also

vmf.kerncontour, vmf.contour, mix.vmf

Examples

k <- runif(2, 4, 20)
prob <- c(0.4, 0.6)
mu <- matrix( rnorm(6), ncol = 3 )
mu <- mu / sqrt( rowSums(mu^2) )
x <- rmixvmf(200, prob, mu, k)$x
mod <- mix.vmf(x, 2)
y <- euclid.inv(x)
mixvmf.contour(y, mod)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(Directional)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Directional/mixvmf.contour.Rd_%03d_medium.png", width=480, height=480)
> ### Name: mixvmf.contour
> ### Title: Contour plot of a mixture of von Mises-Fisher distributions
> ###   model for spherical data only.
> ### Aliases: mixvmf.contour
> ### Keywords: Contour plot Mixtures of von Mises-Fisher distributions
> 
> ### ** Examples
> 
> k <- runif(2, 4, 20)
> prob <- c(0.4, 0.6)
> mu <- matrix( rnorm(6), ncol = 3 )
> mu <- mu / sqrt( rowSums(mu^2) )
> x <- rmixvmf(200, prob, mu, k)$x
> mod <- mix.vmf(x, 2)
> y <- euclid.inv(x)
> mixvmf.contour(y, mod)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>