From 4c627e9dba906847978877e898b8edadcdb5f252 Mon Sep 17 00:00:00 2001 From: AnestisTouloumis Date: Thu, 25 Jul 2019 14:02:07 +0100 Subject: [PATCH] preparing for release --- DESCRIPTION | 2 +- R/rbin.R | 3 +- R/rmult.acl.R | 15 ++++------ R/rmult.bcl.R | 12 ++++---- R/rmult.clm.R | 18 ++++-------- R/rmult.crm.R | 6 ++-- R/rnorta.R | 33 ++++++++------------- R/rsmvnorm.R | 6 ++-- README.md | 2 +- inst/NEWS | 3 ++ man/rbin.Rd | 44 ++++++++++++++++++---------- man/rmult.acl.Rd | 15 +++++----- man/rmult.bcl.Rd | 14 ++++----- man/rmult.clm.Rd | 11 ++++--- man/rmult.crm.Rd | 9 +++--- man/rnorta.Rd | 25 ++++++++-------- man/rsmvnorm.Rd | 2 +- tests/testthat/test_core_functions.R | 3 +- 18 files changed, 106 insertions(+), 117 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 1b592f7..d9c36eb 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: SimCorMultRes Type: Package Title: Simulates Correlated Multinomial Responses Description: Simulates correlated multinomial responses conditional on a marginal model specification. -Version: 1.6.9 +Version: 1.7.0 Depends: R(>= 2.15.0) Imports: evd, diff --git a/R/rbin.R b/R/rbin.R index 9f6506b..166c093 100644 --- a/R/rbin.R +++ b/R/rbin.R @@ -125,7 +125,8 @@ #' dep = sqrt(1 - 0.9), #' model = "log", d = cluster_size #' ) -#' simulated_latent_variables <- simulated_latent_variables1 - simulated_latent_variables2 # nolintr +#' simulated_latent_variables <- simulated_latent_variables1 - +#' simulated_latent_variables2 #' simulated_binary_dataset <- rbin( #' clsize = cluster_size, #' intercepts = beta_intercepts, betas = beta_coefficients, diff --git a/R/rmult.acl.R b/R/rmult.acl.R index 236dc64..2b82e19 100644 --- a/R/rmult.acl.R +++ b/R/rmult.acl.R @@ -105,21 +105,16 @@ #' xdata <- data.frame(x1, x2) #' identity_matrix <- diag(4) #' equicorrelation_matrix <- toeplitz(c(1, rep(0.95, cluster_size - 1))) -#' latent_correlation_matrix <- kronecker( -#' equicorrelation_matrix, -#' identity_matrix -#' ) -#' simulated_ordinal_dataset <- rmult.acl( -#' clsize = cluster_size, +#' latent_correlation_matrix <- kronecker(equicorrelation_matrix, +#' identity_matrix) +#' simulated_ordinal_dataset <- rmult.acl(clsize = cluster_size, #' intercepts = beta_intercepts, betas = beta_coefficients, #' xformula = ~ x1 + x2, xdata = xdata, -#' cor.matrix = latent_correlation_matrix -#' ) +#' cor.matrix = latent_correlation_matrix) #' suppressPackageStartupMessages(library("multgee")) #' ordinal_gee_model <- ordLORgee(y ~ x1 + x2, #' data = simulated_ordinal_dataset$simdata, id = id, repeated = time, -#' LORstr = "time.exch", link = "acl" -#' ) +#' LORstr = "time.exch", link = "acl") #' round(coef(ordinal_gee_model), 2) #' @export rmult.acl <- function(clsize = clsize, intercepts = intercepts, betas = betas, # nolint diff --git a/R/rmult.bcl.R b/R/rmult.bcl.R index 1163fdf..3842dcb 100644 --- a/R/rmult.bcl.R +++ b/R/rmult.bcl.R @@ -103,17 +103,15 @@ #' xdata <- data.frame(x1, x2) #' equicorrelation_matrix <- toeplitz(c(1, rep(0.95, cluster_size - 1))) #' identity_matrix <- diag(categories_no) -#' latent_correlation_matrix <- kronecker(equicorrelation_matrix, identity_matrix) # nolint -#' simulated_nominal_dataset <- rmult.bcl( -#' clsize = cluster_size, +#' latent_correlation_matrix <- kronecker(equicorrelation_matrix, +#' identity_matrix) +#' simulated_nominal_dataset <- rmult.bcl(clsize = cluster_size, #' ncategories = categories_no, betas = betas, xformula = ~ x1 + x2, -#' xdata = xdata, cor.matrix = latent_correlation_matrix -#' ) +#' xdata = xdata, cor.matrix = latent_correlation_matrix) #' suppressPackageStartupMessages(library("multgee")) #' nominal_gee_model <- nomLORgee(y ~ x1 + x2, #' data = simulated_nominal_dataset$simdata, id = id, repeated = time, -#' LORstr = "time.exch" -#' ) +#' LORstr = "time.exch") #' round(coef(nominal_gee_model), 2) #' @export rmult.bcl <- function(clsize = clsize, ncategories = ncategories, betas = betas, # nolint diff --git a/R/rmult.clm.R b/R/rmult.clm.R index 3213a0d..de1f4e0 100644 --- a/R/rmult.clm.R +++ b/R/rmult.clm.R @@ -104,27 +104,21 @@ #' beta_coefficients <- matrix(c(1, 2, 3, 4), 4, 1) #' x <- rep(rnorm(sample_size), each = cluster_size) #' latent_correlation_matrix <- toeplitz(c(1, 0.85, 0.5, 0.15)) -#' simulated_ordinal_dataset <- rmult.clm( -#' clsize = cluster_size, +#' simulated_ordinal_dataset <- rmult.clm(clsize = cluster_size, #' intercepts = beta_intercepts, betas = beta_coefficients, xformula = ~x, -#' cor.matrix = latent_correlation_matrix, link = "probit" -#' ) +#' cor.matrix = latent_correlation_matrix, link = "probit") #' head(simulated_ordinal_dataset$simdata, n = 8) #' #' ## Same sampling scheme except that the parameter vector is time-stationary. #' set.seed(12345) -#' simulated_ordinal_dataset <- rmult.clm( -#' clsize = cluster_size, betas = 1, +#' simulated_ordinal_dataset <- rmult.clm(clsize = cluster_size, betas = 1, #' xformula = ~x, cor.matrix = latent_correlation_matrix, -#' intercepts = beta_intercepts, link = "probit" -#' ) +#' intercepts = beta_intercepts, link = "probit") #' ## Fit a GEE model (Touloumis et al., 2013) to estimate the regression #' ## coefficients. #' library(multgee) -#' ordinal_gee_model <- ordLORgee(y ~ x, -#' id = id, repeated = time, -#' link = "probit", data = simulated_ordinal_dataset$simdata -#' ) +#' ordinal_gee_model <- ordLORgee(y ~ x, id = id, repeated = time, +#' link = "probit", data = simulated_ordinal_dataset$simdata) #' coef(ordinal_gee_model) #' @export rmult.clm <- function(clsize = clsize, intercepts = intercepts, betas = betas, # nolint diff --git a/R/rmult.crm.R b/R/rmult.crm.R index 0a8f6a3..c107e03 100644 --- a/R/rmult.crm.R +++ b/R/rmult.crm.R @@ -110,11 +110,9 @@ #' ones_matrix <- matrix(1, cluster_size, cluster_size) #' latent_correlation_matrix <- identity_matrix + #' kronecker(equicorrelation_matrix, ones_matrix) -#' simulated_ordinal_dataset <- rmult.crm( -#' clsize = cluster_size, +#' simulated_ordinal_dataset <- rmult.crm(clsize = cluster_size, #' intercepts = beta_intercepts, betas = beta_coefficients, xformula = ~x, -#' cor.matrix = latent_correlation_matrix, link = "probit" -#' ) +#' cor.matrix = latent_correlation_matrix, link = "probit") #' head(simulated_ordinal_dataset$Ysim) #' @export rmult.crm <- function(clsize = clsize, intercepts = intercepts, betas = betas, # nolint diff --git a/R/rnorta.R b/R/rnorta.R index d3b0bed..3f569ec 100644 --- a/R/rnorta.R +++ b/R/rnorta.R @@ -50,44 +50,35 @@ #' latent_correlation_matrix <- toeplitz(c(1, rep(0.8, 2))) #' latent_correlation_matrix #' common_marginal_distribution <- rep("qlogis", 3) -#' simulated_logistic_responses <- rnorta( -#' R = sample_size, +#' simulated_logistic_responses <- rnorta(R = sample_size, #' cor.matrix = latent_correlation_matrix, -#' distr = common_marginal_distribution -#' ) +#' distr = common_marginal_distribution) #' #' ## The following lines exemplify the NORTA method. #' set.seed(1) -#' simulated_normal_responses <- rsmvnorm( -#' R = sample_size, -#' cor.matrix = latent_correlation_matrix -#' ) -#' all(simulated_logistic_responses == qlogis(pnorm(simulated_normal_responses))) # nolintr +#' simulated_normal_responses <- rsmvnorm(R = sample_size, +#' cor.matrix = latent_correlation_matrix) +#' norta_simulated <- qlogis(pnorm(simulated_normal_responses)) +#' all(simulated_logistic_responses == norta_simulated) #' #' ## Change the marginal distributions to standard normal, standard #' ## logistic and standard extreme value distribution. #' set.seed(1) #' different_marginal_distributions <- c("qnorm", "qlogis", "qgumbel") -#' simulated_logistic_responses <- rnorta( -#' R = sample_size, +#' simulated_logistic_responses <- rnorta(R = sample_size, #' cor.matrix = latent_correlation_matrix, -#' distr = different_marginal_distributions -#' ) +#' distr = different_marginal_distributions) #' cor(simulated_logistic_responses) #' colMeans(simulated_logistic_responses) #' apply(simulated_logistic_responses, 2, sd) #' #' ## Same as above but using parameter values other than the default ones. #' set.seed(1) -#' qpars <- list( -#' c(mean = 1, sd = 9), c(location = 2, scale = 1), -#' c(loc = 3, scale = 1) -#' ) -#' simulated_logistic_responses <- rnorta( -#' R = sample_size, +#' qpars <- list(c(mean = 1, sd = 9), c(location = 2, scale = 1), +#' c(loc = 3, scale = 1)) +#' simulated_logistic_responses <- rnorta(R = sample_size, #' cor.matrix = latent_correlation_matrix, -#' distr = different_marginal_distributions, qparameters = qpars -#' ) +#' distr = different_marginal_distributions, qparameters = qpars) #' cor(simulated_logistic_responses) #' colMeans(simulated_logistic_responses) #' apply(simulated_logistic_responses, 2, sd) diff --git a/R/rsmvnorm.R b/R/rsmvnorm.R index a0c9aa4..72c0daa 100644 --- a/R/rsmvnorm.R +++ b/R/rsmvnorm.R @@ -19,10 +19,8 @@ #' set.seed(1) #' sample_size <- 10000 #' correlation_matrix <- toeplitz(c(1, 0.4)) -#' simulated_normal_responses <- rsmvnorm( -#' R = sample_size, -#' cor.matrix = correlation_matrix -#' ) +#' simulated_normal_responses <- rsmvnorm(R = sample_size, +#' cor.matrix = correlation_matrix) #' colMeans(simulated_normal_responses) #' apply(simulated_normal_responses, 2, sd) #' cor(simulated_normal_responses) diff --git a/README.md b/README.md index 0962d76..ba74c44 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ # SimCorMultRes: Simulates Correlated Multinomial Responses [![Github -version](https://img.shields.io/badge/GitHub%20-1.6.9-orange.svg)](%22commits/master%22) +version](https://img.shields.io/badge/GitHub%20-1.7.0-orange.svg)](%22commits/master%22) [![Travis-CI Build Status](https://travis-ci.org/AnestisTouloumis/SimCorMultRes.svg?branch=master)](https://travis-ci.org/AnestisTouloumis/SimCorMultRes) [![Project Status: Active The project has reached a stable, usable state diff --git a/inst/NEWS b/inst/NEWS index 780c2fe..848261a 100644 --- a/inst/NEWS +++ b/inst/NEWS @@ -1,3 +1,6 @@ +Version 1.7.0 [2019-07-25] + * Reseased on CRAN. + Version 1.6.9 [2019-07-24] * Cosmetic changes. diff --git a/man/rbin.Rd b/man/rbin.Rd index 42efac4..fbdb20d 100644 --- a/man/rbin.Rd +++ b/man/rbin.Rd @@ -99,29 +99,41 @@ beta_intercepts <- 0 beta_coefficients <- 0.2 latent_correlation_matrix <- toeplitz(c(1, 0.9, 0.9, 0.9)) x <- rep(rnorm(sample_size), each = cluster_size) -simulated_binary_dataset <- rbin(clsize = cluster_size, - intercepts = beta_intercepts, betas = beta_coefficients, - xformula = ~ x, cor.matrix = latent_correlation_matrix, link = 'probit') +simulated_binary_dataset <- rbin( + clsize = cluster_size, + intercepts = beta_intercepts, betas = beta_coefficients, + xformula = ~x, cor.matrix = latent_correlation_matrix, link = "probit" +) library(gee) -binary_gee_model <- gee(y ~ x, family = binomial('probit'), id = id, -data = simulated_binary_dataset$simdata) +binary_gee_model <- gee(y ~ x, + family = binomial("probit"), id = id, + data = simulated_binary_dataset$simdata +) summary(binary_gee_model)$coefficients ## See Example 3.6 in the Vignette. set.seed(8) library(evd) -simulated_latent_variables1 <- rmvevd(sample_size, dep = sqrt(1 - 0.9), - model = 'log', d = cluster_size) -simulated_latent_variables2 <- rmvevd(sample_size, dep = sqrt(1 - 0.9), - model = 'log', d = cluster_size) -simulated_latent_variables <- simulated_latent_variables1 - simulated_latent_variables2 # nolintr -simulated_binary_dataset <- rbin(clsize = cluster_size, - intercepts = beta_intercepts, betas = beta_coefficients, - xformula = ~ x, rlatent = simulated_latent_variables) -binary_gee_model <- gee(y ~ x, family = binomial('logit'), id = id, - data = simulated_binary_dataset$simdata) +simulated_latent_variables1 <- rmvevd(sample_size, + dep = sqrt(1 - 0.9), + model = "log", d = cluster_size +) +simulated_latent_variables2 <- rmvevd(sample_size, + dep = sqrt(1 - 0.9), + model = "log", d = cluster_size +) +simulated_latent_variables <- simulated_latent_variables1 - + simulated_latent_variables2 +simulated_binary_dataset <- rbin( + clsize = cluster_size, + intercepts = beta_intercepts, betas = beta_coefficients, + xformula = ~x, rlatent = simulated_latent_variables +) +binary_gee_model <- gee(y ~ x, + family = binomial("logit"), id = id, + data = simulated_binary_dataset$simdata +) summary(binary_gee_model)$coefficients - } \references{ Cario, M. C. and Nelson, B. L. (1997) \emph{Modeling and diff --git a/man/rmult.acl.Rd b/man/rmult.acl.Rd index b9ebf27..6f803ff 100644 --- a/man/rmult.acl.Rd +++ b/man/rmult.acl.Rd @@ -103,17 +103,16 @@ xdata <- data.frame(x1, x2) identity_matrix <- diag(4) equicorrelation_matrix <- toeplitz(c(1, rep(0.95, cluster_size - 1))) latent_correlation_matrix <- kronecker(equicorrelation_matrix, - identity_matrix) + identity_matrix) simulated_ordinal_dataset <- rmult.acl(clsize = cluster_size, - intercepts = beta_intercepts, betas = beta_coefficients, - xformula = ~ x1 + x2, xdata = xdata, - cor.matrix = latent_correlation_matrix) -suppressPackageStartupMessages(library('multgee')) + intercepts = beta_intercepts, betas = beta_coefficients, + xformula = ~ x1 + x2, xdata = xdata, + cor.matrix = latent_correlation_matrix) +suppressPackageStartupMessages(library("multgee")) ordinal_gee_model <- ordLORgee(y ~ x1 + x2, - data = simulated_ordinal_dataset$simdata, id = id, repeated = time, -LORstr = 'time.exch', link='acl') + data = simulated_ordinal_dataset$simdata, id = id, repeated = time, + LORstr = "time.exch", link = "acl") round(coef(ordinal_gee_model), 2) - } \references{ Cario, M. C. and Nelson, B. L. (1997) \emph{Modeling and diff --git a/man/rmult.bcl.Rd b/man/rmult.bcl.Rd index 883c731..7cb5090 100644 --- a/man/rmult.bcl.Rd +++ b/man/rmult.bcl.Rd @@ -100,16 +100,16 @@ x2 <- rnorm(sample_size * cluster_size) xdata <- data.frame(x1, x2) equicorrelation_matrix <- toeplitz(c(1, rep(0.95, cluster_size - 1))) identity_matrix <- diag(categories_no) -latent_correlation_matrix <- kronecker(equicorrelation_matrix, identity_matrix) # nolint +latent_correlation_matrix <- kronecker(equicorrelation_matrix, + identity_matrix) simulated_nominal_dataset <- rmult.bcl(clsize = cluster_size, - ncategories = categories_no, betas = betas, xformula = ~ x1 + x2, - xdata = xdata, cor.matrix = latent_correlation_matrix) -suppressPackageStartupMessages(library('multgee')) + ncategories = categories_no, betas = betas, xformula = ~ x1 + x2, + xdata = xdata, cor.matrix = latent_correlation_matrix) +suppressPackageStartupMessages(library("multgee")) nominal_gee_model <- nomLORgee(y ~ x1 + x2, - data = simulated_nominal_dataset$simdata, id = id, repeated = time, -LORstr = 'time.exch') + data = simulated_nominal_dataset$simdata, id = id, repeated = time, + LORstr = "time.exch") round(coef(nominal_gee_model), 2) - } \references{ Cario, M. C. and Nelson, B. L. (1997) \emph{Modeling and diff --git a/man/rmult.clm.Rd b/man/rmult.clm.Rd index cd1111b..a115326 100644 --- a/man/rmult.clm.Rd +++ b/man/rmult.clm.Rd @@ -102,22 +102,21 @@ beta_coefficients <- matrix(c(1, 2, 3, 4), 4, 1) x <- rep(rnorm(sample_size), each = cluster_size) latent_correlation_matrix <- toeplitz(c(1, 0.85, 0.5, 0.15)) simulated_ordinal_dataset <- rmult.clm(clsize = cluster_size, - intercepts = beta_intercepts, betas = beta_coefficients, xformula = ~ x, - cor.matrix = latent_correlation_matrix, link = 'probit') + intercepts = beta_intercepts, betas = beta_coefficients, xformula = ~x, + cor.matrix = latent_correlation_matrix, link = "probit") head(simulated_ordinal_dataset$simdata, n = 8) ## Same sampling scheme except that the parameter vector is time-stationary. set.seed(12345) simulated_ordinal_dataset <- rmult.clm(clsize = cluster_size, betas = 1, - xformula = ~ x, cor.matrix = latent_correlation_matrix, - intercepts = beta_intercepts, link = 'probit') + xformula = ~x, cor.matrix = latent_correlation_matrix, + intercepts = beta_intercepts, link = "probit") ## Fit a GEE model (Touloumis et al., 2013) to estimate the regression ## coefficients. library(multgee) ordinal_gee_model <- ordLORgee(y ~ x, id = id, repeated = time, - link = 'probit', data = simulated_ordinal_dataset$simdata) + link = "probit", data = simulated_ordinal_dataset$simdata) coef(ordinal_gee_model) - } \references{ Cario, M. C. and Nelson, B. L. (1997) \emph{Modeling and diff --git a/man/rmult.crm.Rd b/man/rmult.crm.Rd index ac30efa..82aea20 100644 --- a/man/rmult.crm.Rd +++ b/man/rmult.crm.Rd @@ -108,14 +108,13 @@ x <- rnorm(sample_size * cluster_size) categories_no <- 5 identity_matrix <- diag(1, (categories_no - 1) * cluster_size) equicorrelation_matrix <- toeplitz(c(0, rep(0.24, categories_no - 2))) -ones_matrix <- matrix(1, cluster_size, cluster_size) +ones_matrix <- matrix(1, cluster_size, cluster_size) latent_correlation_matrix <- identity_matrix + - kronecker(equicorrelation_matrix, ones_matrix) + kronecker(equicorrelation_matrix, ones_matrix) simulated_ordinal_dataset <- rmult.crm(clsize = cluster_size, - intercepts = beta_intercepts, betas = beta_coefficients, xformula = ~ x, - cor.matrix = latent_correlation_matrix, link = 'probit') + intercepts = beta_intercepts, betas = beta_coefficients, xformula = ~x, + cor.matrix = latent_correlation_matrix, link = "probit") head(simulated_ordinal_dataset$Ysim) - } \references{ Cario, M. C. and Nelson, B. L. (1997) \emph{Modeling and diff --git a/man/rnorta.Rd b/man/rnorta.Rd index 41bfda5..9214692 100644 --- a/man/rnorta.Rd +++ b/man/rnorta.Rd @@ -52,24 +52,25 @@ set.seed(1) sample_size <- 1000 latent_correlation_matrix <- toeplitz(c(1, rep(0.8, 2))) latent_correlation_matrix -common_marginal_distribution <- rep('qlogis', 3) +common_marginal_distribution <- rep("qlogis", 3) simulated_logistic_responses <- rnorta(R = sample_size, - cor.matrix = latent_correlation_matrix, - distr = common_marginal_distribution) + cor.matrix = latent_correlation_matrix, + distr = common_marginal_distribution) ## The following lines exemplify the NORTA method. set.seed(1) simulated_normal_responses <- rsmvnorm(R = sample_size, - cor.matrix = latent_correlation_matrix) -all(simulated_logistic_responses == qlogis(pnorm(simulated_normal_responses))) # nolintr + cor.matrix = latent_correlation_matrix) +norta_simulated <- qlogis(pnorm(simulated_normal_responses)) +all(simulated_logistic_responses == norta_simulated) ## Change the marginal distributions to standard normal, standard ## logistic and standard extreme value distribution. set.seed(1) -different_marginal_distributions <- c('qnorm', 'qlogis', 'qgumbel') -simulated_logistic_responses <- rnorta(R = sample_size, - cor.matrix = latent_correlation_matrix, - distr = different_marginal_distributions) +different_marginal_distributions <- c("qnorm", "qlogis", "qgumbel") +simulated_logistic_responses <- rnorta(R = sample_size, + cor.matrix = latent_correlation_matrix, + distr = different_marginal_distributions) cor(simulated_logistic_responses) colMeans(simulated_logistic_responses) apply(simulated_logistic_responses, 2, sd) @@ -77,10 +78,10 @@ apply(simulated_logistic_responses, 2, sd) ## Same as above but using parameter values other than the default ones. set.seed(1) qpars <- list(c(mean = 1, sd = 9), c(location = 2, scale = 1), - c(loc = 3, scale = 1)) + c(loc = 3, scale = 1)) simulated_logistic_responses <- rnorta(R = sample_size, - cor.matrix = latent_correlation_matrix, - distr = different_marginal_distributions, qparameters = qpars) + cor.matrix = latent_correlation_matrix, + distr = different_marginal_distributions, qparameters = qpars) cor(simulated_logistic_responses) colMeans(simulated_logistic_responses) apply(simulated_logistic_responses, 2, sd) diff --git a/man/rsmvnorm.Rd b/man/rsmvnorm.Rd index 0968102..5f2577a 100644 --- a/man/rsmvnorm.Rd +++ b/man/rsmvnorm.Rd @@ -32,7 +32,7 @@ set.seed(1) sample_size <- 10000 correlation_matrix <- toeplitz(c(1, 0.4)) simulated_normal_responses <- rsmvnorm(R = sample_size, - cor.matrix = correlation_matrix) + cor.matrix = correlation_matrix) colMeans(simulated_normal_responses) apply(simulated_normal_responses, 2, sd) cor(simulated_normal_responses) diff --git a/tests/testthat/test_core_functions.R b/tests/testthat/test_core_functions.R index 416b281..bdc9982 100644 --- a/tests/testthat/test_core_functions.R +++ b/tests/testthat/test_core_functions.R @@ -142,7 +142,8 @@ test_that("rmult.clm constant beta_coefficients", { c(t(simulated_ordinal_dataset$rlatent)) - c(beta_coefficients) * x beta_intercepts <- c(-Inf, beta_intercepts, Inf) simulated_responses <- cut( - simulated_latent_responses, beta_intercepts, labels = FALSE + simulated_latent_responses, beta_intercepts, + labels = FALSE ) expect_equal(c(t(simulated_ordinal_dataset$Ysim)), simulated_responses) })