diff --git a/DESCRIPTION b/DESCRIPTION index 8a1c89c..293006c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -17,11 +17,16 @@ Authors@R: c(person("Tomasz", "Zoltak", Maintainer: Tomasz Zoltak Description: Package allows to generate simulated datasets using algorithms that mimic different response styles to survey questions using: 1) IRTree - approach, 2) (G)PCM (and rating scale version of a partial credit model) - approach, 3) user provided function that (with some probability) chooses - response using information about previous responses. This allows to cover - wide range of potential response styles like: extreme and middle (ERS, MRS), - acquiesce (ARS) and also careless/inattentive responding (CR, IR). + approach (Bockenholt (2012) , + (2017) ), 2) (G)PCM (and rating scale version of + a partial credit model) random-thresholds approach (Falk & Cai (2016) + ; Henninger & Meiser (2020a) + , (2020b) ; Plieninger + (2017) ), 3) user provided function that (with + some probability) chooses response using information about previous + responses. This allows to cover wide range of potential response styles + like: extreme and middle (ERS, MRS), acquiesce (ARS) and also + careless/inattentive responding (CR, IR). License: MIT + file LICENSE Depends: R (>= 4.0.0) Suggests: diff --git a/R/log_normal_pars.R b/R/log_normal_pars.R index 8bd76eb..1a7d2cc 100644 --- a/R/log_normal_pars.R +++ b/R/log_normal_pars.R @@ -8,6 +8,10 @@ #' @param sdlog standard deviation of the distribution on the log scale #' @param m mean (expected value) of the distribution on the exponential scale #' @param sd standard deviation of the distribution on the exponential scale +#' @return \code{lnorm_mean()} and \code{lnorm_sd()} return numeric vectors; +#' \code{find_pars_lnorm()} returns named numeric vector with elements named +#' \emph{meanlog} describing means and elements named \emph{sdlog} describing +#' standard deviations. #' @examples #' # actual expected value of the log-normal distribution with the log scale #' # parameters of 3 and 1.5 respectively diff --git a/cran-comments.md b/cran-comments.md index 95a03c0..e653709 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,4 +1,16 @@ -There was 1 NOTE: +# Resubmission + +This is a resubmission. In this version I have: + +- Added references to the documents describing the methods that are used in the package in the DESCRIPTION file. + +- Added missing \value to log-normal.Rd. + +- Removed `rm(list = ls())` usage from tests. + +# NOTES + +There is 1 NOTE: Possibly mis-spelled words in DESCRIPTION: ARS (25:16) diff --git a/man/log-normal.Rd b/man/log-normal.Rd index e9229ca..db16f46 100644 --- a/man/log-normal.Rd +++ b/man/log-normal.Rd @@ -21,6 +21,12 @@ find_pars_lnorm(m, sd) \item{sd}{standard deviation of the distribution on the exponential scale} } +\value{ +\code{lnorm_mean()} and \code{lnorm_sd()} return numeric vectors; +\code{find_pars_lnorm()} returns named numeric vector with elements named +\emph{meanlog} describing means and elements named \emph{sdlog} describing +standard deviations. +} \description{ Functions return parameters of a log-normal distribution on the exponentiated scale (\code{lnorm_mean}, \code{lnorm_sd}) or values of diff --git a/tests/testthat/test_expand_responses.R b/tests/testthat/test_expand_responses.R index 49b110f..7191dbb 100644 --- a/tests/testthat/test_expand_responses.R +++ b/tests/testthat/test_expand_responses.R @@ -15,4 +15,3 @@ test_that("", { paste0("e_", colnames(responses))))) expect_identical(respExp, pattern) }) -rm(list = ls()) diff --git a/tests/testthat/test_sequential_mae5.R b/tests/testthat/test_sequential_mae5.R index 8ad7216..c780809 100644 --- a/tests/testthat/test_sequential_mae5.R +++ b/tests/testthat/test_sequential_mae5.R @@ -56,5 +56,3 @@ test_that("Item parameters of sequential M, A, E RS (with 5-point scale) recover # dm = mean((intercepts[, 1] - estItemPars[, 4])^2), # da = mean((intercepts[, 2] - estItemPars[, 5])^2), # de = mean((intercepts[, 3] - estItemPars[, 6])^2)), 3) - -rm(list = ls()) diff --git a/tests/testthat/test_sequential_mae6.R b/tests/testthat/test_sequential_mae6.R index 64b91ad..00e8cfc 100644 --- a/tests/testthat/test_sequential_mae6.R +++ b/tests/testthat/test_sequential_mae6.R @@ -63,5 +63,3 @@ test_that("Item parameters of sequential M, A, E RS (with 6-point scale) recover # da1 = mean((intercepts[, 2] - estItemPars[, 6])^2), # da2 = mean((intercepts[, 3] - estItemPars[, 7])^2), # de = mean((intercepts[, 4] - estItemPars[, 8])^2)), 3) - -rm(list = ls()) diff --git a/tests/testthat/test_simultaneous_aem.R b/tests/testthat/test_simultaneous_aem.R index e9cd8ad..a17dd74 100644 --- a/tests/testthat/test_simultaneous_aem.R +++ b/tests/testthat/test_simultaneous_aem.R @@ -35,6 +35,7 @@ mSml <- suppressMessages(mirt(resp, gpcm_mats = lapply(1:ncol(resp), function(x) sM), method = "EM", TOL = 0.1, verbose = FALSE)) estItemPars <- coef(mSml, simplify = TRUE)$items +intercepts <- intercepts[, -1] test_that("Item parameters of simultaneous A, E, M RS (with 5-point scale) recovers in estimation with reasonable MSEs.", { expect_lt(mean((slopes[, 1] - estItemPars[, 1])^2), 0.2) expect_lt(mean((slopes[, 2] - estItemPars[, 2])^2), 0.02) @@ -62,5 +63,3 @@ test_that("Item parameters of simultaneous A, E, M RS (with 5-point scale) recov # d2 = mean((intercepts[, 2] - estItemPars[, 27])^2), # d3 = mean((intercepts[, 3] - estItemPars[, 28])^2), # d4 = mean((intercepts[, 4] - estItemPars[, 29])^2)), 3) - -rm(list = ls())