me_construct
is designed to create measurement error tibbles
by manually inserting new metrics such as quality or validity.
me_construct(question_name, metrics, all_columns = FALSE)
me_construct_(question_name, metrics, all_columns = FALSE)
a character string or a bare unquoted name that will be used as the question name
a list containing new measurement error metrics. Currently it
only supports quality, reliability and validity. Can also specify one of the
metrics and the remaining are set to 0
by default
if TRUE
will return all columns (quite a few) that are
supported by the cosme
package. If FALSE
(default) it
will return only columns question
, quality
, reliability
and validity
. See the details section for the definition of all
columns.
a tibble
of one row with the supplied metrics.
It also has class me
for further manipulations within the
cosme
package.
me_construct
returns a four column tibble
with
the question name and the estimates for quality
, reliability
and validity
. However, if all_columns
is set to TRUE
the returned tibble
contains new columns. Below you can
find the description of of all columns:
question: the literal name of the question in the questionnaire of the study
question_id: the API internal ID of the question
id: this is the coding ID, that is, the coding of the authorized prediction
created: Date of the API request
routing_id: Version of the coding scheme applied to get that prediction
authorized: Whether it is an 'authorized' prediction or not. Authorized predictions come from the SQP software directly. Unauthorized predictions come from other users which provide their own measurement error statistics.
complete: Whether all fields of the coding are complete
user_id: The id of the user that crowd-sourced the prediction
error: Whether there was an error in making the prediction. For an example, see http://sqp.upf.edu/loadui/#questionPrediction/12552/42383
errorMessage: The error message, if there was an error
reliability: The strength between the true score factor and the observed variable or 1 - proportion random error in the observed variance. Computed as the squared of the reliability coefficient
validity: The strength between the latent concept factor and the true score factor or 1 - proportion method error variance in the true score variance. Computed as the square of the validity coefficient
quality: The strength between the latent concept factor and the observed variable or 1 - proportion of random and method error variance in the latent concept's variance. Computed as the product of reliability and validity.
reliabilityCoefficient: The effect between the true score factor and the observed variable
validityCoefficient: The effect between the latent concept factor and the true score factor
methodEffectCoefficient: The effect between the method factor and the true score factor
qualityCoefficient: It is computed as the square root of the quality
reliabilityCoefficientInterquartileRange: Interquartile range for the reliability coefficient
validityCoefficientInterquartileRange: Interquartile range for the validity coefficient
qualityCoefficientInterquartileRange: Interquartile range for the quality coefficient
reliabilityCoefficientStdError: Predicted standard error of the reliability coefficient
validityCoefficientStdError: Predicted standard error of the validity coefficient
qualityCoefficientStdError: Predicted standard error of the quality coefficient
me_construct_
is useful if you're interested in programming
with cosme
rather than using it interactively. If you want
to use me_construct
inside a function, use the equivalent
me_construct_
which uses standard evaluation.
me_construct(new_question, list(quality = 0.3))
#> # A tibble: 1 × 4
#> question reliability validity quality
#> <chr> <dbl> <dbl> <dbl>
#> 1 new_question 0 0 0.3
me_construct(new_question, list(quality = 0.3, validity = 0.2))
#> # A tibble: 1 × 4
#> question reliability validity quality
#> <chr> <dbl> <dbl> <dbl>
#> 1 new_question 0 0.2 0.3
# Note that specifying a column which is not available in me data
# will throw an error
if (FALSE) {
me_construct(new_question, list(random_col = 0.3, validity = 0.2))
}
# Currently only quality, reliability and validity are allowed.