carryTest | R Documentation |
carryTest
checks data from conjoint experiments for carryover effects
(which can arise when respondents base their evaluation of one vignette on their evaluation of previous ones).
It estimates linear regression models including one vignette attribute/dimension at a time interacted with an
ID for the task number as predictors and then estimates an F-test to test for the joint significance of the
interaction terms. A rejected null indicates carryover effects are present in the case of a particular
vignette attribute (see also Hainmueller et al. 2014, Political Analysis, p. 22).
carryTest(data, outcome, attributes, task, resID)
data |
A data.frame (in long format). |
outcome |
The outcome variable, rating or choice, entered as a string. |
attributes |
A character vector of vignette attributes/dimensions. |
task |
The task- or contest-ID; should be a factor in the data, entered here as a string. |
resID |
The respondent ID; should be a factor in the data, entered here as a string. |
Important: This test should only be run on vignette attributes that are unconstrained. Please see the package vignettes (browseVignettes("conjointdatachecks")) for details.
The result can be plotted (using plot()) or exported as a tidy data.frame (using as.data.frame()).
A list of class 'carryTest'. Can be converted to tidy data.frame with as.data.frame().
## Not run: carryTest(data=experimentdata, attributes=c("gender","age","income","education"), outcome="rating", task="taskID", resID="respondent_ID") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.