Learn R Programming

Pomic (version 0.9.1)

pomic: Pomic calculation for numerical patterns

Description

This function calculate the POMIC value of simulations results compared to a vector taken as a field pattern.

Usage

pomic(object1, object2, eps=10^-30, nrange=1000, fullmsd=FALSE,  plotting=FALSE,...)

Arguments

object1
Numerical, vector of the field pattern
object2
Numerical, vector of simulations results
eps
Numerical, value to use when the likelihood = 0 for mathematical stability
nrange
Numerical, number of interval to consider for the probability density function creation and integration
fullmsd
Boolean, should the full cross MSD be calculated as well
plotting
Boolean, should a plot illustrating the calculation be created
...
eventual information to give to the last plot (if plotting=T)...

Value

  • Return a list containing:
  • field_datathe field data
  • sim_datathe simulation data
  • kernel_estimatorinformation about the kernel estimator used
  • resulta table of 4 or 5 rows (depending if fullmsd=TRUE or not) with:
  • - POMICpomic score of model results to reproduce the pattern
  • - overlapindicates if the model results overlap the range of the field data
  • - KLdivKL divergence of the model results from the field pattern
  • - MSD$(\sum(field)/n_{field}-\sum(simulation)/n_{simulation})^2$
  • - CrossMSDif fullmsd is true, calculate the mean square deviation among each pair of simulation and field data possible

Details

The KL divergence is only calculated comparing the simulations to the field vector, as if it is the truth (different from the flexmix KLdiv calculations)

See Also

pomic.simple pomic.corrected

Examples

Run this code
pomic(rnorm(100,10,5),rnorm(100*5,10.5,6),eps=10^-20)
pomic(rnorm(100,10,5),rnorm(100*5,10.5,6),eps=10^-20,fullmsd=TRUE,plotting=TRUE)

Run the code above in your browser using DataLab