Hi everyone,
The code below generates plots by the levels of profile variable but because the levels contain space, Stata is unable to save the generated plots and returns an error instead: file could not be opened. How can I fix this? Thanks.
NM
levelsof profile, local(profiles)
local to_combine
foreach p of local profiles {
twoway (line Obs_q1 _margin age if profile=="`p'" & gender==0 , sort ), title("`p'") legend(label(1 "Observed") label(2 "modeled") ) saving( "`p'", replace)
local to_combine `to_combine' `p'
}