Pyrite | Level 9

## Cross Sectional Regression vs Panel Data

I am trying to regress returns as my dependent variable on forecast errors. My dependent variable is returns between announcement dates for company earnings (RET2). My independent variables are POST92 which is an indicator variable equal to 1 if the year is greater than or equal to 1992, SUE1 (earnings surprise based on GAAP earnings), SUE3 (earnings surprise based on analyst forecast). Could someone explain the difference between a cross sectional and pooled time series regression.
1. What is the SAS command for a cross sectional regression:
RET2- independent variable

POST92 sue3 sue3*post92 sue1 sue1*post92 - dependent variables

2. How can I create variables sue3*post92 and  sue1*post92 which are multiplication of two other variables?

3. What is the SAS command for a panel data regression. My observations are quarterly earnings  but they are on different dates so I am not sure whether the panel should be daily or quarterly.

4. Which regression should I use if my dependent variable is returns between announcement dates- cross sectional or time series pooled?

Thank you!

``````data SUECARS;
infile datalines dsd truncover;
input GVKEY:\$6. LPERMNO:32. TICKER:\$6. RDQ:DATE9. fqenddt:DATE9. FYEARQ:F6. FQTR:F4. sue1:PERCENT7.4 sue2:PERCENT7.4 sue3:PERCENT7.4 numest:32. SUM1:11.6 daysSUM1:32. SUM2:11.6 daysSUM2:32. RET1:32. n1:32. RET2:32. n2:32. date:DATE9. POST92:32.;
format RDQ DATE9. fqenddt DATE9. FYEARQ F6. FQTR F4. sue1 PERCENT7.4 sue2 PERCENT7.4 sue3 PERCENT7.4 SUM1 11.6 SUM2 11.6 date DATE9.;
label GVKEY="S&P Identifier" LPERMNO="CRSP Identifier" TICKER="Historical Ticker" RDQ="Report Date of Quarterly Earnings" fqenddt="Calendar date of fiscal period end" FYEARQ="Fiscal Year" FQTR="Fiscal Quarter" sue1="Earnings Surprise GAAP" sue2="Earnings Surprise GAAP (Proprietory)" sue3="Earnings Surprise (Analyst Forecast-based)" numest="Number of analyst forecasts used in Analyst-based SUE" SUM1="Summed ret around EAD (-1,+1)" daysSUM1="Actual days used in SUM1 calculation" SUM2="Summed ret between Consequent EADs" daysSUM2="Actual days used in SUM2 calculation" RET1="Compouned ret around EAD (-1,+1)" n1="Actual days used in compound_ret calculation" RET2="Compounded ret between Consequent EADs" n2="Actual days used in compound_ret2 calculation";
datalines4;
001004,54594,AIR,19DEC1985,30NOV1985,1985,2,(4.04%),(4.04%),.656%,1,0.040481,3,0.343975,62,0.0406091355,3,0.3825624894,62,,0
001004,54594,AIR,21MAR1986,28FEB1986,1985,3,(1.74%),(1.74%),.096%,2,0.117174,3,0.077125,73,0.119760474,3,0.0646390369,73,,0
001004,54594,AIR,16DEC1986,30NOV1986,1986,2,(1.70%),(1.70%),.128%,1,-0.014972,3,0.266057,65,-0.015075377,3,0.2893380667,65,,0
001004,54594,AIR,23MAR1987,28FEB1987,1986,3,(1.62%),(1.62%),(.025%),2,0.039874,3,0.051043,77,0.0403225812,3,0.0396624512,77,,0
001004,54594,AIR,14JUL1987,31MAY1987,1986,4,(1.79%),(1.79%),(.025%),2,-0.014058,3,0.153172,48,-0.014925372,3,0.1526717556,48,,0
001004,54594,AIR,22SEP1987,31AUG1987,1987,1,(1.20%),(1.20%),.100%,2,-0.003256,3,-0.331950,59,-0.00330033,3,-0.333362278,59,,0
001004,54594,AIR,16DEC1987,30NOV1987,1987,2,(1.12%),(1.12%),(.120%),1,0.001222,3,0.400315,62,-7.43655E-10,3,0.456623802,62,,0
001004,54594,AIR,17MAR1988,29FEB1988,1987,3,(.716%),(.716%),.048%,3,0.074873,3,0.105421,85,0.0752688161,3,0.0903260211,85,,0
001004,54594,AIR,20JUL1988,31MAY1988,1987,4,(.654%),(.654%),.119%,3,-0.004651,3,0.016724,43,-0.004651163,3,0.0083196388,43,,0
001004,54594,AIR,21SEP1988,31AUG1988,1988,1,(.721%),(.721%),.000%,6,0.019442,3,-0.057984,59,0.0195121953,3,-0.063284312,59,,0
001004,54594,AIR,15DEC1988,30NOV1988,1988,2,(.871%),(.871%),(.043%),5,0.053661,3,0.115533,63,0.0543478267,3,0.1077597187,63,,0
001004,54594,AIR,20MAR1989,28FEB1989,1988,3,(.766%),(.766%),(.019%),2,-0.071117,3,0.197146,82,-0.069565216,3,0.2036818634,82,,0
001004,54594,AIR,20SEP1989,31AUG1989,1989,1,(.549%),(.549%),.029%,3,0.040741,3,-0.015713,61,0.0407407396,3,-0.025196124,61,,0
001004,54594,AIR,18DEC1989,30NOV1989,1989,2,(.717%),(.717%),(.085%),3,-0.021494,3,-0.146206,53,-0.021428572,3,-0.151215842,53,,0
001004,54594,AIR,07MAR1990,28FEB1990,1989,3,(.947%),(.947%),(.225%),6,-0.088917,3,-0.334856,72,-0.094488186,3,-0.299250129,72,,0
001004,54594,AIR,20JUN1990,31MAY1990,1989,4,(1.21%),(1.21%),(.188%),9,0.032051,3,-0.401962,62,0.0320512839,3,-0.347610836,62,,0
001004,54594,AIR,19SEP1990,31AUG1990,1990,1,(1.30%),(1.30%),.031%,6,-0.051501,3,-0.250852,64,-0.052173913,3,-0.272146379,64,,0
001004,54594,AIR,20MAR1991,28FEB1991,1990,3,(.386%),(.386%),.388%,5,-0.024275,3,0.040435,63,-0.025000002,3,0.0180970818,63,,0
001004,54594,AIR,19DEC1991,30NOV1991,1991,2,(1.66%),(1.66%),(.646%),4,-0.054578,3,0.340241,61,-0.054347828,3,0.3866814244,61,,0
001004,54594,AIR,19MAR1992,29FEB1992,1991,3,(.960%),(.960%),(.258%),6,0.000489,3,-0.192220,63,5.725653E-10,3,-0.180947941,63,,0
001004,54594,AIR,19JUN1992,31MAY1992,1991,4,(1.95%),(.111%),.388%,5,-0.040926,3,-0.012570,62,-0.04040404,3,-0.021716852,62,,0
001004,54594,AIR,19MAR1993,28FEB1993,1992,3,(5.32%),(1.69%),(4.53%),4,0.021389,3,0.139995,79,0.0212765943,3,0.1370213671,79,,1
001004,54594,AIR,15DEC1993,30NOV1993,1993,2,(.331%),(.331%),.145%,1,0.010152,3,0.159706,63,0.0088495582,3,0.1639044227,63,,1
001004,54594,AIR,17MAR1994,28FEB1994,1993,3,(.730%),(.730%),(.189%),1,-0.028986,3,-0.190283,74,-0.028985508,3,-0.178927408,74,,1
001004,54594,AIR,20SEP1994,31AUG1994,1994,1,(1.07%),(1.07%),(.370%),2,-0.066058,3,0.005506,60,-0.064814816,3,-0.000105915,60,,1
001004,54594,AIR,15DEC1994,30NOV1994,1994,2,(.782%),(.782%),(.190%),2,0.009901,3,0.064324,60,0.0099009899,3,0.0588338848,60,,1
001004,54594,AIR,15MAR1995,28FEB1995,1994,3,(.326%),(.326%),.218%,1,0.000000,3,0.311634,77,0,3,0.3511051257,77,,1
001004,54594,AIR,14MAR1996,29FEB1996,1995,3,(.687%),(.687%),.000%,2,0.012382,3,-0.034772,74,0.012345679,3,-0.043338345,74,,1
001004,54594,AIR,01JUL1996,31MAY1996,1995,4,(.484%),(.484%),.136%,3,-0.030947,3,0.162151,53,-0.031249998,3,0.1655429734,53,,1
001004,54594,AIR,17SEP1996,31AUG1996,1996,1,(.330%),(.330%),.231%,2,0.053236,3,0.185976,60,0.0517241362,3,0.1802858361,60,,1
001004,54594,AIR,12DEC1996,30NOV1996,1996,2,(.439%),(.439%),.067%,1,-0.061535,3,-0.010048,61,-0.061135372,3,-0.023507845,61,,1
001004,54594,AIR,13MAR1997,28FEB1997,1996,3,(.688%),(.688%),.098%,4,0.014730,3,0.216937,71,0.014634147,3,0.2320445428,71,,1
001004,54594,AIR,25JUN1997,31MAY1997,1996,4,(.582%),(.582%),.032%,7,0.008171,3,0.077118,52,0.0079365076,3,0.0764118341,52,,1
001004,54594,AIR,12DEC1997,30NOV1997,1997,2,(.446%),(.446%),.104%,5,-0.036575,3,0.130388,60,-0.036392406,3,0.1335095615,60,,1
001004,54594,AIR,13MAR1998,28FEB1998,1997,3,.032%,.032%,.011%,5,0.013157,3,-0.052282,71,0.0129870138,3,-0.062041323,71,,1
001004,54594,AIR,25JUN1998,31MAY1998,1997,4,.164%,.164%,.113%,6,0.110388,3,-0.192010,55,0.113695093,3,-0.190943224,55,,1
001004,54594,AIR,15SEP1998,31AUG1998,1998,1,.032%,.032%,.000%,5,0.039486,3,0.154793,64,0.0385756653,3,0.1351930178,64,,1
001004,54594,AIR,16DEC1998,30NOV1998,1998,2,(.063%),(.063%),(.079%),2,-0.062003,3,-0.248133,58,-0.061007959,3,-0.240390168,58,,1
001004,54594,AIR,15MAR1999,28FEB1999,1998,3,.096%,.096%,.066%,7,0.056756,3,0.250748,70,0.0546875022,3,0.2583560571,70,,1
001004,54594,AIR,24JUN1999,31MAY1999,1998,4,.145%,.145%,.101%,5,0.129166,3,-0.034939,56,0.1346801336,3,-0.043852039,56,,1
001009,10074,ABSI,29NOV1990,31OCT1990,1990,4,(6.40%),(6.40%),(2.33%),1,-0.019022,3,0.106648,57,-0.020833334,3,0.0593788779,57,,0
001009,10074,ABSI,11AUG1994,31JUL1994,1994,3,.000%,.000%,.000%,1,-0.034483,3,-0.013500,75,-0.034482758,3,-0.03220781,75,,1
001017,10154,AELN,18DEC1985,30NOV1985,1985,3,(.507%),(.507%),(.538%),1,0.001008,3,-0.091159,84,-9.31323E-10,3,-0.109375,84,,0
001017,10154,AELN,31MAR1987,28FEB1987,1986,4,4.04%,4.04%,3.90%,1,-0.016906,3,0.059586,56,-0.01754386,3,0.0458715589,56,,0
001021,10218,AFPC,16MAY1985,31MAR1985,1985,3,.117%,.117%,.364%,1,-0.025000,3,-0.466073,93,-0.025,3,-0.410256421,93,,0
001021,10218,AFPC,12NOV1997,30SEP1997,1998,1,2.19%,2.19%,(.410%),1,0.120915,3,0.030140,65,0.117647059,3,-0.078947376,65,,1
001034,65832,BMD,13MAR1986,31DEC1985,1985,4,(2.17%),(2.17%),(.234%),1,-0.015095,3,0.140026,43,-0.015037594,3,0.1278195424,43,,0
001034,65832,BMD,15MAY1986,31MAR1986,1986,1,(1.60%),(1.60%),(.038%),1,-0.011204,3,0.019438,52,-0.013157895,3,0.0019999976,52,,0
001034,65832,BMD,13MAR1987,31DEC1986,1986,4,(.499%),(.499%),(.043%),1,-0.079169,3,-0.155779,36,-0.079207923,3,-0.16129032,36,,0
001034,65832,BMD,10AUG1988,30JUN1988,1988,2,(.513%),(.513%),2.12%,2,-0.059608,3,0.082671,64,-0.058823529,3,0.0749318257,64,,0
001034,65832,BMD,10NOV1988,30SEP1988,1988,3,(1.05%),(1.05%),(.119%),2,-0.009339,3,0.056921,79,-0.00952381,3,0.0508955552,79,,0
001034,65832,BMD,08MAR1989,31DEC1988,1988,4,(1.08%),(1.08%),(.072%),2,0.019137,3,0.115000,41,0.0188679245,3,0.1136033205,41,,0
001034,65832,BMD,08MAY1989,31MAR1989,1989,1,(.797%),(.797%),.073%,2,0.017159,3,0.091348,64,0.016949152,3,0.0845551791,64,,0
;;;;``````

1 ACCEPTED SOLUTION

Accepted Solutions
Obsidian | Level 7

## Re: Cross Sectional Regression vs Panel Data

This is not a base SAS question. You may get find more luck if you post it under statistics topic.

Also, I lost my WRDS membership when after I quit grad school. So, thanks for posting this data. Too bad you posted only 100 obs. I think you should post the entire dataset you have here so its freely available to everyone.

2 REPLIES 2
Obsidian | Level 7

## Re: Cross Sectional Regression vs Panel Data

This is not a base SAS question. You may get find more luck if you post it under statistics topic.

Also, I lost my WRDS membership when after I quit grad school. So, thanks for posting this data. Too bad you posted only 100 obs. I think you should post the entire dataset you have here so its freely available to everyone.

Pyrite | Level 9

## Re: Cross Sectional Regression vs Panel Data

Thanks I posted this question under the Statistics topic.

Discussion stats
• 2 replies
• 1036 views
• 1 like
• 2 in conversation