Description Usage Arguments Details Value Author(s) See Also Examples
integrate over all others but 1 column
1 2 3 |
x |
numeric matrix |
vars |
index (integer or string): column to define integration boxes |
intCol |
index (integer or string): column to average |
n |
number of groups, defaults to about 10 observations per group |
dimnames |
dimension names of the result array |
fAgg |
function applied over the subsets of x[,intCol] |
... |
further arguments to fAgg |
There are several methods to get calculate marginal densities for multivariate sample.
integrate over all others but 1 column: this method
integrate over all others but 2 column: marginals2d
integrate over all others but 3 column: marginals3d
numeric vector with each item representing application of fAgg to x[,intCol] and dimnames equal to means of the classes
Thomas Wutzler
1 2 3 4 5 | data(twdemcEx1)
sample <- stackChains(twdemcEx1)
#res <- marginals1d(sample,vars="kO",n=20)
res <- marginals1d(sample,vars="b",n=20)
plot( res ~ as.numeric(names(res)) )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.