plot.FDfitted {FlexDir}R Documentation

Plot Method for FDfitted Objects

Description

This method plots the results of FD.estimation, using the functions FD.ternaryplot or FD.rightplot.

Usage

## S3 method for class 'FDfitted'
plot(x, type = "ternary", var = c(1, 2), zoomed = T,
  showgrid = T, showdata = T, nlevels = 10, ...)

Arguments

x

an object of class FDfitted, usually the result of FD.estimation.

type

string containing 'ternary' or 'right'.

var

numeric vector containing the two variables to be plotted on the axis. Used only if type='right'.

zoomed

if TRUE, shows only the area where most of the density is concentrated. If FALSE, shows the whole area.

showgrid

if TRUE, shows the axis and the labels. If FALSE, only the graph is printed.

showdata

if TRUE, prints the data points. If FALSE, shows only the contour lines.

nlevels

approximate number of contour lines to be drawn.

...

additional arguments

Details

The number of variables in the fitted model must be 3 to draw a plot.

References

Ongaro, A. and Migliorati, S. (2013) A generalization of the Dirichlet distribution. Journal of Multivariate Analysis, 114, 412–426.

Migliorati, S., Ongaro, A. and Monti, G. S. (2016) A structured Dirichlet mixture model for compositional data: inferential and applicative issues. Statistics and Computing, doi:10.1007/s11222-016-9665-y.

See Also

FD.estimation, FD.ternaryplot, FD.rightplot, FD.marginalplot

Examples

data <- FD.generate(n=20,a=c(12,7,15),p=c(0.3,0.4,0.3),t=8)
data
results <- FD.estimation(data, normalize=TRUE,iter.initial.SEM = 5,iter.final.EM = 10)
results
plot(results)
plot(results, type='right', var=c(3,2), zoomed=FALSE, showgrid=TRUE, showdata=FALSE, nlevels=3)



[Package FlexDir version 1.0 Index]