Stata - How to conduct OLS regressions

Поділитися
Вставка
  • Опубліковано 20 січ 2025

КОМЕНТАРІ • 18

  • @damiainwhite4984
    @damiainwhite4984 3 роки тому +2

    How would you answer a question, which asked to find the relationship between two variables, and how that relationship depends on another independent variable? For example, what effect does the proportion of female workers have on firm performance, depending on education levels of the female?

    • @SteffensClassroom
      @SteffensClassroom  3 роки тому +2

      Dear Damiain
      Thank you for your question!
      The easiest answer I can get you is to watch any lecture 1 of my research methods in Finance course on this channel. There I address 'this' question.
      Have a great day!

    • @damiainwhite4984
      @damiainwhite4984 3 роки тому +2

      @@SteffensClassroom Perfect, will have a look at the lecture. Thanks for your help.

    • @SteffensClassroom
      @SteffensClassroom  3 роки тому +1

      You're welcome!

  • @thehappyloaf
    @thehappyloaf Рік тому +1

    Is it possible to perform stepwise regression on stata?

    • @SteffensClassroom
      @SteffensClassroom  Рік тому

      Possible for sure. However, I didn't cover it yet :)

    • @thehappyloaf
      @thehappyloaf Рік тому

      @@SteffensClassroom is there another morr robust way to perform the regression? I have a hundred independents and I'm sure there will be multicollinearity so how do I ensure the model drops the variables it needs to? Without iterating myself

    • @SteffensClassroom
      @SteffensClassroom  Рік тому +1

      ​@@thehappyloafStat will automatically drop variables that are perfectly colinear. However, if you have that many variables, you want to look into ways of reducing this number in order to save degrees of freedom, and overall simplify your model. Factor analysis, principle component analysis or another summary index technique.

    • @thehappyloaf
      @thehappyloaf Рік тому +1

      @@SteffensClassroom Thank you! I will look into these techniques

  • @FemkeHuisman
    @FemkeHuisman 3 роки тому

    If you add a dummy variable to a regression (not in the way you showed with foreign==1), should you always put i. in front of it?

    • @SteffensClassroom
      @SteffensClassroom  3 роки тому +1

      In short: You don't have to.
      You can obtain the same via generate as with i.
      www.stata.com/support/faqs/data-management/creating-dummy-variables/
      Related to this: Stata handles factor variables quite nicely, as you can read more about here: www.stata.com/features/overview/factor-variables/
      I should make a video soon dedicated just to dummy variables and factor variables.

    • @FemkeHuisman
      @FemkeHuisman 3 роки тому

      @@SteffensClassroom Thank you. I have one more question, regarding descriptive statistics. If I make a table, I get different "N's" (number of observations) for different variables. Does this matter, and if yes, how can I get the sample to only show the lowest N so that only actual observations are included? I do not want to drop things I shouldn't....

    • @SteffensClassroom
      @SteffensClassroom  3 роки тому

      Say you run a regression, then Stata uses list-wise deletion by default. That is, if an observation in your dataset has a missing value for one or more of your variables, then it is not 'included' in your regression.
      Somebody can correct me if I am wrong, but don't delete anything if you don't have to, and if you do, clearly document it. Always be as transparent as possible!

    • @FemkeHuisman
      @FemkeHuisman 3 роки тому

      @@SteffensClassroom Yes, for the regression that is true. But now I'm only making a descriptive statistics table! So there, for example, one variable has n = 773, whereas another has n=835. I would like them to all have the same (so, lowest) number!

    • @FemkeHuisman
      @FemkeHuisman 3 роки тому

      Or does it not matter for a descriptive statistics table?