Announcement

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

  • How to do a logistic regression for the industry ?

    Hello, as part of my school studies I'm looking to see if the type of industry has an influence on the probability of being targeted by an activism campaign.
    I have a sample of companies that have not been targeted and others that have been targeted (differentiated with a dummy variable) and I have the industry for each company.
    I'm looking for the best way to test this hypothesis, apparently I have to do either logistic regression or use an OLS estimator. However, I'm having trouble integrating it into stata as my industry variable is categorical.

    If you have any suggestions, I'd love to hear from you.
    thanks

  • #2
    Welcome to Statlist forum.

    In case if you are not aware, see this: https://www.statalist.org/forums/help#adviceextras. Homework problems are usually not answered. Particularly the types that are akin to "I was told this, how to do it?" questions because they are deemed low-effort posts. If you do wish to get useful response, try to show us what you have tried, and make the question very specific, and only that you may be able to get some feedback. Also, read the FAQ (http://www.statalist.org/forums/help) on how to ask a specific question by providing codes that you tried, sample data, and error message you received, etc.

    I can suggest two paths to explore.

    1) Regression models in Stata can easily incorporate categorical predictors. In Stata, type help fvvarlist to learn more.

    2) If you received an error like "string variables may not be used as factor variables" then it's because your industry variable was input as word (string), which is not an accepted as independent variable.Type help encode and learn how to use this command to create a numeric, labeled version of the industry variable.

    Comment

    Working...
    X