Announcement

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

  • Analyzing Ranking

    Dear Statlist,

    I have a problem of analzying my data.

    I have given my participants 4 specific contracts for insurance. The partcipiants were then asked to rank these insurance contracts (1 = the most preferd 4 = the least prefered).

    I've already put the data in the long format which looks like these
    ID Insurance Ranking Typ of insurance contract Gender
    1 4 1 1
    1 2 2 1
    1 1 3 1
    1 3 4 1
    2 1 1 0
    2 4 2 0
    2 3 3 0
    2 2 4 0
    ID = respondent with a unique identification number
    Insurance ranking = ranking done by the participants
    Typ of insurance contract = 4 different contract typs offered
    Gender = 1, male; 0, female as an example for invariant independent variables.

    I tried the -rologit- command, however the helpfile states that for invariant variables interactions terms needed, which of course gender is.
    So how do I establish these interaction terms? I know i need the # between the two variables, but I was not able to this do.

    Or far more general:

    Is -rologit- the right choice if I want to analyze the effect of gender on the ranking?

    Thank you very much in advance!
    MM

  • #2
    First, you will have to create alternative specific constants (ASCs) for different types of insurance contracts: say, asc1 that equals one for contract type 1 and zero elsewhere, asc2 that equals one for contract type 2 and zero elsewhere, and so on.

    Next, you fit the -rologit- model. Your list of independent variables should include any three out of the four ASCs (say, asc2 asc3 and asc4), and interaction terms between each of the three included ASCs and the gender dummy. The coefficients on each ASC and associated interaction terms can be interpreted similarly to how you normally interpret -mlogit- coefficients for a particular outcome category.

    The -rologit- model is to rank-orderded data what -clogit- and -mlogit- models are to multinomial choice data. If you think -clogit- or -mlogit- is "the right choice" to analyse the effects of gender on choice probabilities, -rologit- is the right choice by default.
    Last edited by Hong Il Yoo; 27 Mar 2020, 04:20.

    Comment


    • #3
      Marius Michels, what version of Stata are you using? When I type -help rologit-, I see this at the top of the window that pops up:

      Code:
          rologit has been renamed to cmrologit.  rologit continues to work but, as of Stata
          16, is no longer an official part of Stata.  This is the original help file, which
          we will no longer update, so some links may no longer work.
      --
      Bruce Weaver
      Email: [email protected]
      Web: http://sites.google.com/a/lakeheadu.ca/bweaver/
      Version: Stata/MP 18.0 (Windows)

      Comment


      • #4
        Bruce Weaver
        Oh I am sorry I forgot that information. I am using STATA 14.2


        @Hong II Yoo
        Can you provide me some information or a link on how to create the ASCs and do the procedure with the interactions terms in STATA.
        That would really help me out.


        Thank you to both of you for reading my question and answering to my problem.

        Comment


        • #5
          Marius Michels: -help tabulate-, -help generate- and -help rologit-.

          Comment


          • #6
            Hong Il Yoo

            I am aware of these helpfile..still I was not able to so this.

            Could you show me in my table i already posted how the asc should look like.

            Is it for each contract a separate Dummy?
            ID insurance ranking insurance typ asc1 asc2 asc3 asc4 gender age
            1 4 1 1 0 0 0 1 20
            1 2 2 0 1 0 0 1 20
            1 3 3 0 0 1 0 1 20
            1 1 4 0 0 0 1 1 20
            2 3 1 1 0 0 0 0 22
            2 2 2 0 1 0 0 0 22
            2 1 3 0 0 1 0 0 22
            2 4 4 0 0 0 1 0 22
            And then I create Interactions like asc2#gender asc3#gender asc4#gender? And then Same for age?

            My command would look like this:

            rologit insuranc ranking asc2 asc3 asc4 asc2#gender asc#3gender asc4#gender asc2#age asc3#age asc4#age, group(ID) reverse

            This wont work. I am sorry if this is a stupid question.

            Thanks in advance.
            Last edited by Marius Michels; 27 Mar 2020, 16:08.

            Comment


            • #7
              "insurance ranking": Stata does not allow a gap in a variable name.

              Comment


              • #8
                Originally posted by Hong Il Yoo View Post
                "insurance ranking": Stata does not allow a gap in a variable name.
                I am sorry. In my original file there are no spaces. I was just pointing towards my table as an example.

                Still I do not get any results...just Iterations which dont stop.

                But the data format should be right now?



                Comment


                • #9
                  Could you try to prefix dummies by i. and continuous variables by c., as in this example?

                  https://www.stata.com/features/overv...tor-variables/

                  Comment


                  • #10
                    Marius, other members will be more likely to help if you follow the advice in the FAQ about using -dataex- to generate your sample data. For the table you posted above, for example, the command would be:

                    Code:
                    dataex ID-age
                    To make that command appear as code, I highlighted that line and clicked on the # button on the toolbar.

                    Here is the output when I run that command on your data table:

                    ----------------------- copy starting from the next line -----------------------
                    Code:
                    * Example generated by -dataex-. To install: ssc install dataex
                    clear
                    input float(ID insrank instype asc1 asc2 asc3 asc4 gender age)
                    1 4 1 1 0 0 0 1 20
                    1 2 2 0 1 0 0 1 20
                    1 3 3 0 0 1 0 1 20
                    1 1 4 0 0 0 1 1 20
                    2 3 1 1 0 0 0 0 22
                    2 2 2 0 1 0 0 0 22
                    2 1 3 0 0 1 0 0 22
                    2 4 4 0 0 0 1 0 22
                    end
                    ------------------ copy up to and including the previous line ------------------

                    If you have the most recent version of Stata, -dataex- is already included, and you can ignore the info about installing it.

                    HTH.

                    --
                    Bruce Weaver
                    Email: [email protected]
                    Web: http://sites.google.com/a/lakeheadu.ca/bweaver/
                    Version: Stata/MP 18.0 (Windows)

                    Comment

                    Working...
                    X