carryTest: Check conjoint data for carryover effects

View source: R/carryTest.R

carryTestR Documentation

Check conjoint data for carryover effects

Description

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).

Usage

carryTest(data, outcome, attributes, task, resID)

Arguments

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.

Details

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()).

Value

A list of class 'carryTest'. Can be converted to tidy data.frame with as.data.frame().

Examples

## Not run: 
carryTest(data=experimentdata,
attributes=c("gender","age","income","education"),
outcome="rating",
task="taskID",
resID="respondent_ID")

## End(Not run)


cknotz/conjointdatachecks documentation built on Feb. 11, 2023, 12:04 a.m.