Conditional Randomization Testing (CRT) Approach for Conjoint Analysis

Computes p-value according to the CRT using the HierNet test statistic. For more details, see Ham, Imai, Janson (2022) "Using Machine Learning to Test Causal Hypotheses in Conjoint Analysis" .


CRTConjoint

R-CMD-check

The goal of CRTConjoint is to use the conditional randomization test (CRT) to test for various hypothesis in conjoint experiments. In particular, CRT_pval aims to test whether a factor matters in any way. For example, does education matter in immigration preferences given other attributes of the candidate.

Installation

You can install CRTConjoint from GitHub with:

# install.packages("devtools")
devtools::install_github("daewoongham97/CRTConjoint")

or directly from CRAN with:

install.packages("CRTConjoint")

Example

This is a basic example which shows you how to test whether education matters for immigration preferences.

library(CRTConjoint)

# Immigration data
data("immigrationdata")
form = formula("Y ~ FeatEd + FeatGender + FeatCountry + FeatReason + FeatJob +
FeatExp + FeatPlans + FeatTrips + FeatLang + ppage + ppeducat + ppethm + ppgender")
left = colnames(immigrationdata)[1:9]
right = colnames(immigrationdata)[10:18]

## Not run: 
# Testing whether edcuation matters for immigration preferences
education_test = CRT_pval(formula = form, data = immigrationdata, X = "FeatEd",
 left = left, right = right, non_factor = "ppage", B = 100, analysis = 2)
education_test$p_val

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("CRTConjoint")

0.1.0 by Dae Woong Ham, 4 years ago


https://github.com/daewoongham97/CRTConjoint


Report a bug at https://github.com/daewoongham97/CRTConjoint/issues


Browse source code at https://github.com/cran/CRTConjoint


Authors: Dae Woong Ham [aut, cre] , Kosuke Imai [aut] , Lucas Janson [aut] , Jacob Bien [ctb, cph]


Documentation:   PDF Manual  


GPL (>= 3) license


Imports utils, methods, doSNOW, foreach, Rcpp, snow

Suggests knitr, rmarkdown

Linking to Rcpp


See at CRAN