Learn R Programming

RGremlinsConjoint

The gremlins package provides the tools and utilities to estimate a the model described in “Gremlins in the Data: Identifying the Information Content of Research Subjects” ([https://doi.org/10.1177/0022243720965930]) using conjoint analysis data such as that collected in Sawtooth Software’s Lighthouse or Discover Products. The packages also contains utility functions for formatting the input data and extracting the relevant results.

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("statuser/RGremlinsConjoint")

Example

The package exposes basically one function You can use it like:

library(RGremlinsConjoint)

# Read in the data
truck_design_file <- system.file("extdata", "simTruckDesign.csv", package = "RGremlinsConjoint")
truck_data_file <- system.file("extdata", "simTruckData.csv", package = "RGremlinsConjoint")
truckDesign <- read.csv(truck_design_file)
truckData <- read.csv(truck_data_file)

# Covert the design file to be dummy coded is necessary
# The simulated data is already coded
# codedTruck <- code_sawtooth_design(truckDesign, c(4:9), include_none_option=TRUE)

outputSimData_burn <- estimateGremlinsModel(truckData,
                                            truckDesign,
                                            R = 10,
                                            keepEvery = 1,
                                            num_lambda_segments = 2)
#> Finding Starting Values
#> Beginning MCMC Routine
#> Completing iteration :  1 
#> Accept rate slopes:  0 
#> Accept rate lambda:  0 
#> Mu_adapt lambda:     50 
#> Gamma_adapt lambda:  10 
#> metstd lambda:       10 
#> current lambda:      50

Copy Link

Version

Install

install.packages('RGremlinsConjoint')

Monthly Downloads

215

Version

0.9.1

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

John Howell

Last Published

September 8th, 2023

Functions in RGremlinsConjoint (0.9.1)

estimateGremlinsModel

Estimate Gremlin's Model - Hierarchical MNL
gremlins

'RGremlinsConjoint': A package for estimating the "Gremlins in the Data" model
code_sawtooth_design

Convert a Sawtooth Software generated design file to a dummy coded design file
RGremlinsConjoint-package

RGremlinsConjoint: Estimate the "Gremlins in the Data" Model for Conjoint Studies
gremlinsEnv

Set global options for the gremlins models. These options are not expected to be modified by the user but are extracted from the functions to simplify the coding.
convert_to_bayesm

Convert 'RGremlinsConjoint' formatted Data to 'bayesm' format
cbc.df

Simulated data for the "Gremlins in the Data Model"