Announcement

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

  • What's going on with the weights in cmrologit?

    Full information - I am new to choice models but I have a questions as to what is going on with the weights in cmrologit? I have a ranked choice conjoint with frequency weights but it looks like adding frequency weights (as opposed to probability weights) magically creates higher precision when adding identical weights usually has no effect. Also, I seem to get more precision for higher values of the weight. I could just call my frequency weights as probability weights, but that seems to be a weird solution.

    Thank you in advance.

    Kristen


    use https://www.stata-press.com/data/r17/evignet, clear
    cmset caseid, noalternatives
    gen weight1 = 1
    gen weight2 = 10
    cmrologit pref i.female age i.grades i.edufit i.workexp i.boardexp if job==1 [fw=weight1]
    cmrologit pref i.female age i.grades i.edufit i.workexp i.boardexp if job==1 [fw=weight2]
    cmrologit pref i.female age i.grades i.edufit i.workexp i.boardexp if job==1 [pw=weight1]
    cmrologit pref i.female age i.grades i.edufit i.workexp i.boardexp if job==1 [pw=weight2]

  • #2
    Note in your output that using a frequency weight of 10 increases the number of observations in your data from 80 to 800. More observations yield more precision.

    From the output of help weights

    Frequency fweights indicate replicated data. The weight tells the command how many observations each observation really represents. fweights allow data to be stored more parsimoniously. The weighting variable contains positive integers. The result of the command is the same as if you duplicated each observation however many times and then ran the command unweighted.
    Note that this result is not specific to cmrologit.

    Code:
    . sysuse auto, clear
    (1978 automobile data)
    
    . gen weight1 = 1
    
    . gen weight2 = 9
    
    . mean price [fw=weight1]
    
    Mean estimation                             Number of obs = 74
    
    --------------------------------------------------------------
                 |       Mean   Std. err.     [95% conf. interval]
    -------------+------------------------------------------------
           price |   6165.257   342.8719      5481.914      6848.6
    --------------------------------------------------------------
    
    . mean price [fw=weight2]
    
    Mean estimation                            Number of obs = 666
    
    --------------------------------------------------------------
                 |       Mean   Std. err.     [95% conf. interval]
    -------------+------------------------------------------------
           price |   6165.257   113.6011      5942.197    6388.317
    --------------------------------------------------------------
    
    .
    Last edited by William Lisowski; 08 Jun 2022, 12:15.

    Comment


    • #3
      And there you have it - thank you!

      Comment

      Working...
      X