diff --git a/DESCRIPTION b/DESCRIPTION
index f4b5f0e9e0c00152566ea71ce2bdbf73851be656..4617cda865f3e409328f503557c27e2622397024 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,7 +1,7 @@
 Package: choiceTools
 Type: Package
 Title: Various tools to work with choice experiment data in R
-Version: 0.3.0
+Version: 0.3.3
 Author: Julian Sagebiel
 Maintainer: Julian Sagebiel <julian.sagebiel@idiv.de>
 Description: This is a random set of functions that make your life as a choice modeller easier. Some functions are made for use with apollo so that you can more easily do choice modelling in apollo. The package includes some tests like Poetest and zTest and some functions to generate publication-ready tables.
diff --git a/NAMESPACE b/NAMESPACE
index 6fa724cd540b262d1616e0650f2c313747256f1b..7cb0032e6e2431ce5dc0d7c3ad3658ff9f687399 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -2,6 +2,7 @@
 
 export("%>%")
 export(createSets)
+export(poetest)
 export(quicktexregapollo)
 export(remGOF)
 export(subcoef)
diff --git a/R/poetest.R b/R/poetest.R
index 49723eb51e061f07c5090f628b68e2b1c08069e2..c2d120151b1d5e7d6d54fad52c110097b7983686 100644
--- a/R/poetest.R
+++ b/R/poetest.R
@@ -1,48 +1,77 @@
-
-
-## Extract relevant elements of models
-
-takedraws <-function(n=10000, beta,vc) {
-
-
-  k=length(beta)
-  cholesky = chol(vc)
-
-  draw=matrix(nrow = n, ncol=k)
-
-  colnames(draw) <-names(beta)
-
-  for (d in 1:n) {
-    draw[d,] <- beta +t(cholesky)%*%stats::rnorm(k)
+# This function lets us perform the Poe (2005) test on WTP values
+
+
+#' Perform the Poe (2005) test on different discrete choice models
+#'
+#' @param n number of draws
+#' @param model1 Model from which to take the first WTP values
+#' @param model2 Model from which to take the second WTP values
+#' @param att Vector of attributes whose WTP values you want to compare
+#' @param price name of the price coefficient
+#' @param vcov which variance-covariance matrix to use. Either normal for the normal one, or rob for the robust one.
+#'
+#' @return a p value associated with "WTP1>WTP2"
+#' @export
+#'
+#' @examples \dontrun{
+#' poeresults<-poetest(n=5000, model1 = clmodels[[model_1]],model2 = clmodels[[model_2]],
+#'  att=attr, price = "bcost", vcov = "normal")
+#' }
+poetest <- function(n, model1, model2, att, price, vcov){
+  
+  #stop command for invalid variance covariance matrix
+  if (!vcov %in% c("rob", "normal")) {
+    stop("Invalid value for 'vcov'. Please use one of 'rob' or 'normal'.")
   }
-
-
-
-  return(draw)
-}
-
-
-getalldraws <- function(n, model1, model2, att, price) {
-
-  allmodels <- list(model1,model2)
-
-  model_draws <- list()
-
-  for (m in 1:2) {
-
-  model_draws[[m]] <-takedraws(n,allmodels[[m]][["estimate"]],allmodels[[m]][["varcov"]])
-
-  model_draws[[m]] <-cbind(model_draws[[m]], wtp= model_draws[[m]][,att]/model_draws[[m]][,price])
-     }
-
-  return(model_draws)
+  
+  ## Extract relevant elements of models
+  
+  takedraws <-function(n=10000, beta,vc) {
+    
+    
+    k=length(beta)
+    cholesky = chol(vc)
+    
+    draw=matrix(nrow = n, ncol=k)
+    
+    colnames(draw) <-names(beta)
+    
+    for (d in 1:n) {
+      draw[d,] <- beta +t(cholesky)%*%stats::rnorm(k)
+    }
+    
+    
+    
+    return(draw)
   }
+  
+  getalldraws <- function(n, model1, model2, att, price, vcov) {
+    
+    allmodels <- list(model1,model2)
+    
+    model_draws <- list()
+    
+    for (m in 1:2) {
+      
+      #implement the option to choose between the robust or the normal variance covariance matrix
+      varcov_matrix <- switch(vcov,
+                              rob = allmodels[[m]][["robvarcov"]],
+                              normal = allmodels[[m]][["varcov"]],
+                              stop("Invalid value for 'vcov'. Please use one of 'rob' or 'normal'.")
+      )
+      
+      model_draws[[m]] <-takedraws(n,allmodels[[m]][["estimate"]],varcov_matrix)
+      
+      model_draws[[m]] <-cbind(model_draws[[m]], wtp= model_draws[[m]][,att]/model_draws[[m]][,price])
+    }
+    
+    return(model_draws)
+  }
+  
+  
+  draws<-getalldraws(n, model1, model2, att, price, vcov)
 
-poetest <- function(n, model1, model2, att, price){
-
-draws<-getalldraws(n, model1, model2, att, price)
-
-wtpvec <- cbind(wtp1= draws[[1]][,"wtp"], wtp2= draws[[2]][,"wtp"])
+  wtpvec <- cbind(wtp1= draws[[1]][,"wtp"], wtp2= draws[[2]][,"wtp"])
 
 
 
diff --git a/R/quicktexregapollo.R b/R/quicktexregapollo.R
index eac46e934eb91909d35e2e7c02501bf2dc2db80e..18585769f5a88a84d58403fa1b1a27d07ba68a78 100644
--- a/R/quicktexregapollo.R
+++ b/R/quicktexregapollo.R
@@ -17,9 +17,9 @@ quicktexregapollo <- function(model = model, wtpest = NULL, se="rob") {
     stop("Invalid value for 'se'. Please use one of 'rob', 'normal', or 'bs'.")
   }
 
-  if (!all(c("apollo", "maxLik", "maxim") %in% class(model))) {
-    stop("Invalid model class. The model must be of classes 'apollo', 'maxLik', and 'maxim'.")
-  }
+ # if (!all(c("apollo", "maxLik", "maxim") %in% class(model))) {
+ #   stop("Invalid model class. The model must be of classes 'apollo', 'maxLik', and 'maxim'.")
+ # }
 
 
   if (se == "bs" && !"bootse" %in% names(model)) {
diff --git a/man/poetest.Rd b/man/poetest.Rd
new file mode 100644
index 0000000000000000000000000000000000000000..8c499f466818808147892a06df0ccbf539c7ab68
--- /dev/null
+++ b/man/poetest.Rd
@@ -0,0 +1,33 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/poetest.R
+\name{poetest}
+\alias{poetest}
+\title{Perform the Poe (2005) test on different discrete choice models}
+\usage{
+poetest(n, model1, model2, att, price, vcov)
+}
+\arguments{
+\item{n}{number of draws}
+
+\item{model1}{Model from which to take the first WTP values}
+
+\item{model2}{Model from which to take the second WTP values}
+
+\item{att}{Vector of attributes whose WTP values you want to compare}
+
+\item{price}{name of the price coefficient}
+
+\item{vcov}{which variance-covariance matrix to use. Either normal for the normal one, or rob for the robust one.}
+}
+\value{
+a p value associated with "WTP1>WTP2"
+}
+\description{
+Perform the Poe (2005) test on different discrete choice models
+}
+\examples{
+\dontrun{
+poeresults<-poetest(n=5000, model1 = clmodels[[model_1]],model2 = clmodels[[model_2]],
+ att=attr, price = "bcost", vcov = "normal")
+}
+}