Dear Clarodina, please take a look at the script attached. I think now it solves your problem :-)
Best regards,
Henrique Andrade
Hi Henrique,
Tks for replying
The data file structure is csv of text file below
The actual file has 6000 rows and 100 columns
The first column is date and second to 100 columns are name d1 to d100
Some columns have blank with no data
Want to do is to use a rolling 10 rows data points or 20 rows data or other custom number of rows data points to compute the corr between the d1 - d100 columns
Compute a ROLLING 20 rows data points of corr(d1,d2) on the 6000 rows of d1 d2 data points
Get the output of corr(d1,d2) and determine the number of corr(d1,d2) output between 0.2 to 0.6 values
Sum the number of corr(d1,d2) output between 0.2 to 0.6 values and divide from the total number of observations or datapoints use on the computation of corr
The process is for d1 and d2 columns but would want to extend the computation to (d1,d3) (d1,d4) (d1,d5) (d2,d3) (d2,d4) (d2,d5)
The file has some blank rows with no data and gretl may not accept the file and some script would require to ignore the blank rows