Description Usage Arguments Details Value Examples
The functions assoc_scores
and assoc_abcd
take as
their arguments co-occurrence frequencies for a number of items, and
return a range of association scores used in collocation analysis,
collostruction analysis and keywords analysis.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
x |
the argument If If |
y |
if If |
a |
a vector of numbers that express how many times some target item occurs in
the target context. For instance, |
b |
a vector of numbers that express how many times other items than some
target item occur in the target context. For instance, |
c |
a vector of numbers that express how many times some target item occurs in
the reference context. For instance, |
d |
a vector of numbers that express how many times other items than some
target item occur in the reference context. For instance, |
min_freq |
the minimum value for |
measures |
a character vector containing the association measures (or related quantities)
for which scores are
requested. Supported measure names (and related quantities) are
|
with_variants |
a boolean value that expresses whether for the requested |
show_dots |
a boolean value that expresses whether or not a dot ( |
p_fisher_2 |
a boolean value that expresses whether, in case |
small_pos |
Several of the association measures break down when
one or more of the values |
The function assoc_scores
takes as its argument a
target frequency list and a reference frequency list and
returns a number of popular measure that express, for each
item in either one of these lists, the extent to which
the item is attracted to the target context (when compared
to the reference context).
The function assoc_abcd
takes as its arguments four
vectors a
, b
, c
and
d
of equal length. Each tuple of values
(a[i],b[i],c[i],d[i])
, with i
some integer
number between one and the length of the vectors, is
assumed to represent the four numbers a, b,
c, d in a
contingency table of the type
target item | other item | ||
target context | a | b | m |
reference context | c | d | n |
k | l | N | |
In the above table m, n, k, l, and N are marginal frequencies. More specifically, m = a + b, n = c + d, k = a + c, l = b + d, and N = m + n.
Returns a data frame with as its rows all items from either the target
frequency list or the reference frequency list (or, in case the argument
min_freq
is non-zero, all items for its frequency in the
target frequency list is a least
min_freq
), and with as its columns a range of measures that
express the extent to which the items are attracted to the target
context (when compared to the reference context). Some columns don't
contain actual measures, but rather additional information that is useful
for interpreting certain measures.
The following are (possible) columns in the output:
a |
The frequency in cell a, possibly augmented by |
b |
The frequency in cell b, possibly augmented by |
c |
The frequency in cell c, possibly augmented by |
d |
The frequency in cell d, possibly augmented by |
dir |
The direction of the association. It contains the value |
exp_a |
The expected value for the a cell, assuming no difference
between the contexts. This value is calculated as
(m * k)/N. This column is present if |
exp_b |
The expected value for the b cell, assuming no difference
between the contexts. This value is calculated as
(m * l)/N. This column is present if |
exp_c |
The expected value for the c cell, assuming no difference
between the contexts. This value is calculated as
(n * k)/N. This column is present if |
exp_d |
The expected value for the d cell, assuming no difference
between the contexts. This value is calculated as
(n * l)/N. This column is present if |
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.