Announcement

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

  • Ranked ordered logistic regression (rologit) problems

    Hello Statlaist

    I've some problems using the rologit command in Stata: I've collected data from a show in Italy, where each respondent has ranked the emotions (in dep var q1category_num) they tied to the show. Then I collected some background information about each respondent e.g. knowledge about the topic of the show (gknow), cultural consumption level (ccons) etc. I've converted the data in the long format, so that the 'norespondent' variable link each respondents rankings together. I want to estimate the influence of knowledge on how one ranks the emotions. I thought the rologit model would appropriate, but because there's no variation in all the independent variables within each respondent (it is a cross-sectional study) I cannot estimate the rologit. What do I do to estimate this function? I've converted the data into the long format to be able to have 1 dependent variable.

    Click image for larger version

Name:	Udklip.PNG
Views:	1
Size:	73.7 KB
ID:	1495361

  • #2
    It seems as if the only predictor you have is qlcategory_num. So, I think the command would be something like
    Code:
    rologit ranking_num i.qlcategory_num, group(norespondent)
    According to the helpfile, if you want to inquire into respondent-invariant predictors, you form interaction terms of them with the varying predictors.

    Comment


    • #3
      Hi Joseph,

      Thanks for your reply. So what I set out to do is to try to explain q1category_num with the predictor gknow (knwoledge) controlled for the rest of the variables. The norespondents variable is the grouping variable grouping together the alternatives ranked here. The ranking_num is just to see how order, but it is assumes by the rologit that it is ordered this way anyhow. What I'd like to do is to look for an between-group (respondents in this case) effect of the rankings - maybe there's another model more suited for this purpose? The problem to me, is to understand which model to use with a dependent variable that is nominal categories ranked-ordinally scaled?

      Comment


      • #4
        Originally posted by Soren Horndrup View Post
        What I'd like to do is to look for an between-group (respondents in this case) effect o[n] the rankings
        "According to the helpfile, if you want to inquire into respondent-invariant predictors, you form interaction terms of them with the varying predictors."

        Comment


        • #5
          I am still uncertain whether this model then makes much sense for my purpose. If I'd like to include a bunch of controls I'd end up with a lot a interactions, causing multicollinearity and making it hard for me to interpret the model...

          Comment


          • #6
            I can't help you about whether the general approach makes sense, but based on the title and contents of your original post you seemed to have settled on rologit. Have you tried it?

            .ÿ
            .ÿversionÿ15.1

            .ÿ
            .ÿclearÿ*

            .ÿ
            .ÿsetÿseedÿ`=strreverse("1495360")'

            .ÿ
            .ÿquietlyÿsetÿobsÿ250

            .ÿgenerateÿintÿpidÿ=ÿ_n

            .ÿ
            .ÿforvaluesÿiÿ=ÿ1/5ÿ{
            ÿÿ2.ÿÿÿÿÿÿÿÿÿgenerateÿbyteÿcontrol`i'ÿ=ÿruniform()ÿ>ÿ0.5
            ÿÿ3.ÿ}

            .ÿ
            .ÿgenerateÿbyteÿknowledgeÿ=ÿruniform()ÿ>ÿ0.5

            .ÿlabelÿdefineÿKnowledgesÿ0ÿGoodÿ1ÿExpert

            .ÿlabelÿvaluesÿknowledgeÿKnowledges

            .ÿ
            .ÿquietlyÿexpandÿ4

            .ÿbysortÿpid:ÿgenerateÿbyteÿitemÿ=ÿ_n

            .ÿ
            .ÿgenerateÿdoubleÿranduÿ=ÿruniform()

            .ÿisidÿrandu

            .ÿ
            .ÿbysortÿpidÿ(randu):ÿgenerateÿbyteÿrankÿ=ÿ_n

            .ÿ
            .ÿrologitÿrankÿc.(control?)##i.itemÿc.knowledge##i.item,ÿgroup(pid)ÿnolog
            control1ÿcontrol2ÿcontrol3ÿcontrol4ÿcontrol5ÿknowledgeÿomittedÿbecauseÿofÿnoÿwithin-pidÿvariance

            Rank-orderedÿlogisticÿregressionÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿÿÿÿÿ=ÿÿÿÿÿÿ1,000
            Groupÿvariable:ÿpidÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿgroupsÿÿ=ÿÿÿÿÿÿÿÿ250

            NoÿtiesÿinÿdataÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿObsÿperÿgroup:
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿminÿ=ÿÿÿÿÿÿÿÿÿÿ4
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿavgÿ=ÿÿÿÿÿÿÿ4.00
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿmaxÿ=ÿÿÿÿÿÿÿÿÿÿ4

            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿLRÿchi2(21)ÿÿÿÿÿÿÿ=ÿÿÿÿÿÿ12.46
            Logÿlikelihoodÿ=ÿ-788.2815ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿProbÿ>ÿchi2ÿÿÿÿÿÿÿ=ÿÿÿÿÿ0.9262

            ----------------------------------------------------------------------------------
            ÿÿÿÿÿÿÿÿÿÿÿÿrankÿ|ÿÿÿÿÿÿCoef.ÿÿÿStd.ÿErr.ÿÿÿÿÿÿzÿÿÿÿP>|z|ÿÿÿÿÿ[95%ÿConf.ÿInterval]
            -----------------+----------------------------------------------------------------
            ÿÿÿÿÿÿÿÿcontrol1ÿ|ÿÿÿÿÿÿÿÿÿÿ0ÿÿ(omitted)
            ÿÿÿÿÿÿÿÿcontrol2ÿ|ÿÿÿÿÿÿÿÿÿÿ0ÿÿ(omitted)
            ÿÿÿÿÿÿÿÿcontrol3ÿ|ÿÿÿÿÿÿÿÿÿÿ0ÿÿ(omitted)
            ÿÿÿÿÿÿÿÿcontrol4ÿ|ÿÿÿÿÿÿÿÿÿÿ0ÿÿ(omitted)
            ÿÿÿÿÿÿÿÿcontrol5ÿ|ÿÿÿÿÿÿÿÿÿÿ0ÿÿ(omitted)
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
            ÿÿÿÿÿÿÿÿÿÿÿÿitemÿ|
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ2ÿÿ|ÿÿ-.4728714ÿÿÿ.3018885ÿÿÿÿ-1.57ÿÿÿ0.117ÿÿÿÿ-1.064562ÿÿÿÿ.1188191
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ3ÿÿ|ÿÿ-.4217875ÿÿÿ.2988188ÿÿÿÿ-1.41ÿÿÿ0.158ÿÿÿÿ-1.007462ÿÿÿÿ.1638864
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ4ÿÿ|ÿÿ-.4479173ÿÿÿ.2998924ÿÿÿÿ-1.49ÿÿÿ0.135ÿÿÿÿ-1.035696ÿÿÿÿ.1398609
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
            ÿitem#c.control1ÿ|
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ2ÿÿ|ÿÿ-.0041206ÿÿÿ.2264133ÿÿÿÿ-0.02ÿÿÿ0.985ÿÿÿÿ-.4478826ÿÿÿÿ.4396414
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ3ÿÿ|ÿÿ-.2315427ÿÿÿ.2269485ÿÿÿÿ-1.02ÿÿÿ0.308ÿÿÿÿ-.6763535ÿÿÿÿ.2132681
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ4ÿÿ|ÿÿÿ.1404902ÿÿÿ.2259963ÿÿÿÿÿ0.62ÿÿÿ0.534ÿÿÿÿ-.3024543ÿÿÿÿ.5834347
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
            ÿitem#c.control2ÿ|
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ2ÿÿ|ÿÿÿ.1702194ÿÿÿ.2266677ÿÿÿÿÿ0.75ÿÿÿ0.453ÿÿÿÿÿ-.274041ÿÿÿÿ.6144799
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ3ÿÿ|ÿÿÿ.1007803ÿÿÿ.2283465ÿÿÿÿÿ0.44ÿÿÿ0.659ÿÿÿÿ-.3467706ÿÿÿÿ.5483312
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ4ÿÿ|ÿÿÿ.0441883ÿÿÿ.2260331ÿÿÿÿÿ0.20ÿÿÿ0.845ÿÿÿÿ-.3988285ÿÿÿÿÿ.487205
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
            ÿitem#c.control3ÿ|
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ2ÿÿ|ÿÿÿ.0480646ÿÿÿ.2292782ÿÿÿÿÿ0.21ÿÿÿ0.834ÿÿÿÿ-.4013123ÿÿÿÿ.4974416
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ3ÿÿ|ÿÿ-.0611784ÿÿÿ.2282258ÿÿÿÿ-0.27ÿÿÿ0.789ÿÿÿÿ-.5084928ÿÿÿÿÿ.386136
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ4ÿÿ|ÿÿ-.0554177ÿÿÿ.2278306ÿÿÿÿ-0.24ÿÿÿ0.808ÿÿÿÿ-.5019575ÿÿÿÿ.3911221
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
            ÿitem#c.control4ÿ|
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ2ÿÿ|ÿÿÿ.1148494ÿÿÿ.2275235ÿÿÿÿÿ0.50ÿÿÿ0.614ÿÿÿÿ-.3310885ÿÿÿÿ.5607874
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ3ÿÿ|ÿÿÿ.2306079ÿÿÿ.2271219ÿÿÿÿÿ1.02ÿÿÿ0.310ÿÿÿÿ-.2145429ÿÿÿÿ.6757587
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ4ÿÿ|ÿÿ-.0268236ÿÿÿ.2259349ÿÿÿÿ-0.12ÿÿÿ0.905ÿÿÿÿÿ-.469648ÿÿÿÿ.4160007
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
            ÿitem#c.control5ÿ|
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ2ÿÿ|ÿÿÿ.0919383ÿÿÿ.2276084ÿÿÿÿÿ0.40ÿÿÿ0.686ÿÿÿÿÿ-.354166ÿÿÿÿ.5380427
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ3ÿÿ|ÿÿÿ.1636866ÿÿÿ.2272714ÿÿÿÿÿ0.72ÿÿÿ0.471ÿÿÿÿ-.2817573ÿÿÿÿ.6091304
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ4ÿÿ|ÿÿÿ.0791843ÿÿÿ.2264784ÿÿÿÿÿ0.35ÿÿÿ0.727ÿÿÿÿ-.3647052ÿÿÿÿ.5230737
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
            ÿÿÿÿÿÿÿknowledgeÿ|ÿÿÿÿÿÿÿÿÿÿ0ÿÿ(omitted)
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
            item#c.knowledgeÿ|
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ2ÿÿ|ÿÿÿ.3688725ÿÿÿ.2321429ÿÿÿÿÿ1.59ÿÿÿ0.112ÿÿÿÿ-.0861193ÿÿÿÿ.8238642
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ3ÿÿ|ÿÿÿ.4858897ÿÿÿ.2347734ÿÿÿÿÿ2.07ÿÿÿ0.038ÿÿÿÿÿ.0257424ÿÿÿÿ.9460371
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ4ÿÿ|ÿÿÿÿ.414582ÿÿÿÿ.231909ÿÿÿÿÿ1.79ÿÿÿ0.074ÿÿÿÿ-.0399512ÿÿÿÿ.8691152
            ----------------------------------------------------------------------------------

            .ÿcontrastÿitem#c.knowledge,ÿnoestimcheck

            Contrastsÿofÿmarginalÿlinearÿpredictions

            Marginsÿÿÿÿÿÿ:ÿasbalanced

            ----------------------------------------------------
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿÿÿÿdfÿÿÿÿÿÿÿÿchi2ÿÿÿÿÿP>chi2
            -----------------+----------------------------------
            item#c.knowledgeÿ|ÿÿÿÿÿÿÿÿÿÿ3ÿÿÿÿÿÿÿÿ5.14ÿÿÿÿÿ0.1616
            ----------------------------------------------------

            .ÿ
            .ÿexit

            endÿofÿdo-file


            .

            Comment

            Working...
            X