Good afternoon.

Could anyone help me decipher what syntax error I am producing in the below command sequence?

/*Given*/
regress offspringheight mpheight if(tallmpheight==1), robust
global mp_b = _b[mpheight]
global cons_b = _b[_cons]
global new_meanmpheight1 = 68.78209

/*Then*/
forvalues j = 1(1)100 {
forvalues i = `=`j'+1' {
global new_meanmpheight`i' = $cons_b + ($mp_b * $new_meanmpheight`i')
}
}

That is, I seek to perform multiple regression predictions over successive iterations that require local macro `i' to be defined in term of another local macro `j'. From that I seek to save in STATA's global memory all predictions made on the basis of the orginial regression regress offspringheight mpheight if(tallmpheight==1), robust (In attempt to demonstrate a conversion of heights).

please let me know what mistake I am making in defining the above nested loop.