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.
Related Posts with Nested forvalue loops - referring to previous macros in a relevant macro
 Matching without replacement from a file of pairs for case-control and other applicationsShort version: I’m seeking a solution to how to do 1:m matching of cases and controls without replac… Matching without replacement from a file of pairs for case-control and other applicationsShort version: I’m seeking a solution to how to do 1:m matching of cases and controls without replac…
 pweights in reghdfe allow colinear variable to generate a coefficient?
Hi,
This is my first post here. This question pertains to the use of pweight in reghdfe. I have a … pweights in reghdfe allow colinear variable to generate a coefficient?
Hi,
This is my first post here. This question pertains to the use of pweight in reghdfe. I have a …
 Replace command with non-mutually exclusive categorical dataHello,
I am working with a dataset from a Twitter content analysis project and am stuck trying out … Replace command with non-mutually exclusive categorical dataHello,
I am working with a dataset from a Twitter content analysis project and am stuck trying out …
 bysort query issuesHello all:
I am trying to replace first row of path with "CLL" and second row of path as "RT" for _… bysort query issuesHello all:
I am trying to replace first row of path with "CLL" and second row of path as "RT" for _…
 Number of lags too highHi everyone,
I am writing as I am currently working on my bachelor's thesis with Stata.
I am doing … Number of lags too highHi everyone,
I am writing as I am currently working on my bachelor's thesis with Stata.
I am doing …
Subscribe to:
Post Comments (Atom)
0 Response to Nested forvalue loops - referring to previous macros in a relevant macro
Post a Comment