diff --git a/NAMESPACE b/NAMESPACE index 7cb0032e6e2431ce5dc0d7c3ad3658ff9f687399..bdaccf3f5299a10dc9229dce0dbf03da4c944cc3 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,6 +1,7 @@ # Generated by roxygen2: do not edit by hand export("%>%") +export(apollo_ztest) export(createSets) export(poetest) export(quicktexregapollo) diff --git a/R/apollo_ztest.R b/R/apollo_ztest.R index bbe6511ac4311a2f6f19d145c11a7e3e0d513435..3fbd3b698dace0b403b568233904d5223c2b3cea 100644 --- a/R/apollo_ztest.R +++ b/R/apollo_ztest.R @@ -1,6 +1,17 @@ -#z-test with apollo data + +#' 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. +#' @param model1 Model from which to take the first parameter +#' @param model2 Model from which to take the second parameter +#' @param hyp Your hypotheses to test. Default is 0 which means you test for equality of parameters. Currently there are no other options. If you change the value, it will still test for equality (0) +#' +#' @return a dataframe with the test statistics +#' @export +#' +#' @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 new file mode 100644 index 0000000000000000000000000000000000000000..d82bd9ee2a5344828d6f482fceb3f9b6044f5fd8 --- /dev/null +++ b/man/apollo_ztest.Rd @@ -0,0 +1,24 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/apollo_ztest.R +\name{apollo_ztest} +\alias{apollo_ztest} +\title{Perform a z test to compare parameters from two models which were estimated with apollo} +\usage{ +apollo_ztest(model1, model2, hyp = 0) +} +\arguments{ +\item{model1}{Model from which to take the first parameter} + +\item{model2}{Model from which to take the second parameter} + +\item{hyp}{Your hypotheses to test. Default is 0 which means you test for equality of parameters. Currently there are no other options. If you change the value, it will still test for equality (0)} +} +\value{ +a dataframe with the test statistics +} +\description{ +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) +}