Hi, I'm having trouble in running a foreach loop and it keeps showing the invalid name error to me. The commands I used are as following:
global NEWIVB "rfriend hfriend trelat rrelat hrelat"
foreach newivb of global `NEWIVB' {
ta `newivb'
ta `newivb', nolabel
recode `newivb' (1 = 3) (3 = 1) (4 = 0), gen(`newivb'_new)
ta `newivb'_new
}
And the error is like this below:
{ invalid name
r(198);
I'm not quiet sure if I type something wrong here and I'm wondering if anyone could give me a hint on that? Thank you so much!
Related Posts with Invalid name error in foreach loop
How to find all user-written programs related to Text Mining / Content AnalysisDear Forum Members, I wish to find all avaliable adofiles related to Text Mining / Content Analysis…
Panel data homogeneity test HsiaoHi everyone. I'm so glad that I found this forum. Well, I really need some help regarding panel data…
Calculate average with geometrically declining weightsHello Everyone, Could anyone help me to find a code to calculate the following equation? I am tryin…
vertical line overlaying an area plotHello, I am trying to add to an area plot three vertical lines overlaying them. I have tried with th…
Pseudo likelihood?Dear community, In my probit model on public opinion I have applied weights, which resulted in pseud…
Subscribe to:
Post Comments (Atom)
0 Response to Invalid name error in foreach loop
Post a Comment