Skip to content
Snippets Groups Projects
Commit 4f68aee8 authored by dj44vuri's avatar dj44vuri
Browse files

added ztest

parent 260890de
No related branches found
No related tags found
No related merge requests found
# Generated by roxygen2: do not edit by hand
export("%>%")
export(apollo_ztest)
export(createSets)
export(poetest)
export(quicktexregapollo)
......
#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"]]) %>%
......
% 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)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment