簡體   English   中英

如何在R中解釋choicemodelr(rhierMnlRwMixture)的輸出

[英]How to interpret the output of choicemodelr (rhierMnlRwMixture) in R

我的問題

我剛剛開始使用R庫“ choicemodelr”,並成功獲得了一些beta值作為解決方案。 但是我不知道如何將這些值分配給特定的屬性級別。 結果,我僅獲得A1B1,A1B2,A1B3等的值。該通用輸出通常如何連接到我的設計?

在文檔中找不到提示。 選擇模型庫libraray或與其連接的Bayesm庫(rhierMnlRwMixture)均不可用。 希望您能幫我這個忙。

預先感謝,菲爾

為了說明這一點,一些代碼和輸出:

我在R中的代碼

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


我得到以下輸出(節選):

響應A1B1 A1B2 A1B3 A1B4 A2B1 A2B2無
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


希望這些信息對您有所幫助。 讓我知道,如果您需要更多信息。

這是輸入數據:

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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM