Announcement

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

  • Fixed Effects Regression with Categorical Variable - Hausman and Spearman

    Hi all,

    I have a panel data that consists of multiple flight legs that can happen anytime within the month of January. I am using a grouping by flight legs arriving at a specific airport. For example, all flights arriving at Boston airport will be group 1 and all flights arriving to JFK will be group 2, etc. I basically have around 500 groups. I have a number of predictors that I want to use in a fixed-effects regression. Most of my predictors are continuous variables but I have one variable that I encoded as Categorical which is basically the size of the departure airport. I have two questions.

    2) I want to run the Hausman test to verify that I should use Fixed Effects instead of Random Effects. Can I run Hausman when I have a categorical Variable among my predictors? Because when I do, I get the following message "the rank of the differenced variance matrix (14) does not equal the number of coefficients being tested (15); be sure this is what you expect, or there may be problems computing the test. Examine the output of your estimators for anything unexpected and possibly consider scaling your variables so that the coefficients are on a similar scale."

    1) Can I run a Spearman correlation for all my variables to check for correlation? (even if some of my variables are continuous and some are categorical?



    Thank you!

  • #2
    Dear Stephanie,

    as far as I know for continous variables and a linear relationship you would have to use Pearson's correlation.

    Cheers
    Martin

    Comment


    • #3
      Stephanie:

      You are allowed to include any kind of explanatory variable in FE or RE estimation. But in FE estimation, any variable that is constant over time for every cross-sectional unit drops out. A variable indicating the size of an airport does not seem like it would vary over time. If it does, you can include it in FE as well as RE.

      I don't like to be the board cop, but you'll get a better answer if you show us what you typed in Stata and what Stata produced. For example, I know that if you included dummies at any level, those cause a singularity in the asymptotic variance -- like the message you're getting. It's one reason why I like the correlated random effects (now sometimes called "hybrid") approach. Plus, you can make the CRE approach fully robust to serial correlation and heteroskedasticity.

      Really, I could help more if you show output.

      Comment

      Working...
      X