I am trying to perform a log function within loops, but it gives me errors that I do not know how to fix it. Your help would be much appreciated. Thanks!
This is the code that I am running:
Code:
forvalues i = 6/40 { forvalues j = 1/6{ foreach k in lmn if gestage2==`i' & bmiprepregcat6==`j'{ foreach l in lsd if gestage2==`i' & bmiprepregcat6==`j'{ replace zscore = (log(gwgkg +`c')-`k')/`l' if gestage2==`i' & bmiprepregcat6==1 } } } }
gwgkg+ invalid name
r(198);
r(198);
Code:
forvalues i = 6/40 { forvalues j = 1/6{ foreach k in lmn if gestage2==`i' & bmiprepregcat6==`j'{ foreach l in lsd if gestage2==`i' & bmiprepregcat6==`j'{ replace zscore = ((log(gwgkg) +`c')-`k')/`l' if gestage2==`i' & bmiprepregcat6==1 } } } }
unknown function ()
r(133);
0 Response to Log function within loops
Post a Comment