marginalize.bmop: Marginalize a bmop

Description Usage Arguments Value Examples

View source: R/3-manipulation-functions.R

Description

marginalize a bmop object, that is integrate a bmop multivariate density over some of its dimension.

Usage

1
marginalize.bmop(object, MARGIN = 1, ...)

Arguments

object

a bmop object

MARGIN

positive integer or vector of positive integer, the dimensions that has to be marginalized

...

additional parameters

Value

a bmop object over a space of dimension length(MARGIN) the result of integrating over the -MARGIN other dimensions.

Examples

1
2
3
4
5
6
7
N<-50 # N small for CRAN
dataNormal<-data.frame(rnorm(N),rnorm(N))
bmop2d<-bmop_fit(dataNormal)
bmop1d<-bmop_fit(dataNormal[,1])
bmop1dmargin<-marginalize.bmop(bmop2d,MARGIN=1)
comparison_plot(list(bmop1d,bmop1dmargin),true=dnorm,
names.bmop=c("direct est.","marginalized"))

gherardovarando/Rbmop documentation built on May 17, 2019, 4:17 a.m.