Hi guys, I am new to SAS and for my univerity project, I have a big set of data with many obsevations and variables and I need to create some new variables. DATA: I have a database of anayst forecasts, dates on which the forecast was published and firms to which the forecast was related. Example. Analyst 234 forecasted on 01May90 that firm 234 will have a profit of 500USD. What I need to compute: For each observation, I need to compute two new variables relative experience and relative firm experience. Relative firm experience is computed as the number of years the analyst has been in the database at the time he published the particular forecast (time in full years since the first forecast of this analyst in the database till this forecast) minus the average experience of all all analyst who submited a forecast for this firm in this year. Secondly, I have to compute the firm specific experience. That is virtually the same, but I need to use the number of years since the first forecast of the particular analyst for a particular firm (meaning time in full years since the first forecast of this analyst for this firm) again minus the average firm specific experience of all analysts who submited a forecast for that same firm in the same year. I have tried many approaches but since I am not really familliar with SAS, I could't find a way to compute it and I would be really greatful for your help.
... View more