Announcement

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

  • Regression Conditional on Lagged values and ranges

    For example, (start date) (end date)
    ID /YEAR /BECAMECEO/ LEFTCEO

    00003| 1992 | 01dec1986 | 31dec1998
    00003| 2001 | 01apr2000 | 30oct2009


    For ID 00003, she worked twice during (01dec1986 - 31dec1998 & 01apr2000 - 30oct2009) and dates within this period are included in three recession ranges as shown below (i.e. recession ranges of (1) July 1990-March 1991 / (2) March 2001 to Nov 2001/ and (3) dec 2007 to June 2009)

    1). I want to make a code that if ID 00003's independent variable X was above the median before the recession in year of 1986- 1989, what is the Y value after the recession years in 1992-1998? Conditional on X is above the median before the second recession range years in 2000, what is the Y value after the recession years in 2002-2007?
    That is to test the difference of y value after the recession period , conditional on above and below med value of x before the recession (two groups)

    In my data, there are thousands of IDs and millions of YEARs, Xs, and there are 15 ranges of recessions as lists below. so some ID's work duration includes multiple recessions (For example start date before recession 3 and end date after recession7). So when you help me coding, Don't specify the year from above example and use GENERAL CODE that applies to any number "i" instead for specific year.

    local recession1 August 1929 March 1933
    local recession2 May 1937 June 1938
    local recession3 February 1945 October 1945
    local recession4 November 1948 October 1949
    local recession5 July 1953 May 1954
    local recession6 August 1957 April 1958
    local recession7 April 1960 February 1961
    local recession8 December 1969 November 1970
    local recession9 November 1973 March 1975
    local recession10 January 1980 July 1980
    local recession11 July 1981 November 1982
    local recession12 July 1990 March 1991
    local recession13 March 2001 November 2001
    local recession14 December 2007 June 2009
    local recession15 February 2020 April 2020



    2) Also, since this person experienced multiple recession during her ceo tenure, I want to test the effect of recent vs past experience. Regression test whether Y value is different between 'after the recent recession range ( March 2001 to Nov 2001), so Y values during in 2002 to 2007', compared to 'after the past recession range.(July 1990-March 1991), so the y value during 1992-1998'
    Last edited by BB Kim; 20 Feb 2023, 17:25.
Working...
X