Hi everyone,
It seems like STATA skips over test1 and test2 observations as my new variables maxtest1 and maxtest2 are test3 observations. It seems like my forvalues m=1/3 is right. Please tell me what's wrong in the code. Thank you in advance.
local maxtest maxtest1 maxtest2 maxtest3
local i=1
foreach value of local maxtest {
gen `value'=.
forvalues m=1/3 {
replace `value'=test`m' if test1effort==`i'&test2effort==`i'&test3effort==`i'
}
}
Related Posts with Forvalues skip the first two observations
Macros for 2 graphs. Invalid name errorHello, I have to draw I have to draw a variety of similar graphs and decided to use macros at first…
Merge DifficultiesHello, I'm having difficulty merging together two data sets that contain population estimates for m…
Remove observations when there are more than 2 rows with the same IDHi, I have a data set that uniquely defines a household via 2 variables: conglome vivienda Within …
Random Marginal Agreement CoefficientHi everyone. I am comparing intra rater agreement between two continous variables, both predicted co…
Difficulties with loop in a loop, feeding a matrix values through a loopHello, I am looking to fill a 4 by 5 matrix with the descriptive statistics (e.g. number of obs, max…
Subscribe to:
Post Comments (Atom)
0 Response to Forvalues skip the first two observations
Post a Comment