BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Thanks for giving me help.
the sample:
stock reportdate forecasterro marketvalue beta firmexperience analyst
001 2002-01-05 0.66 783749 1.22 0.22 EAHH01
001 2003-12-04 0.24 835455 1.24 0.43 EAHL02
001 2003-12-08 0.32 835353 1.24 0.23 EARY03
001 2004-01--01 0.44 823311 1.25 0.43 EAHL02
001 2004-03-24 0.54 834672 1.43 0.54 EAHH01
002 2002-06-11 0.89 437535 0.99 0.23 EAWW03
002 2002-07-31 0.92 478281 0.89 0.13 EAHH01
002 2003-11-21 0.82 472481 0.89 0.28 EAHH01
........
I want to get a dummy variable for analyst i 's forecast for stock j in year t.it is equal to 1 if analyst i 's forecast is above both the analyst's prior forecast and the mean forecast which is based on forecasts issued in the 90 days prior to analyst i's forecast revision.it is set to 0 otherwise.
how can i get the result?
1 REPLY 1
LinusH
Tourmaline | Level 20
Not stupid I think, but if you provide a sample output given the sample input, it would be easier to understand what you want to accomplish.

/Linus
Data never sleeps

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand in the Innovate Hub.

Watch Now →
What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1128 views
  • 0 likes
  • 2 in conversation