selectMax {cnaOpt} | R Documentation |
Select the con-cov optima from a 'conCovOpt
' object that maximize a specified optimality criterion
Description
selectMax
selects the optima from a 'conCovOpt
' object that maximize a specified optimality criterion (cf. Baumgartner and Ambuehl 2021).
Usage
selectMax(x, crit = quote(con * cov), cond = quote(TRUE), warn = TRUE)
multipleMax(x, outcome)
Arguments
x |
An object output by |
crit |
Quoted expression specifying a numeric criterion to be maximized when selecting from the con-cov optima that meet criterion |
cond |
Quoted expression specifying a logical criterion to be imposed on the con-cov optima in |
warn |
Logical; if |
outcome |
A character string specifying a single outcome value in the original data. |
Details
While conCovOpt
identifies all con-cov optima in an analyzed data set, selectMax
selects those optima from a 'conCovOpt
' object x
that comply with a logical condition cond
and fare best according to the numeric optimality criterion crit
. The default is to select so-called con-cov maxima, meaning con-cov optima with highest product of consistency and coverage.
But the argument crit
allows for specifying any other numeric optimality criterion, e.g. min(con, cov)
, max(con, cov)
, or 0.8*con + 0.2*cov
, etc. (see Baumgartner and Ambuehl 2021). If x
contains multiple outcomes, the selection of the best con-cov optima is done separately for each outcome.
As of package version 0.5.0, the function multipleMax
is obsolete. It is kept for backwards compatibility only.
Via the column id
in the output of selectMax
it is possible to select one among many equally good maxima, for instance, by means of reprodAssign
(see the examples below).
Value
selectMax
returns an object of class 'selectMax'.
References
Baumgartner, Michael and Mathias Ambuehl. 2021. “Optimizing Consistency and Coverage in Configurational Causal Modeling.” Sociological Methods & Research.
doi:10.1177/0049124121995554.
See Also
See also examples in conCovOpt
.
Examples
dat1 <- d.autonomy[15:30, c("EM","SP","CO","AU")]
(cco1 <- conCovOpt(dat1, outcome = "AU"))
selectMax(cco1)
selectMax(cco1, cond = quote(con > 0.95))
selectMax(cco1, cond = quote(cov > 0.98))
selectMax(cco1, crit = quote(min(con, cov)))
selectMax(cco1, crit = quote(max(con, cov)), cond = quote(cov > 0.9))
# Multiple equally good maxima.
(cco2 <- conCovOpt(dat1, outcome = "AU"))
(sm2 <- selectMax(cco2, cond = quote(con > 0.93)))
# Each maximum corresponds to a different rep-assignment, which can be selected
# using the id argument.
reprodAssign(sm2, "AU", id = 10)
reprodAssign(sm2, "AU", id = 11)
reprodAssign(sm2, "AU", id = 13)