reshape_conjoint: Reshapes survey response data for conjoint analysis

View source: R/reshape_conjoint.R

reshape_conjointR Documentation

Reshapes survey response data for conjoint analysis

Description

This function takes a data frame, preferably from “read_Qualtrics()”, and reshapes it from wide to long such that each row is a distinct conjoint task rather than a respondent.

Usage

reshape_conjoint(.data, .idvar, .outcomes, .alphabet = "F")

Arguments

.data

A data frame, preferably from “read_Qualtrics()”

.idvar

A variable (unquoted) identifying the column name containing respondent IDs

.outcomes

A character vector identifying the column names that contain outcomes

.alphabet

The letter indicating conjoint attributes. If using Strezhnev's package (https://github.com/astrezhnev/conjointsdt) in Qualtrics, the default is "F".

Value

A conjoint task-level data frame (in other words, in long format) ready for conjoint analysis.


yhoriuchi/cjdata documentation built on July 29, 2022, 8:42 p.m.