donors.receptors.check: For each leave of each tree, counts the number of donors in...

Description Usage Arguments Examples

View source: R/Analyse_synthesised_data.R

Description

For each leave of each tree, counts the number of donors in the gold set vs the number of receptors in the synthetic dataset.

Usage

1
donors.receptors.check(Rules, gold.data, syn.data)

Arguments

Rules

a named list (names correspond to the gold.data and syn.data variable names) of lists of logical expressions (for each variable, the logical expression corresponds to a terminal leaf in a tree).

gold.data

a data frame

syn.data

a data frame containing the same variables than gold.data

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(TtableA,package="BigSyn")
STtableA1=BigSyn::SDPSYN2(TtableA,
                          asis=c("id1a","id1b"),
                          fitmodelsavepath=tempdir())
load(file.path(tempdir(),"AA.cont2_La_Lc_Lrn1.rda"))
Rules<-Sparameters_i$splits[[3]]$fit.model$Rules
data(STtableA1,package="BigSyn")
data(package="BigSyn")
donors.receptors.check(Rules,TtableA,STtableA1[[1]])

##                                 condition gold syn
## 1 AA.cont1_La_Lc_Lrn1 <= 1.63041503938133  113 112
## 2  AA.cont1_La_Lc_Lrn1 > 1.63041503938133    7   3

DanielBonnery/BigSyn documentation built on June 28, 2020, 7:18 p.m.