yamm.obj | R Documentation |
The objective function when computing yamm
, which is the integral of the squared or absolute value of the univariate median of the projection of the shifted data set over a unit hypersphere. It is implemented internally using C code Cyammobj
and hence is much faster than coding with R only.
yamm.obj(x, mu, nprojs = 2000, doabs = 0)
x |
The data as a matrix or data frame, with each row being viewed as one multivariate observation. |
mu |
A shift vector with length n, where n should equal to the number of columns (variables) of the data matrix. Each row of the data matrix |
nprojs |
The number of projections for the shifted data matrix while using the Monte Carlo method to approximate the integration. The default value is 2000. |
doabs |
If 0 (default), function |
A univariate integral of the squared or absolute value of the median of the projection of the shifted data set over a unit hypersphere is returned from the .C
calling function
Chen, F. and Nason, Guy P. (2020) A new method for computing the projection medi an, its influence curve and techniques for the production of projected quantile plots. PLOS One, doi: 10.1371/journal.pone.0229845
yamm
data(beetle) # # Set seed for reproduction. set.seed(5) # # Objective function for yamm with a chosen shift vector. # yamm.obj(beetle, mu=rep(10,6), nprojs=5000, doabs=1) # [1] 88.38346
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.