Most of the times, this function takes a truth table object as the input
for the minimization procedure, but the same argument can refer to a data frame
containing calibrated columns.
For the later case, the function minimize()
originally had some additional
formal arguments which were sent to the function truthTable()
:
outcome
, conditions
, n.cut
,
incl.cut
, show.cases
, use.letters
and
inf.test
.
All of these parameters are still possible with function minimize()
, but
since they are sent to the truthTable()
function anyway, it is
unnecessary to duplicate their explanation here. The only situation which does need
an additional description relates to the argument outcome
, where
unlike truthTable()
which accepts a single one, the function
minimize()
accepts multiple outcomes and performs a minimization for
each of them (a situation when all columns are considered causal conditions).
The argument include
specifies which other truth table rows are
included in the minimization process. Most often, the remainders are included but
any value accepted in the argument explain
is also accepted in the
argument include
.
The argument exclude
is used to exclude truth table rows from the
minimization process, from the positive configurations and/or from the remainders.
It can be specified as a vector of truth table line numbers, or as a matrix of
causal combinations.
The argument dir.exp
is used to specify directional expectations, as
described by Ragin (2003). They can be specified as a single string, with values
separated by commas. For multi-value directional expectations, they are specified
together, separated by semicolons. The total length of the directional expectations
must match the number of causal conditions specified in the analysis, using a dash
"-"
if there are no particular expectations for a specific causal
condition.
Activating the details
argument has the effect of printing parameters
of fit for each prime implicant and each overall solution, the essential prime
implicants being listed in the top part of the table. It also prints the truth
table, in case the argument input
has been provided as a data frame
instead of a truth table object.
The argument use.tilde
signals the absence of a causal condition, in
a sufficiency relation with the outcome, using a tilde sign "~"
. It
is ignored if the data is multivalent.
By default, the package QCA employes a different search algorithm based on Consistency
Cubes (Dusa, 2017), analysing all possible combinations of causal conditions and all
possible combinations of their respective levels. The structure of the input dataset
(number of causal conditions, number of levels, number of unique rows in the truth
table) has a direct implication on the search time, as all of those characteristics
become entry parameters when calculating all possible combinations.
Consequently, two kinds of depth arguments are provided:
pi.depth |
the maximum number of causal conditions needed to construct a prime |
|
implicant, the complexity level where the search can be stopped, as long as the |
|
PI chart can be solved. |
sol.depth |
the maximum number of prime implicants needed to find a solution |
These arguments introduce a possible new way of deriving prime implicants and solutions,
that can lead to different results (i.e. even more parsimonious) compared to the classical
Quine-McCluskey. When either of them is modified from the default value of 0, the minimization
method is automatically set to "CCubes"
and the remainders are automatically
included in the minimization.
The search time is larger the higher these depths, or inversely the search time can be
significantly shorter if these depths are smaller. Irrespective of how large
pi.depth
is, the algorithm will always stop at a maximum complexity level
where no new, non-redundant prime implicants are found. The argument sol.depth
is relevant only when activating the argument all.sol
to solve the PI chart.
The default method (when all.sol = FALSE
), is to find
the minimal number (k
) of prime implicants needed to cover all initial
positive output configurations, then it exhaustively searches through all possible
disjunctions of k
prime implicants which do cover those configurations.
The argument min.pin
introduces an additional
parameter to control when to stop the search for prime implicants. It is based on the
observation by Dusa (2017) that
out of the entire set of non redundant prime implicants, only a subset actually contribute
to solving the chart with disjunctions of k
PIs. The search depth can be
shortened at the level where the next subset of PIs do not contribute to solving the
PI chart, thus avoiding to spend unnecessary time on finding the maximal number of
non-redundant PIs. Instead, it finds the set of minimal ("min") number of PIs ("pin")
necessary to obtain exactly the same solutions, with a dramatically improved overall
performance.
Once the PI chart is constructed using the prime implicants found in the previous
stages, the argument row.dom
can be used to further eliminate
irrelevant prime implicants when solving the PI chart, applying the principle of row
dominance: if a prime implicant A covers the same (intial) positive output
configurations as another prime implicant B and in the same time covers
other configurations which B does not cover, then B is irrelevant and eliminated.
The argument all.sol
automatically deactivates the argument
min.pin
, because it aims to exhaustively identify all possible
non-redundant disjunctions of n
prime implicants that solve the PI
chart, where n >= k
, with an inflated number of possible solutions.
Depending on the complexity of the PI chart, sometimes it may take a very long time
to identify all possible non-redundant (disjunctions that are not subsets of
previously found) disjunctive solutions. In such a situation, the number of
combinations of all possible numbers of prime implicants is potentially too large to be
solved in a polynomial time and if not otherwise specified, the depth for the disjunctive
solutions is automatically bounded to 5 prime implicants.
The task of solving the PI chart depends on its size, with prime implicants on the
rows and the positive output configurations on the columns. Since the columns are
fixed, another possible way to reduce the solving time is to eliminate redundant rows,
by activating the argument row.dom
.
If minimizing a dataset instead of a truth table, unless otherwise specified the
argument incl.cut
is automatically set to the minimum value between
pi.cons
and sol.cons
, then passed to the function
truthTable()
.
The argument sol.cons
introduces another possibility to change the method of
solving the PI chart. Normally, once the solutions are found among all possible combinations
of k
prime implicants, consistencies and coverages are subsequently calculated.
When sol.cons
is lower than 1, then solutions are searched based on their
consistencies, which should be at least equal to this threshold.