Learn R Programming

unfoldr (version 0.2)

coefficientMatrixSpheroids: Calculate coefficients (spheroids)

Description

Calculate coefficients of discretized integral equation

Usage

coefficientMatrixSpheroids(breaks, stype = c("prolate", "oblate"),
  check = TRUE, nCores = getOption("par.unfoldr", 1))

Arguments

breaks
list of bin vectors
stype
string, either prolate or oblate
check
logical, whether to run some input checks
nCores
number of cores used to calculate the coefficients

Value

  • coefficient array

Details

In order to apply the EM algorithm to the stereological unfolding procedure for the joint size-shape-orientation distribution one first has to calculate the coefficients of the discretized integral equation. This step is the most time consuming part of unfolding the parameters and therefore has been separated in its own function. Further, the number of classes for size, shape and orientation do not need to be equal, whereas the same class limits are used for binning spatial and planar values. This might be changed in future releases. Using multiple cpu cores is controlled by either setting the option 'par.unfoldr' in the global R environment or passing the number of cores nCores directly.

Examples

Run this code
#options(par.unfoldr=1)
breaks <- setbreaks(c(8,6,7),maxSize=0.37,kap=1.25)

breaks

P <- coefficientMatrixSpheroids(breaks,check=FALSE)
c(min(P),max(P),sum(P))

Run the code above in your browser using DataLab