BookmarkSubscribeRSS Feed
Ahmad
Calcite | Level 5

hi i have estimated regression using 'Proc REg' with' by' variable.

now i regression result for all the 'by variable'

i want to average the slope coefficient. well that is easy . but what about to the t statistic? can i simply average it too? and how to interpret it?

Thanks in advance

20 REPLIES 20
Reeza
Super User

No, you can't just average the t-stat or p-value.

What are you actually trying to calculate?

Ahmad
Calcite | Level 5

ok thanks for the reply , here is what i am trying to calculate.

i have weekly liquidity data for 500 stock over 7 years.

i am estimating an equation, which is something like this

Liq= a+ b1x + b2z+ b3d........+bnZ +e

now i have estimated this equation using proc reg .

with stockname as my by variable. so i have estimated this equation 500 times (number of stocks)

for reporting purpose i need to calculate the cross sectional average of coefficients (e.g average 500 b1). How do i report the t statistics for these averaged coefficients??? .

Ahmad
Calcite | Level 5

help please Smiley Happy once again

PGStats
Opal | Level 21

I agree with Reeza that averaging your coefficients is NOT the way to go. Instead, you should estimate single slope coefficients from all your stocks taken together. Drop the BY clause, switch from REG to GLM and use something like:

proc glm data=myData;

class stockName;

model liq = stockName x z d / solution;

run;

This will estimate a separate intercept for each stock and single slopes (with T statistics) for all your parameters (x, z, d, etc)

PG

PG
Reeza
Super User

If you have time series data, data over 7 years, then its likely you should be doing some sort of time series analysis rather than proc reg or GLM in my opinion.

Ahmad
Calcite | Level 5

but this procedure has been used in alot of recent papers in top journals, and they just average out the slope coefficients, however how they go about tstatistics, i am not sure and i cant understand

Reeza
Super User

That explains why the market crashed Smiley Happy

Ahmad
Calcite | Level 5

haha nice one :smileysilly: but you know the problem is not with estimtaion, because this estimation becuase this is just an intermediate estimation before the real model, however we cannot report the result of 500 regression, so just for reporting purpose this has to be done, and i just cant figure out how they have done or how to report, if you want i can send you a link of the orignal paper, sorry to bother but any help wpold be really appreciated

AncaTilea
Pyrite | Level 9

Ahmad,

It could help to see the paper you are referring to.

Maybe there is some misunderstanding on the methodology used?

Ahmad
Calcite | Level 5

here let me attach the paper , see table2 on page 266, the author has just calculated equally weighted average of the coefficients

Reeza
Super User

On pg 266, that is time series analysis, not just regression analysis. Because there is seasonal adjustment and time adjustments. 

You can implement a similar model in proc reg, but have to make sure your have the appropriate terms in the model as well.

Ahmad
Calcite | Level 5

yes reeza i have all the appropriate terms, i.e lags and everything, but do you know how the author has summarized the results in table2, specially regarding the tstatistic, as he has averaged the coefficients cross sectionally, but how do i report t statistics??

Reeza
Super User

I'm not sure, mostly because I don't want to read the paper thoroughly.

I would suggest contacting the authors directly. The version you attached doesn't have the author contacts, but usually when I've had articles published the author contacts are included, as well as the institutions.

adjgiulio
Obsidian | Level 7

I'm not sure how the author came up with the average t-statistic. I agree that it is a bad practice averaging t-statistics. If you have the opportunity to recommend a different solution, I would probably go for something like "% of regressions with a significan p-value". It's a way to say, for each independent variable, of the n "by groups", x% had a significan p-value.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 20 replies
  • 3225 views
  • 3 likes
  • 6 in conversation