[英]How to interpret the output of choicemodelr (rhierMnlRwMixture) in R
I just started using the R library 'choicemodelr' and succeded in getting some beta values as a solution. 我刚刚开始使用R库“ choicemodelr”,并成功获得了一些beta值作为解决方案。 But I wonder how do I assign these values to the specific attribute-levels.
但是我不知道如何将这些值分配给特定的属性级别。 As a result I only get values for A1B1, A1B2, A1B3,... etc. How does this generic output generally connect to my Design?
结果,我仅获得A1B1,A1B2,A1B3等的值。该通用输出通常如何连接到我的设计?
Didn't find a hint in the documentation. 在文档中找不到提示。 Neither for the choicemodelr libraray, nor the bayesm library (rhierMnlRwMixture) to which it is connected to.
选择模型库libraray或与其连接的Bayesm库(rhierMnlRwMixture)均不可用。 I hope you can help me with this one.
希望您能帮我这个忙。
Thanks in advance, Phil 预先感谢,菲尔
to illustrate this, some code and output: 为了说明这一点,一些代码和输出:
# loading neccesary librarys
library(bayesm)
library(MASS)
library(lattice)
library(Matrix)
library(ChoiceModelR)
library(XLConnect)
#DATENSATZ:
setwd("C:/DATA/CBC/") # set workingdirectory
.Workbook <- loadWorkbook("DataCBC-R2.xls")
data <- data.frame(readWorksheet(.Workbook, "DataCBC-R"))
remove(.Workbook)
#set parameter for calculation
R = 50000 #Total Iterations of the Markov Chain Monte Carlo
use = 100 #Iterations for Paramerter-Estimation
#Parameter of datainput
none = TRUE #TRUE, if the questionaire has a none-Option but is not coded in the data
xcoding = c(0,0,0,0,0,0,1,1) #0=nominal scale; 1=metric scale
#Parameter dataoutput
save = TRUE #TRUE saves the calculated parameters
keep = 500 #number of random parameter draws to save (thinnig Parameter)
mcmc = list (R=R, use=use)
options = list(none=none, save=save, keep=keep, restart=restart)
#final calculation of the betas
out = choicemodelr(data, xcoding, mcmc = mcmc, demos = demos, options = options, constraints = constraints)
Resp A1B1 A1B2 A1B3 A1B4 A2B1 A2B2 NONE 响应A1B1 A1B2 A1B3 A1B4 A2B1 A2B2无
001 -2,56 -6,54 -18,49 27,59 -1,74 1,74 -1,94 001 -2,56 -6,54 -18,49 27,59 -1,74 1,74 -1,94
002 -3,18 -6,52 -19,79 29,49 0,50 -0,50 -0,58 002 -3,18 -6,52 -19,79 29,49 0,50 -0,50 -0,58
Hope that piece of information helps. 希望这些信息对您有所帮助。 Let me know, if you need further information.
让我知道,如果您需要更多信息。
Here is the input data: 这是输入数据:
respondent choice-set stimulus Attr. Color Attr. Shape Choice
1 1 1 1 2 1
1 1 2 3 1 0
1 1 3 2 1 0
1 2 1 1 2 4
1 2 2 3 1 0
1 2 3 2 1 0
1 3 1 4 1 3
1 3 2 1 2 0
1 3 3 3 1 0
1 4 1 2 1 2
... ... ... ... ... ...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.