transfer {BDgraph}R Documentation

transfer for count data

Description

Transfers count data, by counting the duplicated rows.

Usage

 transfer( r_data ) 

Arguments

r_data

An (n x p) matrix or a data.frame corresponding to the data (n is the sample size and p is the number of variables).

Value

An (n \times p+1) matrix of transferred data, in which the last column is the frequency of duplicated rows.

Author(s)

Reza Mohammadi a.mohammadi@uva.nl and Adrian Dobra

References

Mohammadi, A. and Dobra, A. (2017). The R Package BDgraph for Bayesian Structure Learning in Graphical Models, ISBA Bulletin, 24(4):11-16

Dobra, A. and Mohammadi, R. (2018). Loglinear Model Selection and Human Mobility, Annals of Applied Statistics, 12(2):815-845

See Also

bdgraph.mpl, bdgraph.sim

Examples

# Generating multivariate binary data from a 'random' graph
data.sim <- bdgraph.sim( n = 12, p = 4, size = 4, type = "count", cut = 2 )
r_data   <- data.sim $ data
r_data
   
# Transfer the data
transfer( r_data )

[Package BDgraph version 2.64 Index]