I would like to create a list using a loop, keep the unique elements with quotes and then pass these to mata. However, i have not been successful so far. The closest i have managed to get to is the following:
The list should be "bel's list is not long" "this is a boring list". What am i doing wrong?
Code:
local belselem1 bel's list is not long local belselem2 this is a boring list local belselem3 bel's list is not long forval i=1/4 { local belslist1 `"`belslist1'"' `""`belselem`i''""' } local belslist2: list uniq belslist1 di `"`belslist2'"' mata: belslist3 = st_local("belslist2") belslist3 end
Comment