Hello , I do not know why stata tell me "r(198)invalid varname. " I check it for several times. I hope I recieve your assistance so soon . thankk you so much to all.

Code:
foreach var of varlist lnemployment_total{ 


egen lnemployment_total_mean = mean(lnemployment_total )
egen lnemployment_total_sd = sd(lnemployment_total )
bysort ifscode (year): gen lnemployment_total_norm = (lnemployment_total - lnemployment_total_mean)/lnemployment_total_sd
bysort ifscode (year): gen lnemployment_total_low = exp(-3.5*lnemployment_total_norm)/(1+exp(-3.5*lnemployment_total_norm))
bysort ifscode (year): gen lnemployment_total_high = 1 - lnemployment_total_low

*to allow exact comparison with baseline sample - similar results also without replacing
replace lnemployment_total_high=0.5 if lnemployment_total_high==.
replace lnemployment_total_low=0.5 if lnemployment_total_low==.

bysort ifscode (year): gen lnemployment_total_h_dum_recession_sm=lnemployment_total_high*dum_recession
bysort ifscode (year): gen lnemployment_total_l_dum_recession_sm=lnemployment_total_low*dum_recession

bysort ifscode (year): gen ferlmemp_lp_h_dum_recession_sm=lnemployment_total_high*lnfertility
bysort ifscode (year): gen ferlmemp_lp_l_dum_recession_sm=lnemployment_total_low*lnfertility
}
Code:
lnemployment_total_h_dum_recession_sm invalid varname
r(198);
thank you so much.