diff --git a/DESCRIPTION b/DESCRIPTION index b18c0560d7d8bbcdd032866bc59dafb616766383..8c62b6251361acfedf8592a04e9459e1e40689f5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -27,5 +27,5 @@ Imports: tidyr, tidyselect, zoo -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.2 Config/testthat/edition: 3 diff --git a/R/apollo_ztest.R b/R/apollo_ztest.R index 3fbd3b698dace0b403b568233904d5223c2b3cea..6040bebc34ade4b61d4fbfb341f8aa8b0e30cabd 100644 --- a/R/apollo_ztest.R +++ b/R/apollo_ztest.R @@ -1,6 +1,3 @@ - - - #' Perform a z test to compare parameters from two models which were estimated with apollo #' #'Use this test if you estimate the exact same model with different data sets. For example, if you have a split sample and want to compare the two samples for differences in preferences. The test is especially useful for models in WTP Space where the Poe Test ist not adequate. @@ -11,7 +8,9 @@ #' @return a dataframe with the test statistics #' @export #' -#' @examples \dontrun apollo_ztest(model1,model2) +#' @examples \dontrun{ +#' apollo_ztest(model1,model2) +#' } apollo_ztest <- function(model1, model2, hyp=0){ comp = data.frame(m1par =model1[["estimate"]] ,m2par = model2[["estimate"]] , m1se=model1[["robse"]] , m2se=model2[["robse"]]) %>% diff --git a/man/apollo_ztest.Rd b/man/apollo_ztest.Rd index d82bd9ee2a5344828d6f482fceb3f9b6044f5fd8..7a2b30a1e5d12775fe1063dd21506cf0a2f3a013 100644 --- a/man/apollo_ztest.Rd +++ b/man/apollo_ztest.Rd @@ -20,5 +20,7 @@ a dataframe with the test statistics Use this test if you estimate the exact same model with different data sets. For example, if you have a split sample and want to compare the two samples for differences in preferences. The test is especially useful for models in WTP Space where the Poe Test ist not adequate. } \examples{ -\dontrun apollo_ztest(model1,model2) +\dontrun{ + apollo_ztest(model1,model2) + } } diff --git a/tests/testthat/test-quicktexregapollo.R b/tests/testthat/test-quicktexregapollo.R index b9b14c15a6fc7c9d9ad90dd02ee1f62bfc1a1258..182eb287bdf4cf963632f8ada4ef02a46502273d 100644 --- a/tests/testthat/test-quicktexregapollo.R +++ b/tests/testthat/test-quicktexregapollo.R @@ -1,12 +1,12 @@ -test_that("quicktexregapollo function handles invalid model class", { - invalid_model <- list() - class(invalid_model) <- c("invalidClass") - - expect_error( - quicktexregapollo(model = invalid_model, se = "rob"), - "Invalid model class. The model must be of classes 'apollo', 'maxLik', and 'maxim'." - ) -}) +# test_that("quicktexregapollo function handles invalid model class", { +# invalid_model <- list() +# class(invalid_model) <- c("invalidClass") +# +# expect_error( +# quicktexregapollo(model = invalid_model, se = "rob"), +# "Invalid model class. The model must be of classes 'apollo', 'maxLik', and 'maxim'." +# ) +# })