Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Plot coefficients from Conjoint Analysis

    Hello Statalist,

    I want to plot the coefficients of a conjoint analysis like the graph I put before. I know that I can use the coefplot command, but my problem is that I want to plot the coefficient of different regressions (that are the different rounds from the conjoint) in one graph, with the number of each round in the x-axis.


    Thanks for the help!


    Source: Bansak, K., Hainmueller, J., Hopkins, D. J., & Yamamoto, T. (2018). The number of choice tasks and survey satisficing in conjoint experiments. Political Analysis, 26(1), 112-119.
    Click image for larger version

Name:	Captura de Pantalla 2022-03-03 a la(s) 17.20.15.png
Views:	1
Size:	31.7 KB
ID:	1652882

  • #2
    Dear Benjamin,

    I assume that you refer to the user community contributed package conjoint, which can be installed together with example dta and do files using:
    Code:
    * Setup
    cd "" // enter in between "" your personal system drive and folder
    pwd // check
    
    * Install conjoint
    net describe conjoint, from(http://fmwww.bc.edu/RePEc/bocode/c)
    net install conjoint
    net get conjoint
    h conjoint
    In the help file, read Example 2 and use the refugee_return_conjoint.do file to run it.
    This guides you how to save the required data into a matrix and use that to create various plots using coefplot.
    Actually, using matrices makes it possible to plot basically everything (special) with coefplot.

    I am not knowledgeable about conjoint, the package or the method.
    So, I suggest that you write the author of conjoint, Michael J. Frith, if it is possible to save coefficients from 'the different rounds from the conjoint' into matrices.
    If so, you can combine (parts of) such matrices into your final matrix and use that to create your plot using coefplot.

    And, please do post here as follow up some example data and code, once you have got all of this working.

    Best
    http://publicationslist.org/eric.melse

    Comment


    • #3
      Dear Eric,
      Thank you for showing the use of 'net describe, net install, net get '. It installed additional data files.
      I could open an example file in it, but I had a hard time loading an additional .do file. I couldn't find it on my local drive, actually.
      Would you advise me how I can find it? or, what is the usual folder Stata save .Do files as default?
      Chul

      "For a second example using conjoint, we can use a refugee return conjoint experiment dataset
      (Ghosn et al., 2021a) as analysed in Ghosn et al., (2021b). This dataset, included as an
      ancillary file (refugee_return_conjoint.dta) with accompanying do file
      (refugee_return_conjoint.do),... "

      Comment


      • #4
        Dear Chul,

        That is why I included in #2 the code under
        * Setup
        You can always check which folder (drive, directory) Stata is using with this command:
        Code:
        pwd
        I have folders on my own system to store do files, zip files, pdf files etc. sorted by subject.
        So, for this example that is :
        Tutorial CJA Conjoint Analysis
        and the full path on my system is
        G:\D_Stata17\Tutorial CJA Conjoint Analysis
        So, before I would install ANCILLARY FILES , I first change the current working folder that Stata uses to that folder, like:
        Code:
        cd "G:/D_Stata17/Tutorial CJA Conjoint Analysis"
        pwd
        Being overtly cautious, I always check if the change was succesfull (but Stata reports that anyway in the result window).
        You only have to include your own folder etc. in between the "" in the first line under *Set up" and run that BEFORE you install the ANCILLARY FILES as to save them in that folder.
        http://publicationslist.org/eric.melse

        Comment


        • #5
          Dear Eric,
          I did not know what that 'setup' part is for. Now I can see.
          I successfully downloaded both Stata data and .DO files. Thank you for your kind explanation.
          regards,
          Chul

          Comment

          Working...
          X