Learn R Programming

unfoldr (version 0.7.1)

coefficientMatrixSpheroids: Coefficients for trivariate unfolding

Description

Compute coefficients of the discretized integral equation for unfolding

Usage

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

Arguments

breaks

list of bin vectors, see setbreaks

stype

type of spheroid, either "prolate" or "oblate"

check

logical, whether to run some input checks

nCores

number of cpu cores used to compute the coefficients

Value

numeric 6D array of coefficients

Details

In order to apply the Expectation Maximization (EM) algorithm to the stereological unfolding procedure for the joint size-shape-orientation distribution in 3D one first has to compute the coefficients of a discretized integral equation. This step is the most time consuming part of unfolding and therefore has been separated in its own function and can be called separately if needed. The number of bin classes for the size, shape and orientation do not need to be the same, but the given class limits are also used for binning the spatial values. One can define the number of cpu cores by the global option par.unfoldr or passing the number of cores nCores directly to the function.

Examples

Run this code
# NOT RUN {
## Comment: Set breaks vector and compute the coefficient matrix 
## for spheroid unfolding
	
options(par.unfoldr=2L)
breaks <- setbreaks(c(6,5,6),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