Hi all,
I am creating many time-series graphs in a nested loop through various outcome variables and 100 values of an encoded variable. The skeleton structure is:
foreach var of varlist{
forval 1(1)100{
twoway (line `var' time if group==1 and firm_size==`i') ///
twoway (line `var' time if group==2 and firm_size==`i') ///
....
twoway (line `var' time if group==N and firm_size==`i')
graph export
}
}
Anyway, I can label the y axis using the variable label from `var' using `:variable label `var''. My question is, can I title the graph in a similar manner such that the title is the value label associated with the firm_size variable at value i? So if the encoded variable firm_size takes the label "Below 10 employees" for i==1, the graph title is "Below 10 employees".
Thank you for your help, I've been googling this for a while, but couldn't word it correctly to find the syntax I was looking for.
I am creating many time-series graphs in a nested loop through various outcome variables and 100 values of an encoded variable. The skeleton structure is:
foreach var of varlist{
forval 1(1)100{
twoway (line `var' time if group==1 and firm_size==`i') ///
twoway (line `var' time if group==2 and firm_size==`i') ///
....
twoway (line `var' time if group==N and firm_size==`i')
graph export
}
}
Anyway, I can label the y axis using the variable label from `var' using `:variable label `var''. My question is, can I title the graph in a similar manner such that the title is the value label associated with the firm_size variable at value i? So if the encoded variable firm_size takes the label "Below 10 employees" for i==1, the graph title is "Below 10 employees".
Thank you for your help, I've been googling this for a while, but couldn't word it correctly to find the syntax I was looking for.

Comment