Announcement

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

  • Autocovariance without time series data

    Hi,
    I am working with a large dataset of student grades and am trying to create a regression model that shows the effect of each school on a certain grade.
    The regression model should be something like this:

    grade = school1 + school2 + school3 + ... + schooln

    Each schooln variable is a binary dummy that equals 1 if the observed student belongs to schooln.

    I have over 800 schools, so creating such a model manually is not an option.
    I understood that the autocovariance function may be related to this issue, but seems to be designed for time series data.
    Is there any way to run this regression model automatically without specifiying each school group variable?
    Thanks.

  • #2
    I'm not clear what autocovariance you're thinking of. You say you already have school dummies, and it seems all you are trying to do is include them in your model. If so, all you need is a wildcard to specify the school variables collectively, something like:
    Code:
    regress grade school*
    or am I not understanding your problem?

    Comment


    • #3
      I don't have school dummies, I have a categorical variable with a different number for each school. Is there a way to automatically generate 800+ dummy variables from categorical variables?

      Comment


      • #4
        Yes, that is easy. You would need to do something like
        Code:
        regress grade i.school
        assuming school is the categorical variable that specifies the school. See also
        Code:
        help fvvarlist

        Comment

        Working...
        X