Announcement

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

  • binary choice model after collapse

    is it possible to use binary choice models to predict pr(y|x) after collapsing the data by group?
    ​​​​​​
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float(group individual y x)
    1  1 1 8
    1  2 1 9
    1  3 0 7
    1  4 1 7
    1  5 1 8
    1  6 1 5
    1  7 0 4
    1  8 0 5
    1  9 1 8
    1 10 1 9
    2 11 0 7
    2 12 0 5
    2 13 1 8
    2 14 0 3
    2 15 0 4
    2 16 0 5
    2 17 1 4
    2 18 1 9
    2 19 0 4
    2 20 0 5
    end

  • #2
    I don't fully understand, but I think you want a grouped version of logit (or probit); Stata used to have specific programs for this (e.g., -blogit) but now recommends glm - here is some info from one of the help files (help blogit): "Logistic and probit models for grouped data can be fit via maximum likelihood estimation using glm if pos_var is specified as the dependent variable and the family(binomial pop_var) option is specified, where pos_var and pop_var are defined as below. For a logistic model, specify the link(logit) option. For a probit model, specify the link(probit) option."

    Comment


    • #3
      If you collapse by group, what then happens to x?

      If you don't collapse, and you really just have one observed choice per person (given in y), and a is some continuous covariate, this reduces to simple logistic regression.

      Comment


      • #4
        thank you Rich Goldstein for pointing me in the right direction. thank you for your input Leonardo Guizzetti, I did a poor job describing the data - there are multiple choices per person.
        Last edited by Øyvind Snilsberg; 14 Sep 2022, 00:17.

        Comment

        Working...
        X