Learn R Programming

kStatistics (version 2.0)

mpCart: Pairing two multisets

Description

Given two multisets, the function generates a new multiset whose elements are the pairing of the corresponding ones in the input multisets.

Usage

mpCart( M1,M2 )

Arguments

M1

list of vectors

M2

list of vectors

Value

list

list with the paired multiset

Details

Two lists are given in input. Each list might contains more lists of two vectors: the first vector is a multiset, the second vector is a multiplicative factor (for example its multiplicity if the multiset is a subdivision). The function generates a new multiset whose elements are the pairing of the corresponding ones in the two input lists, with a multiplicative factor which is just the product of the corresponding multiplicative factors.

References

E. Di Nardo, G. Guarino, D. Senato (2008) An unifying framework for k-statistics, polykays and their generalizations. Bernoulli. 14(2), 440-468. (download from http://arxiv.org/pdf/math/0607623.pdf)

E. Di Nardo, G. Guarino, D. Senato (2008) Symbolic computation of moments of sampling distributions. Comp. Stat. Data Analysis. 52(11), 4909-4922. (download from http://arxiv.org/abs/0806.0129)

E. Di Nardo, G. Guarino, D. Senato (2009) A new method for fast computing unbiased estimators of cumulants. Statistics and Computing, 19, 155-165. (download from https://arxiv.org/abs/0807.5008)

See Also

pCart

Examples

Run this code
# NOT RUN {
A <- list(  list( list(c(1),c(2) ),c(-1)), list(list(c(3)),c(1))  )
# where -1 is the multiplicative factor of list(c(1),c(2) ) and 1 is the 
# multiplicative factor of list(c(3))
B<-list( list( list(c(5)),c(7)))
# where 7 is the multiplicative factor of list(c(5))
 
mpCart(A,B) 
# generates [[[1],[2],[5]], -7] , [[[3],[5]], 7]

A <- list( list( list( c(1,0),c(1,0) ), c(-1)),  list( list( c(2,0)), c(1) ))
B <- list( list( list( c(1,0)), c(1)) )  
mpCart(A,B)
# generates  [[[1,0],[1,0],[1,0]], -1], [[[2,0],[1,0]],1]

# }

Run the code above in your browser using DataLab