I want to write a small script in Gretl. But I have a problem with reaching elemets in list.
list X = dataset
list X print
With the first line I put all variables in X list, and with the second line I print out all my variables. I want like with the arrays for exemple: array[3] and to get the (second) third element. How can I do this in Gretl? I need one by one the variable names because I want with loops to use them in pairs. Thank for halping!
not sure I fully understand your issue. But let's try to provide some answer.
Load an example data set, define a list of series and print its values:
Array items in gretl can be accessed through square brackets. Here the second series item of list L is printed:
You said you want to loop over a list. Make use of the foreach-loop:
Hope that helps