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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register 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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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