ivs2vas {IntervalQuestionStat} | R Documentation |
Convert interval-valued responses into equivalent visual analogue scale answers through mid-point criterion
Description
This function allows to reduce each nonempty compact real interval collected
as a response in a questionnaire designed with interval-valued scales to its
mid-point so it can be considered as an answer from a visual analogue scale.
That is, given an nonempty compact real, interval, A
, this method
returns its mid-point, which can be calculated as follows,
\mathrm{mid}~A=\frac{\sup + \inf A}{2}.
Usage
ivs2vas(x)
Arguments
x |
Either a single interval or either a list or matrix with several
intervals stored as an |
Value
This function returns the mid-points of the given interval-valued data to be
considered as visual analogue scale responses in a questionnaire stored
either as a numeric
object if x
argument is a single
interval or a list of intervals, that is, an IntervalData
or
IntervalList
instance, or either as a data.frame
object whether
x
is a matrix of intervals, that is, an IntervalMatrix
object.
Author(s)
José García-García garciagarjose@uniovi.es
See Also
Interval-valued responses can be also associated to their corresponding
Likert-type scale's answer through the minimum \theta
-distance
criterion implemented in the ivs2likert()
function.
Examples
## Some ivs2vas() examples
## A single interval-valued response
i <- IntervalData(3, 3.2)
ivs2vas(i)
## A list of interval-valued responses
list <- IntervalList(c(3, 8.7), c(3.2, 9))
ivs2vas(list)
## A matrix of interval-valued responses
matrix <- IntervalMatrix(matrix(c(1, 2.6, 1.5, 3, 3.8, 6, 4, 7), 2, 4))
ivs2vas(matrix)