eo.iso.diff {UCS} R Documentation

## Highlight Differences between Two Acceptance Regions in the (e,o) Plane (eo)

### Description

Compare the acceptance regions of two GAMs by shading the two difference sets (cf. Evert 2004, Sec. 5.2.2) in different fill styles. This function should be followed by two `eo.iso` calls to draw the iso-lines bounding the difference regions.

### Usage

```
eo.iso.diff(gam1, gam2, gamma1=0, gamma2=0, b=1, N=1e6,
n.best1=NULL, n.best2=NULL, ds=NULL,
style1=4, style2=5, solid=FALSE, bw=bw,
steps=eo.par("steps"), jitter=eo.par("jitter"),
col1=eo.par("col"), angle1=eo.par("angle"),
density1=eo.par("density"), solid.col1=eo.par("solid"),
col2=eo.par("col"), angle2=eo.par("angle"),
density2=eo.par("density"), solid.col2=eo.par("solid"))

```

### Arguments

 `gam1, gam2` character strings giving the names of two generalised association measures (GAMs). Use the function `builtin.gams` from the `gam` module to obtain a list of available GAMs. `gamma2, gamma2` cutoff thresholds that determines the two acceptance regions (\{g_1 = γ_1\} and \{g_1 = γ_1\}) to be compared. You can use `n.best` and `ds` parameters (see below) to compute n-best thresholds automatically. `b, N` optional balance (`b`) and sample size (`N`) parameters for GAMs that are not central or size-invariant, respectively. The default `b=1` yields the centralised version of a non-central GAM (for details, see Evert 2004, Sec. 3.3). Note that the same values are used for both GAMs. `n.best1, n.best2, ds` When `n.best1` is specified, the cutoff threshold `gamma1` will automatically be determined so as to yield an n-best acceptance region for the data set `ds`. In the same way, `n.best2` computes `gamma2` as an n-best acceptance threshold. Note that the data set `ds` is used for both n-best thresholds. `jitter` If `TRUE`, use jittered coordinates for computing n-best cutoff thresholds (see above). In this case, the data set has to be annotated with the `add.jitter` function first. `style1, style2` integer values specifying fill styles for the two difference regions. `style1` is used for the region D_1 of the (e,o) plane accepted by `gam1` but not `gam2`, and `style2` for the region D_2 accepted by `gam2` but not `gam1`. Style parameters include the colour, angle and density of shading lines, or the solid fill colour if `solid=TRUE`. See the `eo.par` help page for more information about available fill styles. `solid` If `TRUE`, fill the difference regions with solid colour rather than shading lines, also according to the chosen `style`s and `bw` mode. `bw` If `TRUE`, the regions are drawn in B/W mode, otherwise in colour mode. This parameter defaults to the state specified with the initial `eo.setup` call, but can be overridden manually. `steps` an integer specifying how many equidistant steps are used for the (combined) boundaries of the difference regions. The default value is set with `eo.par`. `col1, col2` can be used to override the default colours for shading lines, which are determined automatically from the global settings (`eo.par`) according to the selected `style`s and `bw` mode. `angle1, angle2` can be used to override the default angles of shading lines, which are determined automatically from the global settings (`eo.par`) according to the selected `style`s and `bw` mode. `density1, density2` can be used to override the default densities of shading lines, which are determined automatically from the global settings (`eo.par`) according to the selected `style`s and `bw` mode. `solid.col1, solid.col2` can be used to override the default solid fill colours (with `solid=TRUE`), which are determined automatically from the global settings (`eo.par`) according to the selected `style`s and `bw` mode.

### Details

See the `eo.setup` help page for a description of the general procedure used to create (e,o) plots. This help page also has links to other (e,o) plotting functions. The "factory setting" styles are described on the `eo.par` help page.

See the `eo.iso` help page for details about iso-lines, acceptance regions and n-best cutoff thresholds.

### References

Evert, Stefan (2004). The Statistics of Word Cooccurrences: Word Pairs and Collocations. PhD Thesis, IMS, University of Stuttgart.

`eo.par`, `eo.setup`, `eo.iso`

### Examples

```
## setup code (see "eo.setup" example for a detailed explanation)
ucs.library("eo")
select <- rbinom(nrow(ds), 1, .1) == 1
ds <- ds[select,]

## comparison of 300-best acceptance regions for Poisson and MI measures
eo.setup(xlim=c(-3,2), ylim=c(0,2), aspect=FALSE)
eo.iso.diff("Poisson.pv", "MI", n.best1=300, n.best2=300, ds=ds, solid=TRUE, jitter=TRUE)
eo.points(ds, style=1, jitter=TRUE)
eo.iso("Poisson.pv", n.best=300, ds=ds, style=4)
eo.iso("MI", n.best=300, ds=ds, style=5)
eo.legend.diff(3, c("Poisson+ / MI-","Poisson- / MI+"), solid=TRUE)
eo.close()

```

[Package UCS version 0.5 Index]