Announcement

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

  • Cross-Sectional - Firm level data with macroeconomic data

    Hi all,

    Apologies for the statistics element of the question, I know that is to be refrained from on the forum, but much searching has not led me to a conclusive answer for my case.

    I have an independent variable, Investor Sentiment (ISdummy) with quarterly data, as I do with firm-level data (and control variables). I will have multiple firms at the same date with different cash (w_cash_scaled), but experiencing the same investor sentiment. Is this a problem in terms of it being cross-sectional data, and if so how can I fix it? Example of data below.

    Code:
    * Example generated by -dataex-. To install: ssc install dataexclearinput int
    
    date float(ISdummy w_cash_scaled w_leverage w_rd_scaled w_capex_scaled)
    
    10500 1  .3983854 .015093016  .04808705 .005616006
    10500 1 .13418292   .1874063  .02023988 .014430285
    10500 1 .21418872  .14277571 .033627816  .06596483
    10500 1  .6384858   .1875079  .10942716 .033312302
    10500 1 .08196511  .29656234  .03232427 .010261673
    
    endformat %d date

  • #2
    Apologies for the statistics element of the question, I know that is to be refrained from on the forum, but much searching has not led me to a conclusive answer for my case.
    No apologies needed. While there is a preference for questions that deal specifically with doing statistics in Stata, general statistical questions are welcome, too.

    Your question is unclear, however. And your question refers to a variable, date, which does not appear in your example, so your example fails to shed light on the question. I do think that the answer will depend on what it is you plan to do with this data. The occurrence of multiple observations for the same entity on the same date and the same value of investor sentiment would be a non-issue for some kinds of analyses and could be lethal for others. So you need to provide more information.

    Comment


    • #3
      Hi Clyde,

      You're right here's more information. So the first column is indeed the date, but in Stata's internal format since I will not need to reference to it. In terms of investor sentiment I have generated a dummy to distinguish whether it is positive or negative. What I hope to infer is whether or not positive/negative investor sentiment affects the cash holdings of firms in general. (w_cash_scaled).

      Comment


      • #4
        Well, again, it depends on how you plan to analyze this. One thing is important in any analysis: there must be some variation in your independent variable if you are going to try to associate it to an outcome. It doesn't necessarily have to vary within the same firm on the same date, but it must vary within firms over dates, or between firms on specific dates. Your data example shows no variation, but it is clearly a very small subset of your data.

        The particular analysis may impose additional requirements. For example, if you are going to do a fixed-effects regression with both firm and date fixed effects, then any firm-date where the independent variable is constant will contribute no information to the regression. A random-effects model would be somewhat tolerant of that, however.

        Finally, I don't quite understand why you have multiple observations of the same firm on the same date. I have no expertise in finance, but do firms typically re-measure their cash holdings several times a day? And do they typically re-measure their leverage position several times a day? (I suppose I could ask the same question about capex, whatever that is.)

        Also, if it is usually (and certainly if it is always) the case that the independent variable is constant for all observations of a given firm on a given date, then it may not make sense to think of it as a predictor of something that varies moment to moment. The implication would be that all of the variation in the dependent variable within a given firm date is just noise. If that is the case, it might be more sensible to aggregate the data to a single observation per firm-date, perhaps by averaging the values of the variables, or in some other way that makes sense. This really gets down to issues of content, which I cannot advise you about.

        Comment


        • #5
          Perhaps dataex wasn't the best approach in this case, here's a mock up below. Each row represents a firm on a given date. There will be the same firms on different dates. My independent variable does vary between 0 and 1 over the dataset, but it will be consistent for each date. I need to ensure my data is cross-sectional, to do this do I need to do something like collapse cash or is it ok the way it is?

          Date Firm Sentiment dummy Cash
          30/09/1990 Firm A 1 0.33
          30/09/1990 Firm B 1 0.14
          30/09/1990 Firm C 1 0.22
          31/12/1990 Firm A 0 0.19
          31/12/1990 Firm B 0 0.38
          31/12/1990 Firm C 0 0.05
          Last edited by Toby Jones; 25 Apr 2018, 03:56.

          Comment


          • #6
            If your independent variable is constant within each date across all firms, as is the case in the data in #5, then you will not be able to include time fixed effects in a model. But it is otherwise usable as is.

            Comment


            • #7
              Perfect thank you Clyde.

              Comment

              Working...
              X