Hi,
I am not an expert in using the word command to help running parallel lists, so maybe someone can help
I have the following global to help me adding notes to graphs:
I then run a forloop that involves many steps (not shown), with the ultimate goal of creating a graph:
Ultimately k should go further than 3, so I try to add the notes in a single macro and then use the forval loop to change the graph's format accordingly.
This is clearly not working, because each piece of ss_model_type_graph_note has multiple words.
So for the graph in k=1 I get the correct caption - empty. For k=2, it is wrong, it only writes "Leave", for k=3 it only writes "one"
Is there a way to change this for me to get the full sentence for each?
I am not an expert in using the word command to help running parallel lists, so maybe someone can help
I have the following global to help me adding notes to graphs:
Code:
global ss_model_type_graph_note " " "Leave one out measure " /// "Restricted sample "
Code:
forvalues k = 1/3{ clear local kname : word `k' of $ss_model_type local knote: word `k' of $ss_model_type_graph_note twoway /// (scatter coefficient t , mlabel("") msymbol(O) msize(small)) /// (rcap lower_bound upper_bound t , lcolor(black) mc(blue)), /// note( "`knote'", size(small)) /// yline(0) ylabel(, format(%12.2fc) angle(0)) /// xlabel(-4(1)7, format(%12.0fc)) /// legend(off) /// graph export "`kname'.pdf", replace }
This is clearly not working, because each piece of ss_model_type_graph_note has multiple words.
So for the graph in k=1 I get the correct caption - empty. For k=2, it is wrong, it only writes "Leave", for k=3 it only writes "one"
Is there a way to change this for me to get the full sentence for each?
Comment