Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Authors@R: c(
)
Author: Cesar Merino-Soto [aut, ctb, rev] (ORCID: <https://orcid.org/0000-0001-8049-7069>), Jose Livia Segovia [aut, ctb] (ORCID: <https://orcid.org/0000-0003-2226-3349>), Diego Livia Ortiz [aut, cre, ctb, rev] (ORCID: <https://orcid.org/0000-0002-2107-3140>)
Maintainer: Diego Livia Ortiz <diegolivia@hotmail.com>
Description: 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>.
Description: 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>.
License: GPL (>= 3)
URL: https://github.com/Diegolivia/ValCont
BugReports: https://github.com/Diegolivia/ValCont/issues
Expand Down
2 changes: 1 addition & 1 deletion R/CIR.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
#' Reference Online}. doi:10.1002/9781118445112.stat08085
#'
#' @examples
#' \dontrun{
#' \donttest{
#' # Suppose 'group1' and 'group2' contain columns 'est', 'low', and 'high'
#' res <- CIR(group1, group2, coef.col = "est", lwr.col = "low", upr.col = "high")
#' print(res)
Expand Down
18 changes: 13 additions & 5 deletions R/HAiken.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,19 @@
#' \emph{Educational and Psychological Measurement, 45}, 131-142.
#'
#' @examples
#' \dontrun{
#' # Sample data: 8 items, 18 judges, ratings 1-4
#' datos <- data.frame(t(file1[, c("claA6", "claA18", "claA2", "claA16",
#' "claA4", "claA12", "claA9", "claA21")]))
#' Haiken(datos, ncat = 4, conf.level = .90, overall = TRUE, B = 1000, ci.type = "logit")
#' \donttest{
#' set.seed(123)
#' datos <- data.frame(
#' item1 = sample(1:4, 8, replace = TRUE),
#' item2 = sample(1:4, 8, replace = TRUE),
#' item3 = sample(1:4, 8, replace = TRUE),
#' item4 = sample(1:4, 8, replace = TRUE),
#' item5 = sample(1:4, 8, replace = TRUE),
#' item6 = sample(1:4, 8, replace = TRUE),
#' item7 = sample(1:4, 8, replace = TRUE),
#' item8 = sample(1:4, 8, replace = TRUE)
#' )
#' Haiken(datos, ncat = 4, conf.level = .90, overall = TRUE, B = 200, ci.type = "logit")
#' }
#'
#' @export
Expand Down
9 changes: 5 additions & 4 deletions R/HT.R
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@
#' ratings. \emph{Applied Measurement in Education, 17}(4), 359-370.
#'
#' @examples
#' \dontrun{
#' \donttest{
#' ## Example structure (toy data)
#' set.seed(123)
#' HTmult.data <- data.frame(
#' dat <- data.frame(
#' item1.c1 = sample(1:5, 50, replace = TRUE),
#' item1.c2 = sample(1:5, 50, replace = TRUE),
#' item1.c3 = sample(1:5, 50, replace = TRUE),
Expand All @@ -153,14 +153,15 @@
#' item2.c3 = sample(1:5, 50, replace = TRUE)
#' )
#'
#'HTmult(
#' HTmult(
#' data = dat,
#' items = c("item1", "item2"),
#' constructs = c("c1", "c2", "c3"),
#' key = c(item1 = "c2", item2 = "c3"),
#' anchors = 5,
#' ci = TRUE,
#' conf.level = 0.95)
#' conf.level = 0.95
#' )
#' }
#'
#' @export
Expand Down
53 changes: 20 additions & 33 deletions R/MDScontent.R
Original file line number Diff line number Diff line change
Expand Up @@ -95,39 +95,19 @@
#'
#' @importFrom rlang .data
#' @examples
#' # 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,
#' \donttest{
#' # A small toy example with 6 items judged on 4 traits.
#' set.seed(123)
#' 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,
#' 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
#' ),
#' nrow = 6,
#' byrow = TRUE
#' )
#' key <- c(1, 1, 2, 2, 3, 4)
Expand All @@ -141,6 +121,7 @@
#' mds = "nonmetric",
#' display = "items"
#' )
#' }
#'
#' @export
MDScontent <- function(
Expand Down Expand Up @@ -413,6 +394,12 @@ MDScontent <- function(
ifelse(mds == "nonmetric", paste0(" | STRESS: ", signif(stress, 3)), ""))
)

if ((display == "items" || display == "both") && isTRUE(label.items)) {
if (!requireNamespace("ggrepel", quietly = TRUE)) {
stop("Package 'ggrepel' is required for label.items = TRUE. Install it with install.packages('ggrepel').")
}
}

if (display == "items" || display == "both") {
if (!is.null(hull_data)) {
p <- p + ggplot2::geom_polygon(data = hull_data,
Expand Down
2 changes: 1 addition & 1 deletion R/SVALplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#'\code{\link[ValCont:SVALsingle]{ValCont::SVALsingle}} for single-item analysis.
#'
#' @examples
#' \dontrun{
#' \donttest{
#' results <- SVALmult(data = data.gais, columns = c("gais2", "gais3"))
#' SVALplot(results, item = "gais3", type = "svc", target = 4)
#' SVALplot(results, item = "gais3", type = "psa", labels = c("Anger", "Fear", "Joy", "Sadness"))}
Expand Down
2 changes: 1 addition & 1 deletion man/CIR.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions man/HTmult.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 13 additions & 5 deletions man/Haiken.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 14 additions & 33 deletions man/MDScontent.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/SVALplot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/ValCont-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading