summary.flag_resp {resquin} | R Documentation |
Summary function for flag_resp() output
Description
Calculates the number of respondents flagged with a flagging strategy. Also calculates the agreement between flagging strategies.
Usage
## S3 method for class 'flag_resp'
summary(object, normalize = F, ...)
Arguments
object |
An object of type |
normalize |
A logical value indicating, whether to normalize the agreement estimates between flagging strategies. See details for more information. |
... |
Other arguments for summary functions (currently not supported). |
Details
The agreement is either the count of respondents which two flagging strategies
flag (normalize = T
) or the number of respondents that is flagged positive by
at least one flagging strategy.
In logical terms, the normalized agreement is sum(fs1 & fs2) / sum(fs1 | fs2)
.
Value
An object of class "summary_flag_resp". The object works like a list with four elements.
n_flagged: a named vector of the number of cases a flagging strategy flagged as positive.
agreement: a data frame which counts the number of cases two flagging strategies flagged as positive. If
normalized
, the values are the percentage agreement in flagged respondents.normalized: Indicator if agreement values were normalized.
n: number of rows in
object
.
Examples
resp_distributions(nep) |>
flag_resp(ii_mean > 3,
ii_sd > 1,
ii_mean > 3 & ii_sd > 1) |>
summary()