Announcement

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

  • Assess the effect of independent variables on Share price, before, during and after Covid19

    Hey, Hope this finds all well,

    I want to ask, I have panel data for 5 years (2018-2022), and for than one independent variables that affect the share price (Y) of some companies,
    The study I try to analyze for, aim to know the effect for each independent variables on share price before Covid19 (2018+2019), during (2020), and after Covid19 (2021+2022),

    I tried to use lags and leads but the analysis stays for the 5 years, I want to make just 3 indicators of time (Before, during, and after Corona) with detailed effect for each independent variable, how could I do this?

  • #2
    Something like this:
    Code:
    xtset panel_var // REPLACE panel_var WITH THE NAME OF YOUR PANEL VARIABLE
    gen byte era = 1 if year <= 2019
    replace era = 2 if year == 2020
    replace era = 3 if year > 2020 & !missing(year)
    xtreg Y i.era##(independent_variables), fe
    margins era, dydxd(independent_variables)
    In this code, replace independent_variables by the list of your independent variables, and in that list make sure you prefix c. in front of all of the continuous ones. Prefix i. in front of all of the discrete ones. (If you are not familiar with this i./c. notation, see -help fvvarlist-.)

    By the way, I think most epidemiologists would question your classification of year 2021 as being post-covid. The epidemic was still running very strong, with high mortality, during much of that year. Indeed, from the perspective of incident cases of the disease, the epidemic is still ongoing, and quite strong. In fact, the current peak of incidence is the second largest of the entire pandemic so far. All that has changed is that the combination of vaccine-induced and natural immunity has risen to the point where the mortality from Covid is considered more acceptable than the consequences of further attempts to suppress transmission.

    Comment

    Working...
    X