Dear all,

I am new to Stata. and I am seeking help from experienced users. I am looking for evidence of herd behavior in a specific real estate market. This is performed using cross-sectional absolute deviation (CSAD) as a measure of dispersion. (Similar to Chang et al. (2000))

see below the formula from Chang et al 2000



Array


I obtained monthly data on residential housing prices index for 9 location over 10 years.

Rit is the return of a location i at time t


Rt = ln(It / It–1), Using normal log

Ri and Rm are computed as ln returns based on housing price index.

Each of 9 columns contains the data of a location (price index)

Is it possible to run the calculations with the data in this format? Each line represents a period of the year (example mar 2015, April 2015 ....) I wasn't sure about formatting the date, so I did not create a date variable.



See the dataex- below



Array .

I would be grateful for any suggestions on the commands for this analysis of data.
Thanks
coelho