diff --git a/.Rbuildignore b/.Rbuildignore index 166062d..3323cc7 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -6,4 +6,6 @@ README.html ^\.github$ ^\.git$ ^validate_package\.R$ -^validate_report\.json$ \ No newline at end of file +^validate_report\.json$ +^AGENTS\.md$ +^build_package\.R$ \ No newline at end of file diff --git a/.gitignore b/.gitignore index b03f9da..eddc05e 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,4 @@ rsconnect/ validate_report.json validate_package.R build_package.R +AGENTS.md diff --git a/DESCRIPTION b/DESCRIPTION index efecc22..0a2c2a1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -31,6 +31,9 @@ LazyData: true Imports: boot, ggplot2, + ggrepel, + MASS, + rlang, stats, utils Depends: diff --git a/NAMESPACE b/NAMESPACE index c94649a..8ef6ce2 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -26,6 +26,8 @@ export(SVALmult) export(SVALplot) export(SVALsingle) export(Vaiken) +export(Vaikenpub) +export(minimumCV) importFrom(boot, boot, boot.ci @@ -42,6 +44,7 @@ importFrom(ggplot2, theme, theme_minimal ) +importFrom(rlang,.data) importFrom(stats, complete.cases, na.omit, diff --git a/R/CID.R b/R/CID.R index 99820e7..3919f53 100644 --- a/R/CID.R +++ b/R/CID.R @@ -30,9 +30,9 @@ #' #'Merino-Soto, C. (2023). Coeficientes V de Aiken: diferencias en los juicios de validez de contenido. MHSalud, 20(1), 23-32. https://doi.org/10.15359/mhs.20-1.3 #' -#'Singer, J. (2010). Construction of confidence limits about effect measures: A general approach, by G. Y. Zou and A. Donner, Statistics in Medicine 2008; 27:1693-1702. Statistics in Medicine, 29(16), 1757–1759. https://doi.org/10.1002/sim.3887 +#'Singer, J. (2010). Construction of confidence limits about effect measures: A general approach, by G. Y. Zou and A. Donner, Statistics in Medicine 2008; 27:1693-1702. Statistics in Medicine, 29(16), 1757-1759. https://doi.org/10.1002/sim.3887 #' -#'Zou, G.Y. and Donner, A. (2008) Construction of confidence limits about effect measures: a general approach. Stat. Med. 27, 1693–1702. https://doi.org//10.1002/sim.3095 +#'Zou, G.Y. and Donner, A. (2008) Construction of confidence limits about effect measures: a general approach. Stat. Med. 27, 1693-1702. https://doi.org//10.1002/sim.3095 #' #'@author #'Cesar Merino-Soto (\email{sikayax@yahoo.cam.ar}) @@ -107,7 +107,7 @@ CID <- function(group1, group2, coef.col = "coef", lwr.col = "lwr.ci", upr.col = stop("Ambos argumentos 'group1' y 'group2' deben ser data.frames.") } - # Detección de valores perdidos + # Deteccion de valores perdidos if (!na.rm) { if (any(is.na(group1)) || any(is.na(group2))) { stop("Valores perdidos detectados. Usa na.omit() primero o establece na.rm=TRUE.") diff --git a/R/CIDsingle.R b/R/CIDsingle.R index fd7f1a3..c0f3186 100644 --- a/R/CIDsingle.R +++ b/R/CIDsingle.R @@ -33,13 +33,13 @@ #' #'Aiken, L. R. (1985). Three coefficients for analyzing the reliability and validity of ratings. Educational and Psychological Measurement, 45, 131-142. https://doi.org/10.1177/0013164485451012 #' -#'Merino-Soto, C. (2018) Confidence interval for difference between coefficients of content validity (Aiken's V): a SPSS syntax. Anales de Psicología, 34(3), 587-590. https://doi.org/10.6018/analesps.34.3.283481. +#'Merino-Soto, C. (2018) Confidence interval for difference between coefficients of content validity (Aiken's V): a SPSS syntax. Anales de Psicologia, 34(3), 587-590. https://doi.org/10.6018/analesps.34.3.283481. #' #'Merino-Soto, C. (2023). Coeficientes V de Aiken: diferencias en los juicios de validez de contenido. MHSalud, 20(1), 23-32. https://doi.org/10.15359/mhs.20-1.3 #' -#'Singer, J. (2010). Construction of confidence limits about effect measures: A general approach, by G. Y. Zou and A. Donner, Statistics in Medicine 2008; 27:1693-1702.Statistics in Medicine, 29(16), 1757–1759. https://doi.org/10.1002/sim.3887 +#'Singer, J. (2010). Construction of confidence limits about effect measures: A general approach, by G. Y. Zou and A. Donner, Statistics in Medicine 2008; 27:1693-1702.Statistics in Medicine, 29(16), 1757-1759. https://doi.org/10.1002/sim.3887 #' -#'Zou, G.Y. and Donner, A. (2008) Construction of confidence limits about effect measures: a general approach. Stat. Med. 27, 1693–1702. https://doi.org/10.1002/sim.3095 +#'Zou, G.Y. and Donner, A. (2008) Construction of confidence limits about effect measures: a general approach. Stat. Med. 27, 1693-1702. https://doi.org/10.1002/sim.3095 #' #'@seealso #'\code{\link[ratesci:moverci]{ratesci::moverci}} for MOVER method of ratios diff --git a/R/CVC.R b/R/CVC.R index 8d53199..b24e47f 100644 --- a/R/CVC.R +++ b/R/CVC.R @@ -68,7 +68,7 @@ CVC <- function(data, max, conf.level, na.rm = FALSE) { stop("El data.frame debe contener solo valores numericos.") } - # Detección de valores perdidos + # Deteccion de valores perdidos if (!na.rm) { if (any(is.na(data))) { stop("Valores perdidos detectados. Usa na.omit() primero o establece na.rm=TRUE.") diff --git a/R/CVI.R b/R/CVI.R index b6b9e12..1736d8c 100644 --- a/R/CVI.R +++ b/R/CVI.R @@ -89,7 +89,7 @@ CVI <- function(data, cut, conf.level, na.rm = FALSE) { stop("Todas las columnas deben contener datos numericos.") } - # Detección de valores perdidos + # Deteccion de valores perdidos if (!na.rm) { if (any(is.na(data))) { stop("Valores perdidos detectados. Usa na.omit() primero o establece na.rm=TRUE.") diff --git a/R/CVIpub.R b/R/CVIpub.R index 4a7b4ff..505aa18 100644 --- a/R/CVIpub.R +++ b/R/CVIpub.R @@ -7,7 +7,7 @@ #' When \code{correct = TRUE}, the function computes the adjusted coefficient \code{CVI.R} #' and applies the Wilson method to its absolute value. For computational stability, #' CVI values of exactly 1.0 or 0.0 are replaced by 0.9999 and 0.0001 respectively. -#' If an extreme negative value of CVI.R is detected (e.g., from CVI ≈ 0), the value is +#' If an extreme negative value of CVI.R is detected (e.g., from CVI ? 0), the value is #' truncated to 0 and the confidence interval is not estimated. #' #' @param cvi Numeric vector of CVI values (between 0 and 1). @@ -58,7 +58,7 @@ CVIpub <- function(cvi, n, conf.level = 0.95, item.names = NULL, correct = FALSE if (correct) { A <- round(cvi.safe[i] * n[i]) - # Cálculo estable usando log-factorial + # Calculo estable usando log-factorial log_pc <- lchoose(n[i], A) + n[i] * log(0.5) Pc <- exp(log_pc) @@ -69,7 +69,7 @@ CVIpub <- function(cvi, n, conf.level = 0.95, item.names = NULL, correct = FALSE cvir <- 0 lwr[i] <- upr[i] <- NA if (!truncation_reported) { - message("Extreme negative CVI.R value detected (CVI ≈ 0). Truncated to 0; confidence interval not estimated.") + message("Extreme negative CVI.R value detected (CVI ? 0). Truncated to 0; confidence interval not estimated.") truncation_reported <- TRUE } } else { diff --git a/R/CVR.R b/R/CVR.R index 8521749..d9f3943 100644 --- a/R/CVR.R +++ b/R/CVR.R @@ -15,7 +15,7 @@ #'Note: The function has not yet been prepared to resolve missing values, so the user must remove or impute any missing values. #' #'@references -#'Lawshe, C. H. (1975). A quantitative approach to content validity. Personnel psychology, 28, 563–575. https://doi.org/10.1111/j.1744-6570.1975.tb01393.x +#'Lawshe, C. H. (1975). A quantitative approach to content validity. Personnel psychology, 28, 563-575. https://doi.org/10.1111/j.1744-6570.1975.tb01393.x #' #'Martuza, V.R. (1977). Applying norm-referenced and criterion-referenced measurement in education. Boston: Allyn & Bacon #' @@ -37,7 +37,7 @@ #'@export CVR <- function(data, na.rm = FALSE) { - # Detección de valores perdidos + # Deteccion de valores perdidos if (!na.rm) { if (any(is.na(data))) { stop("Valores perdidos detectados. Usa na.omit() primero o establece na.rm=TRUE.") diff --git a/R/CVRcut.R b/R/CVRcut.R index 86cba5b..b836471 100644 --- a/R/CVRcut.R +++ b/R/CVRcut.R @@ -23,13 +23,13 @@ #' - \strong{Bag method}: Bayesian method proposed by Baghestani (1993), with prior selection. #' #' @references -#' Lawshe, C. H. (1975). A quantitative approach to content validity. *Personnel Psychology*, 28(4), 563–575. https://doi.org/10.1111/j.1744-6570.1975.tb01393.x +#' Lawshe, C. H. (1975). A quantitative approach to content validity. *Personnel Psychology*, 28(4), 563-575. https://doi.org/10.1111/j.1744-6570.1975.tb01393.x #' -#' Ayre, C., & Scally, A. J. (2014). Critical Values for Lawshe’s Content Validity Ratio: Revisiting the Original Methods of Calculation. *Measurement and Evaluation in Counseling and Development*, 47(1), 79–86. https://doi.org/10.1177/0748175613513808 +#' Ayre, C., & Scally, A. J. (2014). Critical Values for Lawshe's Content Validity Ratio: Revisiting the Original Methods of Calculation. *Measurement and Evaluation in Counseling and Development*, 47(1), 79-86. https://doi.org/10.1177/0748175613513808 #' -#' Baghestani, A. R., Ahmadi, F., Tanha, A., & Meshkat, M. (2017). Bayesian Critical Values for Lawshe’s Content Validity Ratio. *Measurement and Evaluation in Counseling and Development*, 52(1), 69–73. https://doi.org/10.1080/07481756.2017.1308227 +#' Baghestani, A. R., Ahmadi, F., Tanha, A., & Meshkat, M. (2017). Bayesian Critical Values for Lawshe's Content Validity Ratio. *Measurement and Evaluation in Counseling and Development*, 52(1), 69-73. https://doi.org/10.1080/07481756.2017.1308227 #' -#' Wilson, F. R., Pan, W., & Schumsky, D. A. (2012). Recalculation of the Critical Values for Lawshe’s Content Validity Ratio. *Measurement and Evaluation in Counseling and Development*, 45(3), 197–210. https://doi.org/10.1177/0748175612440286 +#' Wilson, F. R., Pan, W., & Schumsky, D. A. (2012). Recalculation of the Critical Values for Lawshe's Content Validity Ratio. *Measurement and Evaluation in Counseling and Development*, 45(3), 197-210. https://doi.org/10.1177/0748175612440286 #' #' @seealso [CVRcut.Wilson()], [CVRcut.Ayres()], [CVRcut.Bag()] #' diff --git a/R/CVRcutAyres.R b/R/CVRcutAyres.R index 097988c..9d27748 100644 --- a/R/CVRcutAyres.R +++ b/R/CVRcutAyres.R @@ -1,5 +1,5 @@ #' @title Critical value for CVR, based on Ayres & Scally (2014) -#' @description Calculates critical values for Lawshe’s content validity ratio (CVR) using the method +#' @description Calculates critical values for Lawshe's content validity ratio (CVR) using the method #' proposed by Ayres & Scally (2014), based on exact binomial probabilities. #' @param num_jueces Number of judges who provided their ratings (must be >= 2). #' @param alpha Significance level for the critical value calculation (default: 0.05). @@ -22,9 +22,9 @@ #' tests. #' #' @references -#' Ayres, C., & Scally, A. J. (2014). Critical values for Lawshe's content validity ratio. Measurement and Evaluation in Counseling and Development, 47, 79–86. https://doi.org/10.1177/0748175613513808 +#' Ayres, C., & Scally, A. J. (2014). Critical values for Lawshe's content validity ratio. Measurement and Evaluation in Counseling and Development, 47, 79-86. https://doi.org/10.1177/0748175613513808 #' -#' Lawshe, C. H. (1975). A quantitative approach to content validity. Personnel psychology, 28, 563–575. https://doi.org/10.1111/j.1744-6570.1975.tb01393.x +#' Lawshe, C. H. (1975). A quantitative approach to content validity. Personnel psychology, 28, 563-575. https://doi.org/10.1111/j.1744-6570.1975.tb01393.x #' #'@seealso #'\code{\link[ValCont:CVR]{ValCont::CVR}} diff --git a/R/CVRcutWilson.R b/R/CVRcutWilson.R index e1e511a..c3075c6 100644 --- a/R/CVRcutWilson.R +++ b/R/CVRcutWilson.R @@ -55,7 +55,7 @@ CVRcut.Wilson <- function(num_jueces, alpha = 0.05, tails = "one") { z_alpha <- stats::qnorm(1 - alpha / 2) } - # Calcular CVR crítico y numero minimo de jueces + # Calcular CVR critico y numero minimo de jueces cutoff <- round(z_alpha / sqrt(num_jueces), 3) min_jueces <- ceiling(z_alpha * sqrt(num_jueces / 2) + num_jueces / 2) diff --git a/R/CVplot.R b/R/CVplot.R index 9e5aa2b..5358bf4 100644 --- a/R/CVplot.R +++ b/R/CVplot.R @@ -31,7 +31,7 @@ #' \strong{Note}: The function has not yet been prepared to resolve missing values, so the user must remove or impute any `NA`s before plotting. #' #' @references -#' Hink, J. K., Wogalter, M. S., & Eustace, J. K. (1996). Display of Quantitative Information: Are Grables better than Plain Graphs or Tables? *Proceedings of the Human Factors and Ergonomics Society Annual Meeting*, 40(23), 1155–1159. https://doi.org/10.1177/154193129604002302 +#' Hink, J. K., Wogalter, M. S., & Eustace, J. K. (1996). Display of Quantitative Information: Are Grables better than Plain Graphs or Tables? *Proceedings of the Human Factors and Ergonomics Society Annual Meeting*, 40(23), 1155-1159. https://doi.org/10.1177/154193129604002302 #' #' Tufte, E. R. (2001). *The Visual Display of Quantitative Information*. Cheshire, CT: Graphics Press. #' @@ -65,7 +65,7 @@ CVplot <- function(data, item.col, point.coeficient, lwr.ci, up.ci, rotate.x.labels = FALSE, na.rm = FALSE) { - # Detección de valores perdidos + # Deteccion de valores perdidos if (!na.rm) { if (any(is.na(data))) { stop("Valores perdidos detectados. Usa na.omit() primero o establece na.rm=TRUE.") diff --git a/R/D2.R b/R/D2.R index 0a968ea..90a9d2f 100644 --- a/R/D2.R +++ b/R/D2.R @@ -47,12 +47,12 @@ #' #' @references #' Aiken, L. R., & Aiken, T. A. (1986). Difference Tests for Distributions of Ratings. -#' Educational and Psychological Measurement, 46(4), 871–881. https://doi.org/10.1177/001316448604600407 +#' Educational and Psychological Measurement, 46(4), 871-881. https://doi.org/10.1177/001316448604600407 #' #' Rosenthal, R. (1991). Meta-analytic procedures for social research (revised). Sage: Newbury Park, CA. #' #' Bishara, A. J., & Hittner, J. B. (2017). Confidence intervals for correlations when data are not normal. -#' Behavior Research Methods, 49(1), 294–309. https://doi.org/10.3758/s13428-016-0702-8 +#' Behavior Research Methods, 49(1), 294-309. https://doi.org/10.3758/s13428-016-0702-8 #' #' @examples #' diff --git a/R/HAiken.R b/R/HAiken.R index b2d8e88..5283df7 100644 --- a/R/HAiken.R +++ b/R/HAiken.R @@ -23,7 +23,7 @@ #' #'Aiken, L. R. (1985). Three coefficients for analyzing the reliability and validity of ratings. Educational and Psychological Measurement, 45, 131-142. https://doi.org/10.1177/0013164485451012 #' -#'Penfield, R. D., & Miller, J. M. (2004). Improving Content Validation Studies Using an Asymmetric Confidence Interval for the Mean of Expert Ratings. Applied Measurement in Education, 17(4), 359–370. https://doi.org/10.1207/s15324818ame1704_2 +#'Penfield, R. D., & Miller, J. M. (2004). Improving Content Validation Studies Using an Asymmetric Confidence Interval for the Mean of Expert Ratings. Applied Measurement in Education, 17(4), 359-370. https://doi.org/10.1207/s15324818ame1704_2 #' #'Wilson, E. B. (1927). Probable inference, the law of succession, and statistical inference. Journal of the American Statistical Association, 22, 209-212. https://doi.org/10.2307/2276774 #' @@ -60,7 +60,7 @@ #'@export Haiken <- function(data, ncat, conf.level, na.rm = FALSE) { - # Detección de valores perdidos + # Deteccion de valores perdidos if (!na.rm) { if (any(is.na(data))) { stop("Valores perdidos detectados. Usa na.omit() primero o establece na.rm=TRUE.") diff --git a/R/HT.R b/R/HT.R index 297be5e..177a5db 100644 --- a/R/HT.R +++ b/R/HT.R @@ -1,4 +1,4 @@ -#' Hinkin–Tracey Content Validity Indices for Multiple Items +#' Hinkin-Tracey Content Validity Indices for Multiple Items #' #' @description #' Computes Hinkin and Tracey (1999) content validity indices for multiple items @@ -20,7 +20,7 @@ #' and then rescaled to the \code{htc}/\code{htd} metrics. #' #' @param data A data frame or matrix in wide format, where each column -#' corresponds to one item–construct combination. Columns are expected +#' corresponds to one item-construct combination. Columns are expected #' to follow the pattern \code{"item.construct"}, e.g., #' \code{"item1.c1"}, \code{"item1.c2"}, \code{"item1.c3"}. #' @param items Character vector with the base names of the items to be @@ -116,12 +116,12 @@ #' \code{item}, \code{target}, \code{nj}, and the construct means #' (\code{M.} columns).} #' \item{\code{Item.criteria}}{A data frame with one row per item, -#' containing the global Hinkin–Tracey indices: +#' containing the global Hinkin-Tracey indices: #' \code{item}, \code{htc}, \code{htc.lci}, \code{htc.uci}, #' \code{htd}, \code{htd.lci}, \code{htd.uci}. If \code{ci = FALSE}, #' the confidence interval columns are filled with \code{NA}.} #' \item{\code{Pairwise.criteria}}{A data frame in long format, with one -#' row per item–orbiting construct combination, containing: +#' row per item-orbiting construct combination, containing: #' \code{item}, \code{target}, \code{orbiting}, \code{htd}, #' \code{htd.lci}, \code{htd.uci}. If \code{ci = FALSE}, the confidence #' interval columns are filled with \code{NA}.} @@ -129,16 +129,16 @@ #' #' @references #' Hinkin, T. R., & Tracey, J. B. (1999). An analysis of variance approach -#' to content validation. \emph{Organizational Research Methods, 2}(2), 175–186. +#' to content validation. \emph{Organizational Research Methods, 2}(2), 175-186. #' #' Colquitt, J. A., Sabey, T. B., Rodell, J. B., & Hill, E. T. (2019). #' Content validation guidelines: Evaluation criteria for definitional #' correspondence and definitional distinctiveness. \emph{Journal of Applied -#' Psychology, 104}(10), 1243–1265. +#' Psychology, 104}(10), 1243-1265. #' #' Penfield, R. D., & Miller, J. M. (2004). Improving content validation #' studies using an asymmetric confidence interval for the mean of expert -#' ratings. \emph{Applied Measurement in Education, 17}(4), 359–370. +#' ratings. \emph{Applied Measurement in Education, 17}(4), 359-370. #' #' @examples #' \dontrun{ diff --git a/R/LuAgree.R b/R/LuAgree.R index b3770ec..b04f780 100644 --- a/R/LuAgree.R +++ b/R/LuAgree.R @@ -142,7 +142,7 @@ #' \item \code{n_subjects} Number of subjects used in the analysis. #' \item \code{n_judges} Number of judges. #' \item \code{categories} The ordered rating categories used. -#' \item \code{p_empirical} Empirical category probabilities (información +#' \item \code{p_empirical} Empirical category probabilities (informacion #' auxiliar; no se imprime por defecto). #' \item \code{call} The matched function call. #' } diff --git a/R/MDScontent.R b/R/MDScontent.R index a15dc2f..f731f13 100644 --- a/R/MDScontent.R +++ b/R/MDScontent.R @@ -1,23 +1,23 @@ -#' Multidimensional scaling (MDS) Map for Content Validity Ratings (Item–Trait Correspondence) +#' Multidimensional scaling (MDS) Map for Content Validity Ratings (Item-Trait Correspondence) #' #' @description #' `MDScontent()` builds a **conceptual map** (MDS) from judges' ratings of the #' correspondence between each item and each trait (attribute). The function: -#' (1) aggregates judges' ratings into an **Items × Traits** profile matrix, +#' (1) aggregates judges' ratings into an **Items x Traits** profile matrix, #' (2) computes **item-to-item dissimilarities** (default: Euclidean), #' (3) obtains a **2D MDS configuration** (default: non-metric, with STRESS), #' (4) computes **trait centroids** in the MDS space (theoretical via `key`, or empirical), -#' (5) optionally returns an **item–trait distance matrix** (`Dmatrix = TRUE`), +#' (5) optionally returns an **item-trait distance matrix** (`Dmatrix = TRUE`), #' and (6) plots either the main map, a biplot, or both. #' -#' @param data Numeric `matrix` or `data.frame` of size J × (I*T): rows are judges; +#' @param data Numeric `matrix` or `data.frame` of size J x (I*T): rows are judges; #' each column corresponds to a specific (item, trait) pair rating. #' @param item Vector of length `ncol(data)` indicating the **item id** for each column. #' @param trait Vector of length `ncol(data)` indicating the **trait id** for each column. #' @param key Optional vector of length I (number of unique items). Theoretical trait #' assignment for each item (used to define centroids). If `NULL`, items are assigned #' empirically to the trait with the largest profile score. -#' @param score Aggregation of judges into the Items × Traits profile matrix: +#' @param score Aggregation of judges into the Items x Traits profile matrix: #' `"mean"` (default), `"median"`, or `"p_ge"` (proportion of ratings >= `cut`). #' @param cut Integer threshold for `score = "p_ge"`. Default is 4. #' @param distance Item-to-item dissimilarity computed from profiles: @@ -27,7 +27,7 @@ #' @param centroid How to compute centroid coordinates per trait: #' `"mean"` (default) or `"median"` (coordinate-wise). #' @param display Plot type: `"items"` (main map), `"biplot"`, or `"both"`. -#' @param Dmatrix Logical; if `TRUE`, returns the item–trait distance matrix Δ (I × T). +#' @param Dmatrix Logical; if `TRUE`, returns the item-trait distance matrix x (I x T). #' @param label.items Logical; label items in plot(s). Default `TRUE`. #' @param label.traits Logical; label trait centroids in plot(s). Default `TRUE`. #' @param ... Additional arguments forwarded to the MDS routine: @@ -35,18 +35,18 @@ #' #' @return A list with elements: #' \describe{ -#' \item{profile}{Items × Traits matrix used to build distances.} +#' \item{profile}{Items x Traits matrix used to build distances.} #' \item{dist_items}{`dist` object of item-to-item dissimilarities.} #' \item{coords_items}{data.frame of MDS coordinates for items.} #' \item{centroids}{data.frame of centroid coordinates for traits and centroid type.} #' \item{fit}{list with `mds`, `k`, `stress` (if nonmetric), and `gof` (R^2 of distances).} -#' \item{Dmatrix}{(Optional) matrix Δ of item–trait distances in MDS space.} +#' \item{Dmatrix}{(Optional) matrix x of item-trait distances in MDS space.} #' } #' #' @details #' ## Conceptual rationale #' The function provides a **geometric visualization** of content validity structure. -#' Ratings from judges are first aggregated into an Items × Traits profile matrix. +#' Ratings from judges are first aggregated into an Items x Traits profile matrix. #' Item-to-item dissimilarities are computed (default: Euclidean distance), #' and a multidimensional scaling (MDS) solution is obtained (default: non-metric). #' @@ -86,58 +86,54 @@ #' Therefore, `MDScontent()` should be interpreted as a structural visualization tool #' that complements coefficient-based evidence. #' +#' @importFrom rlang .data #' @examples -#' ## Example 1 -#'# This simulated data has the following structure: 12 judges evaluated the fit of 6 -#'# items in 4 attributes. That is: 12 judges × 6 items × 4 traits matrix. In the administration -#'# of the validity survey, the items were presented in 12 rows, and each item -#'# was evaluated for its correspondence to four attributes. The database should -#'# be structured as follows: -#'# -#'# item item1.judge1 item1.judge2 item1.judge3 item1.judge4 item2.judge1 item2.judge2 ... -#'# -#'# For this example: +#' # This simulated data has the following structure: 12 judges evaluated the fit +#' # of 6 items on 4 traits. The data therefore contain 12 rows and 24 columns, +#' # with four columns for each item, one column per trait. #' -#'# Item1 (Fit to Trait 1) -#'# Item2 (Fit to Trait 1) -#'# Item3 (Fit to Trait 2) -#'# Item4 (Fit to Trait 2) -#'# Item5 (Approximate fit to Trait 3) -#'# Item6 (Approximate fit to Trait 4) -#'# -#'# Example2 <- matrix(c( -#'# 5,2,2,1, 5,1,2,1, 2,5,1,2, 1,5,2,1, 2,1,5,2, 1,2,2,5, -#'# 5,1,2,2, 4,2,1,1, 1,5,2,1, 2,5,1,1, 1,2,5,2, 2,1,1,5, -#'# 4,2,1,1, 5,1,2,1, 2,4,1,2, 1,5,2,2, 2,1,5,1, 1,2,2,5, -#'# 5,1,2,1, 5,2,1,1, 1,5,2,1, 2,4,1,2, 1,2,5,2, 2,1,1,5, -#'# 4,2,1,2, 5,1,2,1, 2,5,1,1, 1,5,2,1, 2,1,4,2, 1,2,2,4, -#'# 5,1,2,1, 4,2,1,2, 1,5,2,1, 2,5,1,1, 1,2,5,1, 2,1,2,5, -#'# 5,2,1,1, 5,1,2,1, 2,4,1,2, 1,5,2,1, 2,1,5,2, 1,2,1,5, -#'# 4,1,2,1, 5,2,1,1, 1,5,2,2, 2,4,1,1, 1,2,5,1, 2,1,2,5, -#'# 5,2,1,1, 4,1,2,2, 2,5,1,1, 1,5,2,1, 2,1,5,2, 1,2,1,5, -#'# 5,1,2,2, 5,2,1,1, 1,5,2,1, 2,5,1,2, 1,2,5,1, 2,1,2,5, -#'# 4,2,1,1, 5,1,2,1, 2,4,1,2, 1,5,2,1, 2,1,4,2, 1,2,1,5, -#'# 5,1,2,1, 4,2,1,1, 1,5,2,1, 2,4,1,2, 1,2,5,1, 2,1,2,5), -#'# nrow = 12, -#'# byrow = TRUE) +#' # In the validity survey, the items were presented in 12 rows, and each item +#' # was evaluated for its correspondence to the four traits. The columns follow +#' # this pattern: #' -#'## Short cut for grouping items -#'rep(1:6, each = 4) +#' # item item1.trait1 item1.trait2 item1.trait3 item1.trait4 item2.trait1 ... #' -#'## Short cut for grouping traits -#'#'rep(1:4, times = 6) +#' # The theoretical correspondence used below is: #' -#'## theorethical correspondence -#'c(1,1,2,2,3,4) +#' # Item 1 -> Trait 1 +#' # Item 2 -> Trait 1 +#' # Item 3 -> Trait 2 +#' # Item 4 -> Trait 2 +#' # Item 5 -> Trait 3 +#' # Item 6 -> Trait 4 #' -#'MDScontent(data = dat2, -#'item = rep(1:6, each = 4), -#'trait = rep(1:4, times = 6), -#'key = key <- c(1,1,2,2,3,4), -#'score = "mean", -#'distance = "euclid", -#'mds = "nonmetric", -#'display = "items") +#' dat2 <- matrix(c( +#' 5,2,2,1, 5,1,2,1, 2,5,1,2, 1,5,2,1, 2,1,5,2, 1,2,2,5, +#' 5,1,2,2, 4,2,1,1, 1,5,2,1, 2,5,1,1, 1,2,5,2, 2,1,1,5, +#' 4,2,1,1, 5,1,2,1, 2,4,1,2, 1,5,2,2, 2,1,5,1, 1,2,2,5, +#' 5,1,2,1, 5,2,1,1, 1,5,2,1, 2,4,1,2, 1,2,5,2, 2,1,1,5, +#' 4,2,1,2, 5,1,2,1, 2,5,1,1, 1,5,2,1, 2,1,4,2, 1,2,2,4, +#' 5,1,2,1, 4,2,1,2, 1,5,2,1, 2,5,1,1, 1,2,5,1, 2,1,2,5, +#' 5,2,1,1, 5,1,2,1, 2,4,1,2, 1,5,2,1, 2,1,5,2, 1,2,1,5, +#' 4,1,2,1, 5,2,1,1, 1,5,2,2, 2,4,1,1, 1,2,5,1, 2,1,2,5, +#' 5,2,1,1, 4,1,2,2, 2,5,1,1, 1,5,2,1, 2,1,5,2, 1,2,1,5, +#' 5,1,2,2, 5,2,1,1, 1,5,2,1, 2,5,1,2, 1,2,5,1, 2,1,2,5, +#' 4,2,1,1, 5,1,2,1, 2,4,1,2, 1,5,2,1, 2,1,4,2, 1,2,1,5, +#' 5,1,2,1, 4,2,1,1, 1,5,2,1, 2,4,1,2, 1,2,5,1, 2,1,2,5), +#' nrow = 12, +#' byrow = TRUE +#' ) +#' key <- c(1, 1, 2, 2, 3, 4) +#' MDScontent( +#' data = dat2, +#' item = rep(1:6, each = 4), +#' trait = rep(1:4, times = 6), +#' key = key, +#' score = "mean", +#' distance = "euclid", +#' mds = "nonmetric", +#' display = "items" +#' ) #' #' @export MDScontent <- function( @@ -166,7 +162,7 @@ MDScontent <- function( if (is.data.frame(data)) data <- as.matrix(data) if (!is.matrix(data) || !is.numeric(data)) stop("`data` must be a numeric matrix/data.frame.") - if (ncol(data) < 2) stop("`data` must have at least 2 columns (>= 2 item×trait pairs).") + if (ncol(data) < 2) stop("`data` must have at least 2 columns (>= 2 itemxtrait pairs).") if (missing(item) || missing(trait)) stop("Both `item` and `trait` must be provided.") if (length(item) != ncol(data)) stop("`item` must have length equal to ncol(data).") @@ -184,7 +180,7 @@ MDScontent <- function( k <- as.integer(k) # ----------------------- - # Build Items × Traits profile matrix X + # Build Items x Traits profile matrix X # ----------------------- item_levels <- unique(item) trait_levels <- unique(trait) @@ -227,14 +223,14 @@ MDScontent <- function( euclid = stats::dist(X, method = "euclidean"), cor = { Ci <- stats::cor(t(X), method = "pearson", use = "pairwise.complete.obs") - as.dist(pmax(0, 1 - Ci)) + stats::as.dist(pmax(0, 1 - Ci)) }, cosine = { norms <- sqrt(rowSums(X^2)) norms[norms == 0] <- 1 Xn <- X / norms S <- Xn %*% t(Xn) - as.dist(pmax(0, 1 - S)) + stats::as.dist(pmax(0, 1 - S)) } ) @@ -328,7 +324,7 @@ MDScontent <- function( ) # ----------------------- - # Dmatrix: item–trait distances in the MDS plane + # Dmatrix: item-trait distances in the MDS plane # ----------------------- Dmat <- NULL if (isTRUE(Dmatrix)) { @@ -369,7 +365,7 @@ MDScontent <- function( # Convex Hulls hull_data <- do.call(rbind, lapply(split(df_items, df_items$trait), function(d) { if (nrow(d) >= 3) { - h <- d[chull(d$Dim1, d$Dim2), , drop = FALSE] + h <- d[grDevices::chull(d$Dim1, d$Dim2), , drop = FALSE] return(h) } return(NULL) @@ -400,7 +396,7 @@ MDScontent <- function( ) df_arrows <- df_arrows[!is.na(df_arrows$xend) & df_arrows$xend != 0, ] - # Construcción del gráfico base + # Construccion del grafico base p <- ggplot2::ggplot() + ggplot2::theme_minimal() + ggplot2::labs( @@ -413,45 +409,54 @@ MDScontent <- function( if (display == "items" || display == "both") { if (!is.null(hull_data)) { p <- p + ggplot2::geom_polygon(data = hull_data, - ggplot2::aes(x = Dim1, y = Dim2, group = trait, fill = trait), + ggplot2::aes(x = .data$Dim1, y = .data$Dim2, + group = .data$trait, fill = .data$trait), alpha = 0.1, color = NA, show.legend = FALSE) } p <- p + ggplot2::geom_segment(data = df_segments, - ggplot2::aes(x = Dim1_item, y = Dim2_item, xend = Dim1_cent, yend = Dim2_cent, color = trait), + ggplot2::aes(x = .data$Dim1_item, y = .data$Dim2_item, + xend = .data$Dim1_cent, yend = .data$Dim2_cent, + color = .data$trait), alpha = 0.4, show.legend = FALSE) + ggplot2::geom_point(data = df_items, - ggplot2::aes(x = Dim1, y = Dim2, color = trait), + ggplot2::aes(x = .data$Dim1, y = .data$Dim2, color = .data$trait), size = 3, alpha = 0.9) + ggplot2::geom_point(data = df_centroids, - ggplot2::aes(x = Dim1, y = Dim2, fill = trait), + ggplot2::aes(x = .data$Dim1, y = .data$Dim2, fill = .data$trait), shape = 22, size = 5, color = "black", stroke = 1.2, show.legend = TRUE) if (isTRUE(label.items)) { p <- p + ggrepel::geom_text_repel(data = df_items, - ggplot2::aes(x = Dim1, y = Dim2, label = item), + ggplot2::aes(x = .data$Dim1, y = .data$Dim2, + label = .data$item), size = 3, max.overlaps = 20) } if (isTRUE(label.traits)) { p <- p + ggplot2::geom_text(data = df_centroids, - ggplot2::aes(x = Dim1, y = Dim2, label = trait), + ggplot2::aes(x = .data$Dim1, y = .data$Dim2, + label = .data$trait), vjust = -1.5, fontface = "bold", size = 4) } } if (display == "biplot" || display == "both") { p <- p + ggplot2::geom_segment(data = df_arrows, - ggplot2::aes(x = x, y = y, xend = xend, yend = yend, color = trait), + ggplot2::aes(x = .data$x, y = .data$y, + xend = .data$xend, yend = .data$yend, + color = .data$trait), arrow = ggplot2::arrow(length = ggplot2::unit(0.15, "inches")), linewidth = 1.1, show.legend = FALSE) if (display == "biplot" && isTRUE(label.items)) { p <- p + ggrepel::geom_text_repel(data = df_items, - ggplot2::aes(x = Dim1, y = Dim2, label = item), + ggplot2::aes(x = .data$Dim1, y = .data$Dim2, + label = .data$item), size = 3, max.overlaps = 20) } if (isTRUE(label.traits)) { p <- p + ggplot2::geom_text(data = df_arrows, - ggplot2::aes(x = xend, y = yend, label = trait, color = trait), + ggplot2::aes(x = .data$xend, y = .data$yend, + label = .data$trait, color = .data$trait), vjust = -1, hjust = -0.1, fontface = "bold", size = 4, show.legend = FALSE) } } diff --git a/R/MER.R b/R/MER.R index ee79bc5..cd14796 100644 --- a/R/MER.R +++ b/R/MER.R @@ -26,9 +26,9 @@ #' #'Penfield, R. D. (2003). A score method of constructing asymmetric confidence intervals for the mean of a rating scale item. Psychological methods, 8(2), 149-163. https://doi.org/10.1037/1082-989x.8.2.149 #' -#'Penfield, R. D. & Giacobbi, P. R., Jr. (2004) Applying a score confidence interval to Aiken’s item content-relevance index. Measurement in Physical Education and Exercise Science, 8(4), 213-225. https://doi.org/10.1207/s15327841mpee0804_3 +#'Penfield, R. D. & Giacobbi, P. R., Jr. (2004) Applying a score confidence interval to Aiken's item content-relevance index. Measurement in Physical Education and Exercise Science, 8(4), 213-225. https://doi.org/10.1207/s15327841mpee0804_3 #' -#'Penfield, R. D., & Miller, J. M. (2004). Improving Content Validation Studies Using an Asymmetric Confidence Interval for the Mean of Expert Ratings. Applied Measurement in Education, 17(4), 359–370. https://doi.org/10.1207/s15324818ame1704_2 +#'Penfield, R. D., & Miller, J. M. (2004). Improving Content Validation Studies Using an Asymmetric Confidence Interval for the Mean of Expert Ratings. Applied Measurement in Education, 17(4), 359-370. https://doi.org/10.1207/s15324818ame1704_2 #' #'Wilson, E. B. (1927). Probable inference, the law of succession, and statistical inference. Journal of the American Statistical Association, 22, 209-212. https://doi.org/10.2307/2276774 #' diff --git a/R/MERpub.R b/R/MERpub.R index c0fd85e..d3c6f7e 100644 --- a/R/MERpub.R +++ b/R/MERpub.R @@ -25,43 +25,43 @@ #' #' The score confidence interval does not require the standard deviation of the #' ratings; it derives the standard error from the mean and the number of raters, -#' assuming the data follow a bounded binomial‑like distribution. This approach +#' assuming the data follow a bounded binomial-like distribution. This approach #' is more appropriate for content validity ratings, which typically involve small #' numbers of experts (often < 10) and few response categories. #' #' For an item with mean M and n raters, the interval is computed as: #' \itemize{ #' \item Compute p = M/k if start = 0, or p = (M-1)/k if start = 1, where k = ncat - 1. -#' \item Obtain π_L and π_U via Wilson score limits for the proportion p. -#' \item Compute LCL = M - z * sqrt(k * π_L * (1 - π_L) / n) -#' \item Compute UCL = M + z * sqrt(k * π_U * (1 - π_U) / n) +#' \item Obtain ?_L and ?_U via Wilson score limits for the proportion p. +#' \item Compute LCL = M - z * sqrt(k * ?_L * (1 - ?_L) / n) +#' \item Compute UCL = M + z * sqrt(k * ?_U * (1 - ?_U) / n) #' } #' The resulting limits are truncated to the possible scale range [start, start + ncat - 1]. #' #' @references #' Penfield, R. D. (2003). A score method of constructing asymmetric confidence #' intervals for the mean of a rating scale item. Psychological Methods, 8(2), 149-163. -#' \url{https://doi.org/10.1037/1082-989x.8.2.149} +#' \doi{10.1037/1082-989x.8.2.149} #' #' Penfield, R. D., & Miller, J. M. (2004). Improving content validation studies #' using an asymmetric confidence interval for the mean of expert ratings. -#' Applied Measurement in Education, 17(4), 359–370. -#' \url{https://doi.org/10.1207/s15324818ame1704_2} +#' Applied Measurement in Education, 17(4), 359-370. +#' \doi{10.1207/s15324818ame1704_2} #' #' Miller, J. M., & Penfield, R. D. (2005). Using the score method to construct #' asymmetric confidence intervals: An SAS program for content validation in #' scale development. Behavior Research Methods, 37, 450-452. -#' \url{https://doi.org/10.3758/BF03192713} +#' \doi{10.3758/BF03192713} #' #' Wilson, E. B. (1927). Probable inference, the law of succession, and statistical #' inference. Journal of the American Statistical Association, 22, 209-212. -#' \url{https://doi.org/10.2307/2276774} +#' \doi{10.2307/2276774} #' #' @seealso #' \code{\link{MER}} for the version that works with raw ratings (dataframe of judges). #' #' @examples -#' \dontest{ +#' \donttest{ #' # Example with vectors directly #' medias <- c(4.2, 3.8, 4.5) #' ns <- c(8, 10, 7) diff --git a/R/SVALmult.R b/R/SVALmult.R index 6794a08..7a199be 100644 --- a/R/SVALmult.R +++ b/R/SVALmult.R @@ -1,8 +1,8 @@ #' @title Substantive Validity for an set of Items #' @description #' For a data frame of items, this function calculates two substantive validity -#' coefficients—\code{psa} (proportion of substantive agreement) and \code{svc} -#' (substantive validity coefficient; Anderson & Gerbing, 1991)—along with asymmetric +#' coefficients-\code{psa} (proportion of substantive agreement) and \code{svc} +#' (substantive validity coefficient; Anderson & Gerbing, 1991)-along with asymmetric #' confidence intervals using the Wilson method. #' #' @param data A data frame with item responses. Each response represents a chosen construct, typically forming a multinomial variable. @@ -52,15 +52,15 @@ #' \strong{Interpretation of Negative SVC Values}: Negative values of the \code{svc} coefficient are valid and interpretable. They indicate that the selected category was chosen less frequently than the average of the non-target categories, suggesting low substantive agreement for that construct. #' #' @references -#' Anderson, J. C., & Gerbing, D. W. (1991). Predicting the performance of measures in a confirmatory factor analysis with a pretest assessment of their substantive validities. \emph{Journal of Applied Psychology, 76}(5), 732–740. https://doi.org/10.1037/0021-9010.76.5.732 +#' Anderson, J. C., & Gerbing, D. W. (1991). Predicting the performance of measures in a confirmatory factor analysis with a pretest assessment of their substantive validities. \emph{Journal of Applied Psychology, 76}(5), 732-740. https://doi.org/10.1037/0021-9010.76.5.732 #' -#' Cabedo-Peris, J., Merino-Soto, C., Chans, G.M., & Marti-Vilar, M. (2024). Exploring the Loss Aversion Scale’s psychometric properties in Spain. \emph{Scientific Reports, 14}, 15756. https://doi.org/10.1038/s41598-024-66695-6 +#' Cabedo-Peris, J., Merino-Soto, C., Chans, G.M., & Marti-Vilar, M. (2024). Exploring the Loss Aversion Scale's psychometric properties in Spain. \emph{Scientific Reports, 14}, 15756. https://doi.org/10.1038/s41598-024-66695-6 #' -#' Merino-Soto, C., Calderón-De la Cruz, G., Gil-Monte, P., & Juárez-García, A. (2021). Substantive validity within the framework of content validity: Application in the Workload Scale. \emph{Revista Argentina de Ciencias del Comportamiento, 13}(1), 81–92. \url{https://revistas.unc.edu.ar/index.php/racc/article/view/20547/33426} +#' Merino-Soto, C., Calderon-De la Cruz, G., Gil-Monte, P., & Juarez-Garcia, A. (2021). Substantive validity within the framework of content validity: Application in the Workload Scale. \emph{Revista Argentina de Ciencias del Comportamiento, 13}(1), 81-92. \url{https://revistas.unc.edu.ar/index.php/racc/article/view/20547/33426} #' -#' Penfield, R. D., & Giacobbi, P. R. Jr. (2004). Applying a score confidence interval to Aiken’s item content-relevance index. \emph{Measurement in Physical Education and Exercise Science, 8}(4), 213–225. https://doi.org/10.1207/s15327841mpee0804_3 +#' Penfield, R. D., & Giacobbi, P. R. Jr. (2004). Applying a score confidence interval to Aiken's item content-relevance index. \emph{Measurement in Physical Education and Exercise Science, 8}(4), 213-225. https://doi.org/10.1207/s15327841mpee0804_3 #' -#' Wilson, E. B. (1927). Probable inference, the law of succession, and statistical inference. \emph{Journal of the American Statistical Association, 22}, 209–212. https://doi.org/10.2307/2276774 +#' Wilson, E. B. (1927). Probable inference, the law of succession, and statistical inference. \emph{Journal of the American Statistical Association, 22}, 209-212. https://doi.org/10.2307/2276774 #' #' @seealso #' \code{\link[PropCIs:scoreci]{PropCIs::scoreci}} for score-based confidence intervals. \cr @@ -78,12 +78,12 @@ #' SVALmult(data = data.gais, columns = c(1,2,3), conf.level = .90) #' #' @author -#' César Merino-Soto (\email{sikayax@yahoo.com.ar}) +#' Cesar Merino-Soto (\email{sikayax@yahoo.com.ar}) #' #' @export SVALmult <- function(data, columns, conf.level = 0.95, na.rm = FALSE) { - # Detección de valores perdidos + # Deteccion de valores perdidos if (!na.rm) { if (any(is.na(data))) { stop("Valores perdidos detectados. Usa na.omit() primero o establece na.rm=TRUE.") diff --git a/R/SVALplot.R b/R/SVALplot.R index 775d4fe..b70dcec 100644 --- a/R/SVALplot.R +++ b/R/SVALplot.R @@ -29,7 +29,7 @@ #' SVALplot(results, item = "gais3", type = "psa", labels = c("Anger", "Fear", "Joy", "Sadness"))} #' #' @author -#' César Merino-Soto (\email{sikayax@yahoo.com.ar}) +#' Cesar Merino-Soto (\email{sikayax@yahoo.com.ar}) #' #' @export SVALplot <- function(results, item, type = "svc", target = NULL, labels = NULL) { @@ -47,7 +47,7 @@ SVALplot <- function(results, item, type = "svc", target = NULL, labels = NULL) df$CategoryLabel <- labels } - # Añadir asterisco al target si se indica + # Anadir asterisco al target si se indica if (!is.null(target)) { df$CategoryLabel[df$Cat == target] <- paste0(df$CategoryLabel[df$Cat == target], "*") } diff --git a/R/SVALsingle.R b/R/SVALsingle.R index f3e642a..415c38f 100644 --- a/R/SVALsingle.R +++ b/R/SVALsingle.R @@ -23,18 +23,18 @@ #' @references #' Anderson, J. C., & Gerbing, D. W. (1991). Predicting the performance of measures in #' a confirmatory factor analysis with a pretest assessment of their substantive -#' validities. *Journal of Applied Psychology*, 76(5), 732–740. https://doi.org/10.1037/0021-9010.76.5.732 +#' validities. *Journal of Applied Psychology*, 76(5), 732-740. https://doi.org/10.1037/0021-9010.76.5.732 #' #' Cabedo-Peris, J., Merino-Soto, C., Chans, G.M., & Marti-Vilar, M. (2024). -#' Exploring the Loss Aversion Scale’s psychometric properties in Spain. +#' Exploring the Loss Aversion Scale's psychometric properties in Spain. #' *Scientific Reports*, 14, 15756. https://doi.org/10.1038/s41598-024-66695-6 #' #' Penfield, R. D., & Giacobbi, P. R., Jr. (2004). Applying a score confidence interval -#' to Aiken’s item content-relevance index. *Measurement in Physical Education and -#' Exercise Science*, 8(4), 213–225. https://doi.org/10.1207/s15327841mpee0804_3 +#' to Aiken's item content-relevance index. *Measurement in Physical Education and +#' Exercise Science*, 8(4), 213-225. https://doi.org/10.1207/s15327841mpee0804_3 #' #' Wilson, E. B. (1927). Probable inference, the law of succession, and statistical -#' inference. *Journal of the American Statistical Association*, 22, 209–212. +#' inference. *Journal of the American Statistical Association*, 22, 209-212. #' https://doi.org/10.2307/2276774 #' #' @seealso diff --git a/R/VAiken.R b/R/VAiken.R index 76d7f7f..98249bd 100644 --- a/R/VAiken.R +++ b/R/VAiken.R @@ -25,7 +25,7 @@ #' #'Merino, C., & Livia, J. (2009). Intervalos de confianza asimetricos para el indice de validez de contenido: un programa Visual Basic para la V de Aiken. Anales de Psicologia, 25(1), 169-171. https://revistas.um.es/analesps/article/view/71631 #' -#'Penfield, R. D. & Giacobbi, P. R., Jr. (2004) Applying a score confidence interval to Aiken’s item content-relevance index. Measurement in Physical Education and Exercise Science, 8(4), 213-225. https://doi.org/10.1207/s15327841mpee0804_3 +#'Penfield, R. D. & Giacobbi, P. R., Jr. (2004) Applying a score confidence interval to Aiken's item content-relevance index. Measurement in Physical Education and Exercise Science, 8(4), 213-225. https://doi.org/10.1207/s15327841mpee0804_3 #' #'Wilson, E. B. (1927). Probable inference, the law of succession, and statistical inference. Journal of the American Statistical Association, 22, 209-212. https://doi.org/10.2307/2276774 #' @@ -52,7 +52,7 @@ Vaiken <- function(data, min, max, conf.level = 0.95, na.rm = FALSE) { - # Detección de valores perdidos + # Deteccion de valores perdidos if (!na.rm) { if (any(is.na(data))) { stop("Valores perdidos detectados. Usa na.omit() primero o establece na.rm=TRUE.") diff --git a/R/Vaikenpub.R b/R/Vaikenpub.R index 2905e17..f6e0f7a 100644 --- a/R/Vaikenpub.R +++ b/R/Vaikenpub.R @@ -15,11 +15,11 @@ #' @return A data.frame with item names, V values, and lower and upper confidence intervals. #' #' @references -#' Penfield, R. D., & Giacobbi, P. R., Jr. (2004). Applying a score confidence interval to Aiken’s item content-relevance index. -#' \emph{Measurement in Physical Education and Exercise Science, 8}(4), 213–225. +#' Penfield, R. D., & Giacobbi, P. R., Jr. (2004). Applying a score confidence interval to Aiken's item content-relevance index. +#' \emph{Measurement in Physical Education and Exercise Science, 8}(4), 213-225. #' #' Wilson, E. B. (1927). Probable inference, the law of succession, and statistical inference. -#' \emph{Journal of the American Statistical Association, 22}, 209–212. +#' \emph{Journal of the American Statistical Association, 22}, 209-212. #' #' @examples #' \donttest{ diff --git a/R/minimumCV.R b/R/minimumCV.R index 323a613..20f4857 100644 --- a/R/minimumCV.R +++ b/R/minimumCV.R @@ -158,49 +158,49 @@ minimumCV <- function(target.value, y_range <- c(max(0, y_min - 0.05), min(1, y_max + 0.05)) if (nrow(feasible_data) == 0) { - plot(1, type = "n", - xlim = range(Nsize), - ylim = c(0, 1), - xlab = "Number of Expert Judges (n)", - ylab = "Minimum Required Empirical Coefficient", - main = "Sample Size Planning for Content Validity (Wilson Inversion)") - legend("topright", legend = c("Target Bound", "Infeasible"), - lty = c(2, NA), pch = c(NA, 4), col = c("gray30", "red"), bty = "n") - abline(h = target.value, lty = 2, col = "gray30") - points(infeasible_data$N, - rep(0.5, nrow(infeasible_data)), - pch = 4, col = "red", cex = 1.2) - text(infeasible_data$N, - rep(0.5, nrow(infeasible_data)), - labels = "Unattainable", pos = 3, cex = 0.7, col = "red") + graphics::plot(1, type = "n", + xlim = range(Nsize), + ylim = c(0, 1), + xlab = "Number of Expert Judges (n)", + ylab = "Minimum Required Empirical Coefficient", + main = "Sample Size Planning for Content Validity (Wilson Inversion)") + graphics::legend("topright", legend = c("Target Bound", "Infeasible"), + lty = c(2, NA), pch = c(NA, 4), col = c("gray30", "red"), bty = "n") + graphics::abline(h = target.value, lty = 2, col = "gray30") + graphics::points(infeasible_data$N, + rep(0.5, nrow(infeasible_data)), + pch = 4, col = "red", cex = 1.2) + graphics::text(infeasible_data$N, + rep(0.5, nrow(infeasible_data)), + labels = "Unattainable", pos = 3, cex = 0.7, col = "red") } else { - plot(feasible_data$N, - feasible_data$Min.coef, - pch = 19, - col = "steelblue", - xlim = range(Nsize), - ylim = y_range, - xlab = "Number of Expert Judges (n)", - ylab = "Minimum Required Empirical Coefficient", - main = "Sample Size Planning for Content Validity (Wilson Inversion)") + graphics::plot(feasible_data$N, + feasible_data$Min.coef, + pch = 19, + col = "steelblue", + xlim = range(Nsize), + ylim = y_range, + xlab = "Number of Expert Judges (n)", + ylab = "Minimum Required Empirical Coefficient", + main = "Sample Size Planning for Content Validity (Wilson Inversion)") if (nrow(infeasible_data) > 0) { y_infeasible <- min(1, y_max + 0.02) - points(infeasible_data$N, - rep(y_infeasible, nrow(infeasible_data)), - pch = 4, col = "red", cex = 1.2) - text(infeasible_data$N, - rep(y_infeasible, nrow(infeasible_data)), - labels = "Unattainable", pos = 3, cex = 0.7, col = "red") + graphics::points(infeasible_data$N, + rep(y_infeasible, nrow(infeasible_data)), + pch = 4, col = "red", cex = 1.2) + graphics::text(infeasible_data$N, + rep(y_infeasible, nrow(infeasible_data)), + labels = "Unattainable", pos = 3, cex = 0.7, col = "red") } - abline(h = target.value, lty = 2, col = "gray30") - legend("topright", - legend = c("Feasible (Wilson Inversion)", "Target Bound", "Infeasible"), - pch = c(19, NA, 4), - lty = c(NA, 2, NA), - col = c("steelblue", "gray30", "red"), - bty = "n") + graphics::abline(h = target.value, lty = 2, col = "gray30") + graphics::legend("topright", + legend = c("Feasible (Wilson Inversion)", "Target Bound", "Infeasible"), + pch = c(19, NA, 4), + lty = c(NA, 2, NA), + col = c("steelblue", "gray30", "red"), + bty = "n") } } diff --git a/README.md b/README.md index 8845c69..d75e466 100644 --- a/README.md +++ b/README.md @@ -1,55 +1,60 @@ # ValCont -R package for content validity analysis +R package for content validity analysis. -\strong{Package:} ValCont\ -\strong{Title:} Content Validation Using Vaiken and Other Functions\ -\strong{Version:} 0.1.0\ -\strong{Date:} 07-28-2025\ -[\strong{Authors\@R}](mailto:Authors@R)\strong{:} -- \strong{Cesar Merino-Soto (aut, cre ctb, rev)} -- Email: [sikayax\@yahoo.com.ar](mailto:sikayax@yahoo.com.ar) -- ORCID: https://orcid.org/0000-0001-8049-7069 -- \strong{Jose Livia-Segovia (aut, ctb)} -- Email: [joselivia\@gmail.com](mailto:joselivia@gmail.com) -- ORCID: https://orcid.org/0000-0003-2226-3349 -- \strong{Diego Livia-Ortiz (aut, cre, ctb, rev)} -- Email: [diegolivia\@hotmail.com](mailto:diegolivia@hotmail.com) -- ORCID: https://orcid.org/0000-0002-2107-3140 +## Package Information -\strong{Description:}\ -`ValCont` is a dedicated content validity package in R. `ValCont` implement the computation of several coefficients used in content validity studies, with data usually obtained from selected participants such as expert judges or experiential judges. The coefficients calculated by ValCont are: +- **Title:** Content Validation Using Vaiken and Other Functions +- **Version:** 0.1.0 +- **Date:** 2025-07-28 +- **License:** GPL (>= 3) +- **URL:** +- **Bug reports:** -- CVC (Hernandez-Nieto, 2002) -- CVI (Matuza, 1977; Lynn, 1986) -- CVIR (Polit et al., 2007) -- CVR (Lawshe, 1975) -- Psv (proportion of substantive agreementy) & Csv (coefficient of substantive validity); (Anderson & Gerbing, 1991) -- V (Aiken, 1980, 1985) -- MER (Mean of Expert Ratings; Penfield, & Miller, 2004) +## Authors -Given that these coefficients can be conceptualized and/or are handled as proportions, with limits at 0.0 and 1.0, `ValCont` also implements asymmetric confidence intervals for each coefficient, appropriate for small samples and non-normally distributed data (Penfield & Giacobbi, 2004; Wilson, 1927). +- **Cesar Merino-Soto** (aut, ctb, rev) - [email](mailto:sikayax@yahoo.com.ar) - [ORCID](https://orcid.org/0000-0001-8049-7069) +- **Jose Livia-Segovia** (aut, ctb) - [email](mailto:joselivia@gmail.com) - [ORCID](https://orcid.org/0000-0003-2226-3349) +- **Diego Livia-Ortiz** (aut, cre, ctb, rev) - [email](mailto:diegolivia@hotmail.com) - [ORCID](https://orcid.org/0000-0002-2107-3140) -Some functions were added to estimate other relevant aspects of the content validity analysis: +## Description -- Difference between two independent content validity coefficients: Confidence intervals for difference (Merino-Soto, 2018) and standardized difference (Merino-Soto, 2023) +`ValCont` is an R package for computing coefficients used in content validity +studies based on ratings from expert or experiential judges. The package +implements: -- Ratio of two independent content validity coefficients and confidence Intervals (MOVER-R approach; Zou, Donner, & Qiu, 2025) +- CVC (Hernandez-Nieto, 2002) +- CVI (Martuza, 1977; Lynn, 1986) +- CVIR (Polit et al., 2007) +- CVR (Lawshe, 1975) +- Psv (proportion of substantive agreement) and Csv (coefficient of substantive validity; Anderson & Gerbing, 1991) +- V (Aiken, 1980, 1985) +- MER (mean of expert ratings; Penfield & Miller, 2004) -- Homogeneity of ratings (H coefficient; Aiken, 1980, 1985). +Because these coefficients are proportions bounded between 0 and 1, `ValCont` +also implements asymmetric confidence intervals suitable for small samples and +non-normal data (Penfield & Giacobbi, 2004; Wilson, 1927). -- Basic functions to make graphs of results are also implemented. +Additional functions support: -\strong{Install:} +- Differences between two independent content validity coefficients, including confidence intervals and standardized differences (Merino-Soto, 2018, 2023). +- Ratios of two independent content validity coefficients and their confidence intervals using the MOVER-R approach (Zou, Donner, & Qiu, 2025). +- Homogeneity of ratings using the H coefficient (Aiken, 1980, 1985). +- Basic plots for visualizing results. -You can install the development version of `ValCont` from GitHub using: -```R -if(!"devtools" %in% row.names(installed.packages())){ +## Installation + +You can install the development version of `ValCont` from GitHub with: + +```r +if (!"devtools" %in% rownames(installed.packages())) { install.packages("devtools") } + devtools::install_github("Diegolivia/ValCont") ``` -\strong{References:} + +## References - Aiken, L. R. (1980). Content validity and reliability of single items or questionnaires. Educational and Psychological Measurement, 40, 955-959. - Aiken, L. R. (1985). Three coefficients for analyzing the reliability and validity of ratings. Educational and Psychological Measurement, 45, 131-142. @@ -66,10 +71,9 @@ devtools::install_github("Diegolivia/ValCont") - Wilson, E. B. (1927). Probable inference, the law of succession, and statistical inference. Journal of the American Statistical Association, 22, 209-212. - Zou, G., Donner, A. and Qiu, S. (2025). MOVER-R for Confidence Intervals of Ratios. In Wiley StatsRef: Statistics Reference Online (eds N. Balakrishnan, T. Colton, B. Everitt, W. Piegorsch, F. Ruggeri and J.L. Teugels). -\strong{Depends:} R (\>= 2.10)\ -\strong{Imports:} boot, ggplot2, stats, utils\ -\strong{License:} GPL-3\ -\strong{Encoding:} UTF-8\ -\strong{LazyData:} true\ -\strong{Maintainer:} Diego Livia-Ortiz\ -\strong{URL:} https://github.com/Diegolivia/ValCont/ +## Package Requirements + +- **R:** >= 2.10 +- **Imports:** boot, ggplot2, ggrepel, MASS, rlang, stats, utils +- **Encoding:** UTF-8 +- **LazyData:** true diff --git a/man/CID.Rd b/man/CID.Rd index 7be00b4..ac59489 100644 --- a/man/CID.Rd +++ b/man/CID.Rd @@ -112,9 +112,9 @@ Merino-Soto, C. (2018) Confidence interval for difference between coefficients o Merino-Soto, C. (2023). Coeficientes V de Aiken: diferencias en los juicios de validez de contenido. MHSalud, 20(1), 23-32. https://doi.org/10.15359/mhs.20-1.3 -Singer, J. (2010). Construction of confidence limits about effect measures: A general approach, by G. Y. Zou and A. Donner, Statistics in Medicine 2008; 27:1693-1702. Statistics in Medicine, 29(16), 1757–1759. https://doi.org/10.1002/sim.3887 +Singer, J. (2010). Construction of confidence limits about effect measures: A general approach, by G. Y. Zou and A. Donner, Statistics in Medicine 2008; 27:1693-1702. Statistics in Medicine, 29(16), 1757-1759. https://doi.org/10.1002/sim.3887 -Zou, G.Y. and Donner, A. (2008) Construction of confidence limits about effect measures: a general approach. Stat. Med. 27, 1693–1702. https://doi.org//10.1002/sim.3095 +Zou, G.Y. and Donner, A. (2008) Construction of confidence limits about effect measures: a general approach. Stat. Med. 27, 1693-1702. https://doi.org//10.1002/sim.3095 } \seealso{ \code{\link[ratesci:moverci]{ratesci::moverci}} diff --git a/man/CIDsingle.Rd b/man/CIDsingle.Rd index 77649bc..afbf6db 100644 --- a/man/CIDsingle.Rd +++ b/man/CIDsingle.Rd @@ -58,13 +58,13 @@ Aiken, L. R. (1980). Content validity and reliability of single items or questio Aiken, L. R. (1985). Three coefficients for analyzing the reliability and validity of ratings. Educational and Psychological Measurement, 45, 131-142. https://doi.org/10.1177/0013164485451012 -Merino-Soto, C. (2018) Confidence interval for difference between coefficients of content validity (Aiken's V): a SPSS syntax. Anales de Psicología, 34(3), 587-590. https://doi.org/10.6018/analesps.34.3.283481. +Merino-Soto, C. (2018) Confidence interval for difference between coefficients of content validity (Aiken's V): a SPSS syntax. Anales de Psicologia, 34(3), 587-590. https://doi.org/10.6018/analesps.34.3.283481. Merino-Soto, C. (2023). Coeficientes V de Aiken: diferencias en los juicios de validez de contenido. MHSalud, 20(1), 23-32. https://doi.org/10.15359/mhs.20-1.3 -Singer, J. (2010). Construction of confidence limits about effect measures: A general approach, by G. Y. Zou and A. Donner, Statistics in Medicine 2008; 27:1693-1702.Statistics in Medicine, 29(16), 1757–1759. https://doi.org/10.1002/sim.3887 +Singer, J. (2010). Construction of confidence limits about effect measures: A general approach, by G. Y. Zou and A. Donner, Statistics in Medicine 2008; 27:1693-1702.Statistics in Medicine, 29(16), 1757-1759. https://doi.org/10.1002/sim.3887 -Zou, G.Y. and Donner, A. (2008) Construction of confidence limits about effect measures: a general approach. Stat. Med. 27, 1693–1702. https://doi.org/10.1002/sim.3095 +Zou, G.Y. and Donner, A. (2008) Construction of confidence limits about effect measures: a general approach. Stat. Med. 27, 1693-1702. https://doi.org/10.1002/sim.3095 } \seealso{ \code{\link[ratesci:moverci]{ratesci::moverci}} for MOVER method of ratios diff --git a/man/CVIpub.Rd b/man/CVIpub.Rd index 4be4bad..26c5493 100644 --- a/man/CVIpub.Rd +++ b/man/CVIpub.Rd @@ -31,7 +31,7 @@ with optional correction for chance agreement based on Polit et al. (2007). When \code{correct = TRUE}, the function computes the adjusted coefficient \code{CVI.R} and applies the Wilson method to its absolute value. For computational stability, CVI values of exactly 1.0 or 0.0 are replaced by 0.9999 and 0.0001 respectively. -If an extreme negative value of CVI.R is detected (e.g., from CVI ≈ 0), the value is +If an extreme negative value of CVI.R is detected (e.g., from CVI ? 0), the value is truncated to 0 and the confidence interval is not estimated. } \examples{ diff --git a/man/CVR.Rd b/man/CVR.Rd index 6ca76a4..bb56231 100644 --- a/man/CVR.Rd +++ b/man/CVR.Rd @@ -38,7 +38,7 @@ CVR(data = CVRdata) } \references{ -Lawshe, C. H. (1975). A quantitative approach to content validity. Personnel psychology, 28, 563–575. https://doi.org/10.1111/j.1744-6570.1975.tb01393.x +Lawshe, C. H. (1975). A quantitative approach to content validity. Personnel psychology, 28, 563-575. https://doi.org/10.1111/j.1744-6570.1975.tb01393.x Martuza, V.R. (1977). Applying norm-referenced and criterion-referenced measurement in education. Boston: Allyn & Bacon } diff --git a/man/CVRcut.Ayres.Rd b/man/CVRcut.Ayres.Rd index 8584cdd..308bbfc 100644 --- a/man/CVRcut.Ayres.Rd +++ b/man/CVRcut.Ayres.Rd @@ -22,7 +22,7 @@ A data frame with numeric results and four columns: - "MinJudges": The minimum number of judges needed for the critical CVR. } \description{ -Calculates critical values for Lawshe’s content validity ratio (CVR) using the method +Calculates critical values for Lawshe's content validity ratio (CVR) using the method proposed by Ayres & Scally (2014), based on exact binomial probabilities. } \details{ @@ -52,9 +52,9 @@ CVRcut.Ayres(num_jueces = 45, alpha = .01) } \references{ -Ayres, C., & Scally, A. J. (2014). Critical values for Lawshe's content validity ratio. Measurement and Evaluation in Counseling and Development, 47, 79–86. https://doi.org/10.1177/0748175613513808 +Ayres, C., & Scally, A. J. (2014). Critical values for Lawshe's content validity ratio. Measurement and Evaluation in Counseling and Development, 47, 79-86. https://doi.org/10.1177/0748175613513808 -Lawshe, C. H. (1975). A quantitative approach to content validity. Personnel psychology, 28, 563–575. https://doi.org/10.1111/j.1744-6570.1975.tb01393.x +Lawshe, C. H. (1975). A quantitative approach to content validity. Personnel psychology, 28, 563-575. https://doi.org/10.1111/j.1744-6570.1975.tb01393.x } \seealso{ \code{\link[ValCont:CVR]{ValCont::CVR}} diff --git a/man/CVRcut.Rd b/man/CVRcut.Rd index 452ff7d..c83128b 100644 --- a/man/CVRcut.Rd +++ b/man/CVRcut.Rd @@ -48,13 +48,13 @@ CVRcut(N_min = 5, N_max = 15, method = "Wilson", alpha = 0.05, tails = "two") } \references{ -Lawshe, C. H. (1975). A quantitative approach to content validity. *Personnel Psychology*, 28(4), 563–575. https://doi.org/10.1111/j.1744-6570.1975.tb01393.x +Lawshe, C. H. (1975). A quantitative approach to content validity. *Personnel Psychology*, 28(4), 563-575. https://doi.org/10.1111/j.1744-6570.1975.tb01393.x -Ayre, C., & Scally, A. J. (2014). Critical Values for Lawshe’s Content Validity Ratio: Revisiting the Original Methods of Calculation. *Measurement and Evaluation in Counseling and Development*, 47(1), 79–86. https://doi.org/10.1177/0748175613513808 +Ayre, C., & Scally, A. J. (2014). Critical Values for Lawshe's Content Validity Ratio: Revisiting the Original Methods of Calculation. *Measurement and Evaluation in Counseling and Development*, 47(1), 79-86. https://doi.org/10.1177/0748175613513808 -Baghestani, A. R., Ahmadi, F., Tanha, A., & Meshkat, M. (2017). Bayesian Critical Values for Lawshe’s Content Validity Ratio. *Measurement and Evaluation in Counseling and Development*, 52(1), 69–73. https://doi.org/10.1080/07481756.2017.1308227 +Baghestani, A. R., Ahmadi, F., Tanha, A., & Meshkat, M. (2017). Bayesian Critical Values for Lawshe's Content Validity Ratio. *Measurement and Evaluation in Counseling and Development*, 52(1), 69-73. https://doi.org/10.1080/07481756.2017.1308227 -Wilson, F. R., Pan, W., & Schumsky, D. A. (2012). Recalculation of the Critical Values for Lawshe’s Content Validity Ratio. *Measurement and Evaluation in Counseling and Development*, 45(3), 197–210. https://doi.org/10.1177/0748175612440286 +Wilson, F. R., Pan, W., & Schumsky, D. A. (2012). Recalculation of the Critical Values for Lawshe's Content Validity Ratio. *Measurement and Evaluation in Counseling and Development*, 45(3), 197-210. https://doi.org/10.1177/0748175612440286 } \seealso{ [CVRcut.Wilson()], [CVRcut.Ayres()], [CVRcut.Bag()] diff --git a/man/CVplot.Rd b/man/CVplot.Rd index 6d1e567..86c5d53 100644 --- a/man/CVplot.Rd +++ b/man/CVplot.Rd @@ -85,7 +85,7 @@ lwr.ci = "lwr.ci", up.ci = "upr.ci") } \references{ -Hink, J. K., Wogalter, M. S., & Eustace, J. K. (1996). Display of Quantitative Information: Are Grables better than Plain Graphs or Tables? *Proceedings of the Human Factors and Ergonomics Society Annual Meeting*, 40(23), 1155–1159. https://doi.org/10.1177/154193129604002302 +Hink, J. K., Wogalter, M. S., & Eustace, J. K. (1996). Display of Quantitative Information: Are Grables better than Plain Graphs or Tables? *Proceedings of the Human Factors and Ergonomics Society Annual Meeting*, 40(23), 1155-1159. https://doi.org/10.1177/154193129604002302 Tufte, E. R. (2001). *The Visual Display of Quantitative Information*. Cheshire, CT: Graphics Press. diff --git a/man/D2.Rd b/man/D2.Rd index 73e2223..96b136c 100644 --- a/man/D2.Rd +++ b/man/D2.Rd @@ -91,10 +91,10 @@ D2(ratings1, ratings2, c = 7, CI = TRUE) } \references{ Aiken, L. R., & Aiken, T. A. (1986). Difference Tests for Distributions of Ratings. -Educational and Psychological Measurement, 46(4), 871–881. https://doi.org/10.1177/001316448604600407 +Educational and Psychological Measurement, 46(4), 871-881. https://doi.org/10.1177/001316448604600407 Rosenthal, R. (1991). Meta-analytic procedures for social research (revised). Sage: Newbury Park, CA. Bishara, A. J., & Hittner, J. B. (2017). Confidence intervals for correlations when data are not normal. -Behavior Research Methods, 49(1), 294–309. https://doi.org/10.3758/s13428-016-0702-8 +Behavior Research Methods, 49(1), 294-309. https://doi.org/10.3758/s13428-016-0702-8 } diff --git a/man/HTmult.Rd b/man/HTmult.Rd index 54a6a6c..955703e 100644 --- a/man/HTmult.Rd +++ b/man/HTmult.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/HT.R \name{HTmult} \alias{HTmult} -\title{Hinkin–Tracey Content Validity Indices for Multiple Items} +\title{Hinkin-Tracey Content Validity Indices for Multiple Items} \usage{ HTmult( data, @@ -18,7 +18,7 @@ HTmult( } \arguments{ \item{data}{A data frame or matrix in wide format, where each column -corresponds to one item–construct combination. Columns are expected +corresponds to one item-construct combination. Columns are expected to follow the pattern \code{"item.construct"}, e.g., \code{"item1.c1"}, \code{"item1.c2"}, \code{"item1.c3"}.} @@ -62,12 +62,12 @@ A list with three components: \code{item}, \code{target}, \code{nj}, and the construct means (\code{M.} columns).} \item{\code{Item.criteria}}{A data frame with one row per item, - containing the global Hinkin–Tracey indices: + containing the global Hinkin-Tracey indices: \code{item}, \code{htc}, \code{htc.lci}, \code{htc.uci}, \code{htd}, \code{htd.lci}, \code{htd.uci}. If \code{ci = FALSE}, the confidence interval columns are filled with \code{NA}.} \item{\code{Pairwise.criteria}}{A data frame in long format, with one - row per item–orbiting construct combination, containing: + row per item-orbiting construct combination, containing: \code{item}, \code{target}, \code{orbiting}, \code{htd}, \code{htd.lci}, \code{htd.uci}. If \code{ci = FALSE}, the confidence interval columns are filled with \code{NA}.} @@ -178,14 +178,14 @@ HTmult( } \references{ Hinkin, T. R., & Tracey, J. B. (1999). An analysis of variance approach -to content validation. \emph{Organizational Research Methods, 2}(2), 175–186. +to content validation. \emph{Organizational Research Methods, 2}(2), 175-186. Colquitt, J. A., Sabey, T. B., Rodell, J. B., & Hill, E. T. (2019). Content validation guidelines: Evaluation criteria for definitional correspondence and definitional distinctiveness. \emph{Journal of Applied -Psychology, 104}(10), 1243–1265. +Psychology, 104}(10), 1243-1265. Penfield, R. D., & Miller, J. M. (2004). Improving content validation studies using an asymmetric confidence interval for the mean of expert -ratings. \emph{Applied Measurement in Education, 17}(4), 359–370. +ratings. \emph{Applied Measurement in Education, 17}(4), 359-370. } diff --git a/man/Haiken.Rd b/man/Haiken.Rd index 63b8875..2652280 100644 --- a/man/Haiken.Rd +++ b/man/Haiken.Rd @@ -59,7 +59,7 @@ Aiken, L. R. (1980). Content validity and reliability of single items or questio Aiken, L. R. (1985). Three coefficients for analyzing the reliability and validity of ratings. Educational and Psychological Measurement, 45, 131-142. https://doi.org/10.1177/0013164485451012 -Penfield, R. D., & Miller, J. M. (2004). Improving Content Validation Studies Using an Asymmetric Confidence Interval for the Mean of Expert Ratings. Applied Measurement in Education, 17(4), 359–370. https://doi.org/10.1207/s15324818ame1704_2 +Penfield, R. D., & Miller, J. M. (2004). Improving Content Validation Studies Using an Asymmetric Confidence Interval for the Mean of Expert Ratings. Applied Measurement in Education, 17(4), 359-370. https://doi.org/10.1207/s15324818ame1704_2 Wilson, E. B. (1927). Probable inference, the law of succession, and statistical inference. Journal of the American Statistical Association, 22, 209-212. https://doi.org/10.2307/2276774 } diff --git a/man/LuAgree.Rd b/man/LuAgree.Rd index 93de0bb..1acd1f0 100644 --- a/man/LuAgree.Rd +++ b/man/LuAgree.Rd @@ -78,7 +78,7 @@ If \code{group} is \code{NULL}, returns an object of class \item \code{n_subjects} Number of subjects used in the analysis. \item \code{n_judges} Number of judges. \item \code{categories} The ordered rating categories used. - \item \code{p_empirical} Empirical category probabilities (información + \item \code{p_empirical} Empirical category probabilities (informacion auxiliar; no se imprime por defecto). \item \code{call} The matched function call. } diff --git a/man/MDScontent.Rd b/man/MDScontent.Rd index 032619b..c0c603d 100644 --- a/man/MDScontent.Rd +++ b/man/MDScontent.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/MDScontent.R \name{MDScontent} \alias{MDScontent} -\title{Multidimensional scaling (MDS) Map for Content Validity Ratings (Item–Trait Correspondence)} +\title{Multidimensional scaling (MDS) Map for Content Validity Ratings (Item-Trait Correspondence)} \usage{ MDScontent( data, @@ -23,7 +23,7 @@ MDScontent( ) } \arguments{ -\item{data}{Numeric `matrix` or `data.frame` of size J × (I*T): rows are judges; +\item{data}{Numeric `matrix` or `data.frame` of size J x (I*T): rows are judges; each column corresponds to a specific (item, trait) pair rating.} \item{item}{Vector of length `ncol(data)` indicating the **item id** for each column.} @@ -34,7 +34,7 @@ each column corresponds to a specific (item, trait) pair rating.} assignment for each item (used to define centroids). If `NULL`, items are assigned empirically to the trait with the largest profile score.} -\item{score}{Aggregation of judges into the Items × Traits profile matrix: +\item{score}{Aggregation of judges into the Items x Traits profile matrix: `"mean"` (default), `"median"`, or `"p_ge"` (proportion of ratings >= `cut`).} \item{cut}{Integer threshold for `score = "p_ge"`. Default is 4.} @@ -51,7 +51,7 @@ empirically to the trait with the largest profile score.} \item{display}{Plot type: `"items"` (main map), `"biplot"`, or `"both"`.} -\item{Dmatrix}{Logical; if `TRUE`, returns the item–trait distance matrix Δ (I × T).} +\item{Dmatrix}{Logical; if `TRUE`, returns the item-trait distance matrix x (I x T).} \item{label.items}{Logical; label items in plot(s). Default `TRUE`.} @@ -63,28 +63,28 @@ empirically to the trait with the largest profile score.} \value{ A list with elements: \describe{ - \item{profile}{Items × Traits matrix used to build distances.} + \item{profile}{Items x Traits matrix used to build distances.} \item{dist_items}{`dist` object of item-to-item dissimilarities.} \item{coords_items}{data.frame of MDS coordinates for items.} \item{centroids}{data.frame of centroid coordinates for traits and centroid type.} \item{fit}{list with `mds`, `k`, `stress` (if nonmetric), and `gof` (R^2 of distances).} - \item{Dmatrix}{(Optional) matrix Δ of item–trait distances in MDS space.} + \item{Dmatrix}{(Optional) matrix x of item-trait distances in MDS space.} } } \description{ `MDScontent()` builds a **conceptual map** (MDS) from judges' ratings of the correspondence between each item and each trait (attribute). The function: -(1) aggregates judges' ratings into an **Items × Traits** profile matrix, +(1) aggregates judges' ratings into an **Items x Traits** profile matrix, (2) computes **item-to-item dissimilarities** (default: Euclidean), (3) obtains a **2D MDS configuration** (default: non-metric, with STRESS), (4) computes **trait centroids** in the MDS space (theoretical via `key`, or empirical), -(5) optionally returns an **item–trait distance matrix** (`Dmatrix = TRUE`), +(5) optionally returns an **item-trait distance matrix** (`Dmatrix = TRUE`), and (6) plots either the main map, a biplot, or both. } \details{ ## Conceptual rationale The function provides a **geometric visualization** of content validity structure. -Ratings from judges are first aggregated into an Items × Traits profile matrix. +Ratings from judges are first aggregated into an Items x Traits profile matrix. Item-to-item dissimilarities are computed (default: Euclidean distance), and a multidimensional scaling (MDS) solution is obtained (default: non-metric). @@ -125,56 +125,51 @@ Therefore, `MDScontent()` should be interpreted as a structural visualization to that complements coefficient-based evidence. } \examples{ -## Example 1 -# This simulated data has the following structure: 12 judges evaluated the fit of 6 -# items in 4 attributes. That is: 12 judges × 6 items × 4 traits matrix. In the administration -# of the validity survey, the items were presented in 12 rows, and each item -# was evaluated for its correspondence to four attributes. The database should -# be structured as follows: -# -# item item1.judge1 item1.judge2 item1.judge3 item1.judge4 item2.judge1 item2.judge2 ... -# -# For this example: - -# Item1 (Fit to Trait 1) -# Item2 (Fit to Trait 1) -# Item3 (Fit to Trait 2) -# Item4 (Fit to Trait 2) -# Item5 (Approximate fit to Trait 3) -# Item6 (Approximate fit to Trait 4) -# -# Example2 <- matrix(c( -# 5,2,2,1, 5,1,2,1, 2,5,1,2, 1,5,2,1, 2,1,5,2, 1,2,2,5, -# 5,1,2,2, 4,2,1,1, 1,5,2,1, 2,5,1,1, 1,2,5,2, 2,1,1,5, -# 4,2,1,1, 5,1,2,1, 2,4,1,2, 1,5,2,2, 2,1,5,1, 1,2,2,5, -# 5,1,2,1, 5,2,1,1, 1,5,2,1, 2,4,1,2, 1,2,5,2, 2,1,1,5, -# 4,2,1,2, 5,1,2,1, 2,5,1,1, 1,5,2,1, 2,1,4,2, 1,2,2,4, -# 5,1,2,1, 4,2,1,2, 1,5,2,1, 2,5,1,1, 1,2,5,1, 2,1,2,5, -# 5,2,1,1, 5,1,2,1, 2,4,1,2, 1,5,2,1, 2,1,5,2, 1,2,1,5, -# 4,1,2,1, 5,2,1,1, 1,5,2,2, 2,4,1,1, 1,2,5,1, 2,1,2,5, -# 5,2,1,1, 4,1,2,2, 2,5,1,1, 1,5,2,1, 2,1,5,2, 1,2,1,5, -# 5,1,2,2, 5,2,1,1, 1,5,2,1, 2,5,1,2, 1,2,5,1, 2,1,2,5, -# 4,2,1,1, 5,1,2,1, 2,4,1,2, 1,5,2,1, 2,1,4,2, 1,2,1,5, -# 5,1,2,1, 4,2,1,1, 1,5,2,1, 2,4,1,2, 1,2,5,1, 2,1,2,5), -# nrow = 12, -# byrow = TRUE) - -## Short cut for grouping items -rep(1:6, each = 4) - -## Short cut for grouping traits -#'rep(1:4, times = 6) - -## theorethical correspondence -c(1,1,2,2,3,4) - -MDScontent(data = dat2, -item = rep(1:6, each = 4), -trait = rep(1:4, times = 6), -key = key <- c(1,1,2,2,3,4), -score = "mean", -distance = "euclid", -mds = "nonmetric", -display = "items") +# This simulated data has the following structure: 12 judges evaluated the fit +# of 6 items on 4 traits. The data therefore contain 12 rows and 24 columns, +# with four columns for each item, one column per trait. + +# In the validity survey, the items were presented in 12 rows, and each item +# was evaluated for its correspondence to the four traits. The columns follow +# this pattern: + +# item item1.trait1 item1.trait2 item1.trait3 item1.trait4 item2.trait1 ... + +# The theoretical correspondence used below is: + +# Item 1 -> Trait 1 +# Item 2 -> Trait 1 +# Item 3 -> Trait 2 +# Item 4 -> Trait 2 +# Item 5 -> Trait 3 +# Item 6 -> Trait 4 + +dat2 <- matrix(c( + 5,2,2,1, 5,1,2,1, 2,5,1,2, 1,5,2,1, 2,1,5,2, 1,2,2,5, + 5,1,2,2, 4,2,1,1, 1,5,2,1, 2,5,1,1, 1,2,5,2, 2,1,1,5, + 4,2,1,1, 5,1,2,1, 2,4,1,2, 1,5,2,2, 2,1,5,1, 1,2,2,5, + 5,1,2,1, 5,2,1,1, 1,5,2,1, 2,4,1,2, 1,2,5,2, 2,1,1,5, + 4,2,1,2, 5,1,2,1, 2,5,1,1, 1,5,2,1, 2,1,4,2, 1,2,2,4, + 5,1,2,1, 4,2,1,2, 1,5,2,1, 2,5,1,1, 1,2,5,1, 2,1,2,5, + 5,2,1,1, 5,1,2,1, 2,4,1,2, 1,5,2,1, 2,1,5,2, 1,2,1,5, + 4,1,2,1, 5,2,1,1, 1,5,2,2, 2,4,1,1, 1,2,5,1, 2,1,2,5, + 5,2,1,1, 4,1,2,2, 2,5,1,1, 1,5,2,1, 2,1,5,2, 1,2,1,5, + 5,1,2,2, 5,2,1,1, 1,5,2,1, 2,5,1,2, 1,2,5,1, 2,1,2,5, + 4,2,1,1, 5,1,2,1, 2,4,1,2, 1,5,2,1, 2,1,4,2, 1,2,1,5, + 5,1,2,1, 4,2,1,1, 1,5,2,1, 2,4,1,2, 1,2,5,1, 2,1,2,5), + nrow = 12, + byrow = TRUE +) +key <- c(1, 1, 2, 2, 3, 4) +MDScontent( + data = dat2, + item = rep(1:6, each = 4), + trait = rep(1:4, times = 6), + key = key, + score = "mean", + distance = "euclid", + mds = "nonmetric", + display = "items" +) } diff --git a/man/MER.Rd b/man/MER.Rd index bb62f20..0a569b9 100644 --- a/man/MER.Rd +++ b/man/MER.Rd @@ -67,9 +67,9 @@ Miller, J. M., & Penfield, R. D. (2005). Using the score method to construct asy Penfield, R. D. (2003). A score method of constructing asymmetric confidence intervals for the mean of a rating scale item. Psychological methods, 8(2), 149-163. https://doi.org/10.1037/1082-989x.8.2.149 -Penfield, R. D. & Giacobbi, P. R., Jr. (2004) Applying a score confidence interval to Aiken’s item content-relevance index. Measurement in Physical Education and Exercise Science, 8(4), 213-225. https://doi.org/10.1207/s15327841mpee0804_3 +Penfield, R. D. & Giacobbi, P. R., Jr. (2004) Applying a score confidence interval to Aiken's item content-relevance index. Measurement in Physical Education and Exercise Science, 8(4), 213-225. https://doi.org/10.1207/s15327841mpee0804_3 -Penfield, R. D., & Miller, J. M. (2004). Improving Content Validation Studies Using an Asymmetric Confidence Interval for the Mean of Expert Ratings. Applied Measurement in Education, 17(4), 359–370. https://doi.org/10.1207/s15324818ame1704_2 +Penfield, R. D., & Miller, J. M. (2004). Improving Content Validation Studies Using an Asymmetric Confidence Interval for the Mean of Expert Ratings. Applied Measurement in Education, 17(4), 359-370. https://doi.org/10.1207/s15324818ame1704_2 Wilson, E. B. (1927). Probable inference, the law of succession, and statistical inference. Journal of the American Statistical Association, 22, 209-212. https://doi.org/10.2307/2276774 } diff --git a/man/MERpub.Rd b/man/MERpub.Rd index bf759a0..cb516e8 100644 --- a/man/MERpub.Rd +++ b/man/MERpub.Rd @@ -40,21 +40,21 @@ meta-analytic purposes or secondary analyses of content validity studies. The score confidence interval does not require the standard deviation of the ratings; it derives the standard error from the mean and the number of raters, -assuming the data follow a bounded binomial‑like distribution. This approach +assuming the data follow a bounded binomial-like distribution. This approach is more appropriate for content validity ratings, which typically involve small numbers of experts (often < 10) and few response categories. For an item with mean M and n raters, the interval is computed as: \itemize{ \item Compute p = M/k if start = 0, or p = (M-1)/k if start = 1, where k = ncat - 1. - \item Obtain π_L and π_U via Wilson score limits for the proportion p. - \item Compute LCL = M - z * sqrt(k * π_L * (1 - π_L) / n) - \item Compute UCL = M + z * sqrt(k * π_U * (1 - π_U) / n) + \item Obtain ?_L and ?_U via Wilson score limits for the proportion p. + \item Compute LCL = M - z * sqrt(k * ?_L * (1 - ?_L) / n) + \item Compute UCL = M + z * sqrt(k * ?_U * (1 - ?_U) / n) } The resulting limits are truncated to the possible scale range [start, start + ncat - 1]. } \examples{ -\dontest{ +\donttest{ # Example with vectors directly medias <- c(4.2, 3.8, 4.5) ns <- c(8, 10, 7) @@ -74,21 +74,21 @@ MERpub(M = df$mean, n = df$raters, ncat = 5, start = 1) \references{ Penfield, R. D. (2003). A score method of constructing asymmetric confidence intervals for the mean of a rating scale item. Psychological Methods, 8(2), 149-163. -\url{https://doi.org/10.1037/1082-989x.8.2.149} +\doi{10.1037/1082-989x.8.2.149} Penfield, R. D., & Miller, J. M. (2004). Improving content validation studies using an asymmetric confidence interval for the mean of expert ratings. -Applied Measurement in Education, 17(4), 359–370. -\url{https://doi.org/10.1207/s15324818ame1704_2} +Applied Measurement in Education, 17(4), 359-370. +\doi{10.1207/s15324818ame1704_2} Miller, J. M., & Penfield, R. D. (2005). Using the score method to construct asymmetric confidence intervals: An SAS program for content validation in scale development. Behavior Research Methods, 37, 450-452. -\url{https://doi.org/10.3758/BF03192713} +\doi{10.3758/BF03192713} Wilson, E. B. (1927). Probable inference, the law of succession, and statistical inference. Journal of the American Statistical Association, 22, 209-212. -\url{https://doi.org/10.2307/2276774} +\doi{10.2307/2276774} } \seealso{ \code{\link{MER}} for the version that works with raw ratings (dataframe of judges). diff --git a/man/SVALmult.Rd b/man/SVALmult.Rd index dce5eb9..fe4554a 100644 --- a/man/SVALmult.Rd +++ b/man/SVALmult.Rd @@ -40,8 +40,8 @@ A named list where each element corresponds to one of the analyzed items. Each e } \description{ For a data frame of items, this function calculates two substantive validity -coefficients—\code{psa} (proportion of substantive agreement) and \code{svc} -(substantive validity coefficient; Anderson & Gerbing, 1991)—along with asymmetric +coefficients-\code{psa} (proportion of substantive agreement) and \code{svc} +(substantive validity coefficient; Anderson & Gerbing, 1991)-along with asymmetric confidence intervals using the Wilson method. } \details{ @@ -74,15 +74,15 @@ SVALmult(data = data.gais, columns = c(1,2,3), conf.level = .90) } \references{ -Anderson, J. C., & Gerbing, D. W. (1991). Predicting the performance of measures in a confirmatory factor analysis with a pretest assessment of their substantive validities. \emph{Journal of Applied Psychology, 76}(5), 732–740. https://doi.org/10.1037/0021-9010.76.5.732 +Anderson, J. C., & Gerbing, D. W. (1991). Predicting the performance of measures in a confirmatory factor analysis with a pretest assessment of their substantive validities. \emph{Journal of Applied Psychology, 76}(5), 732-740. https://doi.org/10.1037/0021-9010.76.5.732 -Cabedo-Peris, J., Merino-Soto, C., Chans, G.M., & Marti-Vilar, M. (2024). Exploring the Loss Aversion Scale’s psychometric properties in Spain. \emph{Scientific Reports, 14}, 15756. https://doi.org/10.1038/s41598-024-66695-6 +Cabedo-Peris, J., Merino-Soto, C., Chans, G.M., & Marti-Vilar, M. (2024). Exploring the Loss Aversion Scale's psychometric properties in Spain. \emph{Scientific Reports, 14}, 15756. https://doi.org/10.1038/s41598-024-66695-6 -Merino-Soto, C., Calderón-De la Cruz, G., Gil-Monte, P., & Juárez-García, A. (2021). Substantive validity within the framework of content validity: Application in the Workload Scale. \emph{Revista Argentina de Ciencias del Comportamiento, 13}(1), 81–92. \url{https://revistas.unc.edu.ar/index.php/racc/article/view/20547/33426} +Merino-Soto, C., Calderon-De la Cruz, G., Gil-Monte, P., & Juarez-Garcia, A. (2021). Substantive validity within the framework of content validity: Application in the Workload Scale. \emph{Revista Argentina de Ciencias del Comportamiento, 13}(1), 81-92. \url{https://revistas.unc.edu.ar/index.php/racc/article/view/20547/33426} -Penfield, R. D., & Giacobbi, P. R. Jr. (2004). Applying a score confidence interval to Aiken’s item content-relevance index. \emph{Measurement in Physical Education and Exercise Science, 8}(4), 213–225. https://doi.org/10.1207/s15327841mpee0804_3 +Penfield, R. D., & Giacobbi, P. R. Jr. (2004). Applying a score confidence interval to Aiken's item content-relevance index. \emph{Measurement in Physical Education and Exercise Science, 8}(4), 213-225. https://doi.org/10.1207/s15327841mpee0804_3 -Wilson, E. B. (1927). Probable inference, the law of succession, and statistical inference. \emph{Journal of the American Statistical Association, 22}, 209–212. https://doi.org/10.2307/2276774 +Wilson, E. B. (1927). Probable inference, the law of succession, and statistical inference. \emph{Journal of the American Statistical Association, 22}, 209-212. https://doi.org/10.2307/2276774 } \seealso{ \code{\link[PropCIs:scoreci]{PropCIs::scoreci}} for score-based confidence intervals. \cr @@ -90,5 +90,5 @@ Wilson, E. B. (1927). Probable inference, the law of succession, and statistical \code{\link[ValCont:SVALplot]{SVALplot}} for visualizing the results of SVALmult. } \author{ -César Merino-Soto (\email{sikayax@yahoo.com.ar}) +Cesar Merino-Soto (\email{sikayax@yahoo.com.ar}) } diff --git a/man/SVALplot.Rd b/man/SVALplot.Rd index a623f3d..d25e71c 100644 --- a/man/SVALplot.Rd +++ b/man/SVALplot.Rd @@ -42,5 +42,5 @@ SVALplot(results, item = "gais3", type = "psa", labels = c("Anger", "Fear", "Joy \code{\link[ValCont:SVALsingle]{ValCont::SVALsingle}} for single-item analysis. } \author{ -César Merino-Soto (\email{sikayax@yahoo.com.ar}) +Cesar Merino-Soto (\email{sikayax@yahoo.com.ar}) } diff --git a/man/SVALsingle.Rd b/man/SVALsingle.Rd index 71cd9f1..e42f382 100644 --- a/man/SVALsingle.Rd +++ b/man/SVALsingle.Rd @@ -45,18 +45,18 @@ SVALsingle(item = gais$gais2, conf.level = 0.95) \references{ Anderson, J. C., & Gerbing, D. W. (1991). Predicting the performance of measures in a confirmatory factor analysis with a pretest assessment of their substantive -validities. *Journal of Applied Psychology*, 76(5), 732–740. https://doi.org/10.1037/0021-9010.76.5.732 +validities. *Journal of Applied Psychology*, 76(5), 732-740. https://doi.org/10.1037/0021-9010.76.5.732 Cabedo-Peris, J., Merino-Soto, C., Chans, G.M., & Marti-Vilar, M. (2024). - Exploring the Loss Aversion Scale’s psychometric properties in Spain. + Exploring the Loss Aversion Scale's psychometric properties in Spain. *Scientific Reports*, 14, 15756. https://doi.org/10.1038/s41598-024-66695-6 Penfield, R. D., & Giacobbi, P. R., Jr. (2004). Applying a score confidence interval -to Aiken’s item content-relevance index. *Measurement in Physical Education and -Exercise Science*, 8(4), 213–225. https://doi.org/10.1207/s15327841mpee0804_3 +to Aiken's item content-relevance index. *Measurement in Physical Education and +Exercise Science*, 8(4), 213-225. https://doi.org/10.1207/s15327841mpee0804_3 Wilson, E. B. (1927). Probable inference, the law of succession, and statistical -inference. *Journal of the American Statistical Association*, 22, 209–212. +inference. *Journal of the American Statistical Association*, 22, 209-212. https://doi.org/10.2307/2276774 } \seealso{ diff --git a/man/Vaiken.Rd b/man/Vaiken.Rd index bbcb47b..a471908 100644 --- a/man/Vaiken.Rd +++ b/man/Vaiken.Rd @@ -49,7 +49,7 @@ Aiken, L. R. (1985). Three coefficients for analyzing the reliability and validi Merino, C., & Livia, J. (2009). Intervalos de confianza asimetricos para el indice de validez de contenido: un programa Visual Basic para la V de Aiken. Anales de Psicologia, 25(1), 169-171. https://revistas.um.es/analesps/article/view/71631 -Penfield, R. D. & Giacobbi, P. R., Jr. (2004) Applying a score confidence interval to Aiken’s item content-relevance index. Measurement in Physical Education and Exercise Science, 8(4), 213-225. https://doi.org/10.1207/s15327841mpee0804_3 +Penfield, R. D. & Giacobbi, P. R., Jr. (2004) Applying a score confidence interval to Aiken's item content-relevance index. Measurement in Physical Education and Exercise Science, 8(4), 213-225. https://doi.org/10.1207/s15327841mpee0804_3 Wilson, E. B. (1927). Probable inference, the law of succession, and statistical inference. Journal of the American Statistical Association, 22, 209-212. https://doi.org/10.2307/2276774 } diff --git a/man/Vaikenpub.Rd b/man/Vaikenpub.Rd index fac014a..37d9059 100644 --- a/man/Vaikenpub.Rd +++ b/man/Vaikenpub.Rd @@ -39,9 +39,9 @@ Vaikenpub( } \references{ -Penfield, R. D., & Giacobbi, P. R., Jr. (2004). Applying a score confidence interval to Aiken’s item content-relevance index. -\emph{Measurement in Physical Education and Exercise Science, 8}(4), 213–225. +Penfield, R. D., & Giacobbi, P. R., Jr. (2004). Applying a score confidence interval to Aiken's item content-relevance index. +\emph{Measurement in Physical Education and Exercise Science, 8}(4), 213-225. Wilson, E. B. (1927). Probable inference, the law of succession, and statistical inference. -\emph{Journal of the American Statistical Association, 22}, 209–212. +\emph{Journal of the American Statistical Association, 22}, 209-212. } diff --git a/man/ValCont-package.Rd b/man/ValCont-package.Rd index 833ae12..194ea50 100644 --- a/man/ValCont-package.Rd +++ b/man/ValCont-package.Rd @@ -6,7 +6,7 @@ \alias{ValCont-package} \title{ValCont: Content Validation Using Vaiken and Other Functions} \description{ -Provides functions for content validity studies, including the computation of several coefficients using data obtained from selected participants such as expert judges or experiential judges. +Provides tools for content validity studies, including functions to calculate content validity coefficients from ratings by expert or experiential judges. It implements CVC(), CVI(), CVIR(), CVR(), and Vaiken() together with asymmetric confidence intervals for bounded coefficients and methods for comparing independent coefficients. The methods are based on Aiken (1980, 1985) \doi{10.1177/001316448004000419}, Wilson (1927) \doi{10.2307/2276774}, and Merino-Soto (2018) \doi{10.6018/analesps.34.3.283481}. } \seealso{ Useful links: @@ -17,13 +17,13 @@ Useful links: } \author{ -\strong{Maintainer}: Diego Livia Ortiz \email{diegolivia@hotmail.com} [contributor, reviewer] +\strong{Maintainer}: Diego Livia Ortiz \email{diegolivia@hotmail.com} (\href{https://orcid.org/0000-0002-2107-3140}{ORCID}) [contributor, reviewer] Authors: \itemize{ - \item Diego Livia Ortiz \email{diegolivia@hotmail.com} [contributor, reviewer] - \item Cesar Merino-Soto \email{sikayax@yahoo.com.ar} [contributor, reviewer] - \item Jose Livia Segovia \email{joselivia@gmail.com} [contributor] + \item Diego Livia Ortiz \email{diegolivia@hotmail.com} (\href{https://orcid.org/0000-0002-2107-3140}{ORCID}) [contributor, reviewer] + \item Cesar Merino-Soto \email{sikayax@yahoo.com.ar} (\href{https://orcid.org/0000-0001-8049-7069}{ORCID}) [contributor, reviewer] + \item Jose Livia Segovia \email{joselivia@gmail.com} (\href{https://orcid.org/0000-0003-2226-3349}{ORCID}) [contributor] } } diff --git a/tests/testthat/test-CVplot.R b/tests/testthat/test-CVplot.R index a6ffdfa..c5c7531 100644 --- a/tests/testthat/test-CVplot.R +++ b/tests/testthat/test-CVplot.R @@ -1,3 +1,4 @@ +library(ValCont) # Create sample data mimicking CVI output test_that("CVplot function works correctly", { @@ -17,22 +18,4 @@ test_that("CVplot function works correctly", { # Test output expect_s3_class(plot, "ggplot") expect_s3_class(plot, c("gg", "ggplot")) -}) - - - - - - - - - - - - - - - - - - +}) \ No newline at end of file