Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

combine.spacegraphs

Combine two spacegraph objects.


Description

Combine two spacegraph objects so that their results can be plotted together. Both spacegraphs must be from the same dataset using the same distance metric.

Usage

combine.spacegraphs(x,y)

Arguments

x

a spacegraph object to be combined

y

a spacegraph object to be combined

Details

This allows users to combine two spacegraph objects rather than having to re-run the spacegraph command from the start.

Inputs must be created using spacegraph.

Value

val

an object of class spacegraph.

Author(s)

Richard Nielsen

See Also

Examples

data(LL)
set.seed(123)
sp1 <- spacegraph("treated", LL, drop="re78", M=5,
                  R=list(cem=5,psm=5, mdm=0))

## Note that we must use the same L1 measure from the first spacegraph!
sp2 <- spacegraph("treated", LL, drop="re78", raw.profile=sp1$raw.profile,
                  R=list(cem=0,psm=0, mdm=5))

sp3 <- combine.spacegraphs(sp1,sp2)

plot(sp3)

cem

Coarsened Exact Matching

v1.1.27
GPL-2
Authors
Stefano M. Iacus [aut, cre], Gary King [aut], Giuseppe Porro [aut], Richard Nielsen [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.