README.md

SimpleConjoint 0.1.1

URL Generator for Conjoint Experiments with Simple Designs

開発者情報

履歴

概要

このような方のためのパッケージです。

インストール

  1. {devtools}、または{remotes}パッケージを導入
install.packages("devtools")
# または
install.packages("remotes")
  1. {SimpleConjoint}のインストール
devtools::install_github("JaehyunSong/SimpleConjoint")
# または
remotes::install_github("JaehyunSong/SimpleConjoint")
  1. パッケージの読み込み
library(SimpleConjoint)

使い方

パッケージの読み込み後、?GenerateURLで確認してください。

GenerateURL(data, Task = 3, Profile = 2, Randomized = TRUE,
            DefaultURL = "http://tintstyle.cafe24.com/Qualtrics/SimpleConjoint/SimpleConjoint.php",
            ShortURL = FALSE,
            Design = FALSE)

例1

Input

library(SimpleConjoint)

# 試行回数4回、プロフィール2個、属性の順番ランダム化の場合
GenerateURL(data = "http://tintstyle.cafe24.com/Qualtrics/SimpleConjoint/ExampleDesign2.csv", 
            Task = 4, Profile = 2, Randomized = TRUE, ShortURL = FALSE,
            DefaultURL = "http://tintstyle.cafe24.com/Qualtrics/SimpleConjoint/SimpleConjoint.php")

Output

http://tintstyle.cafe24.com/Qualtrics/SimpleConjoint/SimpleConjoint.php?nTask=5&nProfile=2&AttrRand=1&nA=4&nL[]=6&nL[]=5&nL[]=4&nL[]=7&A[]=スープ&A[]=麺&A[]=具材&A[]=値段&L[]=醤油&L[]=塩&L[]=味噌&L[]=豚骨&L[]=トマト&L[]=ビール&L[]=極太麺&L[]=太麺&L[]=中細麺&L[]=細麺&L[]=こんにゃく&L[]=チャーシュー&L[]=メンマ&L[]=プリン&L[]=ネギ&L[]=400円&L[]=500円&L[]=600円&L[]=700円&L[]=800円&L[]=900円&L[]=1000円 

Before the url above embed into Qualtrics, please shorten the url via url shortner.
Bitly: https://www.bitly.com
is.gd: https://is.gd

例2

Input

# デザインdata.framen作成
# 余るセルは欠損値でなく空character("")で補完。補完しないとベクトルがリサイクルされるため、必ず補完してください。
DesignData <- data.frame(性別 = c("男性", "女性", "", "", ""),
                         年齢 = c("20", "30", "40", "50", ""),
                         学歴 = c("高校", "大学", "大学院", "", ""),
                         年収 = c("0", "300万", "500万", "700万", "1000万"))

# デザインはcsv経路でなく、data.frameそのまま
# 試行回数3回、プロフィール2個、属性の順番ランダム化、短縮URL出力
GenerateURL(data = DesignData, 
            Task = 3, Profile = 2, Randomized = TRUE, ShortURL = TRUE,
            DefaultURL = "http://tintstyle.cafe24.com/Qualtrics/SimpleConjoint/SimpleConjoint.php")

Output

# 出力結果
Short URL: https://is.gd/4Yk64B 

Long URL : http://tintstyle.cafe24.com/Qualtrics/SimpleConjoint/SimpleConjoint.php?nTask=3&nProfile=2&AttrRand=1&nA=4&nL[]=2&nL[]=4&nL[]=3&nL[]=5&A[]=性別&A[]=年齢&A[]=学歴&A[]=年収&L[]=男性&L[]=女性&L[]=20&L[]=30&L[]=40&L[]=50&L[]=高校&L[]=大学&L[]=大学院&L[]=0&L[]=300万&L[]=500万&L[]=700万&L[]=1000万

例3

Input

# デザインlistの作成
DesignData <- list(性別 = c("男性", "女性"),
                   年齢 = c("20", "30", "40", "50"),
                   学歴 = c("高校", "大学", "大学院"),
                   年収 = c("0", "300万", "500万", "700万", "1000万"))

## 試行回数5回、プロフィール3個、属性の順番ランダム化なし、短縮URL出力
GenerateURL(data = DesignData,
            Task = 5, Profile = 3, Randomized = FALSE, ShortURL = TRUE)

Output

# 出力結果
Short URL: https://is.gd/4Yk64B 

Long URL : http://tintstyle.cafe24.com/Qualtrics/SimpleConjoint/SimpleConjoint.php?nTask=3&nProfile=2&AttrRand=1&nA=4&nL[]=2&nL[]=4&nL[]=3&nL[]=5&A[]=性別&A[]=年齢&A[]=学歴&A[]=年収&L[]=男性&L[]=女性&L[]=20&L[]=30&L[]=40&L[]=50&L[]=高校&L[]=大学&L[]=大学院&L[]=0&L[]=300万&L[]=500万&L[]=700万&L[]=1000万

|属性名1|属性名2|属性名3|属性名4| |---|---|---|---| |水準1-1|水準2-1|水準3-1|水準4-1| |水準1-2|水準2-2|水準3-2|水準4-2| |水準1-3||水準3-3|水準4-3| |||水準3-4|| |||水準3-5||

今後の予定



JaehyunSong/SimpleConjoint documentation built on July 27, 2023, 3:33 a.m.