Hi,
I am trying to conduct some discrete choice experiments using Stata and Qualtrics, following the guidance issued by (Weber, 2021), https://journals.sagepub.com/doi/ful...urnalCode=ssce
In regards to the stages, I have successfully completed stages 1 and 2 in full:
1. Importing experimental design
2. Formatted the information to be displayed to respondents in choice tasks
However, I remain stuck on stage 3:
3. Place each element of the experimental design in a structured table so that the choice task is presented in a clear and pleasant way. Because this step has to be repeated for every choice task, the only viable approach is to create a loop that iterates over the choice tasks and automates the production of the survey questions.
I have set the formatting for the HTML tables but become stuck at the texdoc initialisation stage
I have independently created a text document titled DCE_WB.txt
However, when I run the following:
texdoc init DCE_WB.txt, replace
tex [[AdvancedFormat]]
forv n = 1/`=_N' { // = foreach line in the dataset
*Store the values in locals
local B = block[`n']
local C = choicetask[`n']
forv i = 1/3 {
forv j = 1/4 {
local header_`j': variable label A1_`j'
local A`i'_`j' = A`i'_`j'[`n']
}
I keep getting an iteration of Stata saying: (texdoc not initialized; nothing to do)
I have tried a few variations already, including before creating my own .txt file. Yet I remain stuck at this stage and can not progress. Any help would be much appreciated, thank you.
I am trying to conduct some discrete choice experiments using Stata and Qualtrics, following the guidance issued by (Weber, 2021), https://journals.sagepub.com/doi/ful...urnalCode=ssce
In regards to the stages, I have successfully completed stages 1 and 2 in full:
1. Importing experimental design
2. Formatted the information to be displayed to respondents in choice tasks
However, I remain stuck on stage 3:
3. Place each element of the experimental design in a structured table so that the choice task is presented in a clear and pleasant way. Because this step has to be repeated for every choice task, the only viable approach is to create a loop that iterates over the choice tasks and automates the production of the survey questions.
I have set the formatting for the HTML tables but become stuck at the texdoc initialisation stage
I have independently created a text document titled DCE_WB.txt
However, when I run the following:
texdoc init DCE_WB.txt, replace
tex [[AdvancedFormat]]
forv n = 1/`=_N' { // = foreach line in the dataset
*Store the values in locals
local B = block[`n']
local C = choicetask[`n']
forv i = 1/3 {
forv j = 1/4 {
local header_`j': variable label A1_`j'
local A`i'_`j' = A`i'_`j'[`n']
}
I keep getting an iteration of Stata saying: (texdoc not initialized; nothing to do)
I have tried a few variations already, including before creating my own .txt file. Yet I remain stuck at this stage and can not progress. Any help would be much appreciated, thank you.
Comment