Announcement

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

  • Regression

    Hello everybody,
    I have a problem with my regression within STATA.
    I have a longitudinal dataset of companies with data for each company for the years 2010-2016.
    I have an dependent Variable that counts the number of an action within a year and a IV that is binary and tell me if IV=0 position not existing & 1=position existed in this year. I want to regress my dependent & independent variable with the "reg" command (as it was told me by me Prof to do) with controle variables, fixed effects for the company (ds_code), year, industry (SIC) & a potential moderator size of the board or IT_exp of the person in the position ( 0 & 1).
    My first thought was to make a general reg between DV & IV and it worked just fine. Than I thought of just putting everything I mentioned into the regression like "reg DV IV cv1 cv2 cv3 IV##size IV##IT i.ds_code i.year i.sic
    Output of this regression is not very useful so i guess I made huge mistakes in my regression so is putting all variables in the regression the wrong way? Do i have to check for moderating effects seperated? Why are many of my IV observations omitted?
    I dont really know how to solve this problem due to the fact that in the internet everybody suggest to run regression with commands like xstset or xtreg or smth. like this but I have been told to use reg with FE i...

  • #2
    I am not sure if I understand your question, but is there any variation in industry within ds_code? If companies don't change industry during the time period in question, the regression is undefined. What about the other variables? They need variation within company over time too.

    Comment


    • #3
      Jan:
      of you were told to run a regression on a panel dataset with a -fe- specification and a continuous regressand, you were implicitly pointed out to -xtreg,fe-.
      As Daniel helpfully highlights, the -fe- estimator needs a good level of within-panel variation for time-varying variables (and wipes out time-invariant variables).
      In addition:
      1) your -regress- code is not correct, as it does not take into acoount the panel caractheristic of your dataset (that is, within-pane observations are not independent);
      2) please note that -xtreg- is the way to go when you have panel datasets with a continuous regressand;
      3) you state that you have a count dependent vaiable, that usually call for -poisson- regression, though.
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        If the counts are small, then xtpoisson with robust errors (thus getting rid of the mean=var assumption).

        discussion here.
        HTML Code:
        https://www.statalist.org/forums/forum/general-stata-discussion/general/1495632-specifying-different-fixed-effects-fe-with-xtpoisson

        Comment

        Working...
        X