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
Conflicting results in did and dose response modelsDear All, I am looking to the impact of Syrian mass migration on the firm-level performance measure…
Small sample of 38 observationsHi, I have a panel data of 26 countries and 21 years, but I am only concerned with 38 observations.…
Generate/replace new variables in a repetitive way for all the individuals.Hello, everyone. Below is my data and variable name "salary21" means salary of PID 21, and each val…
List string values of multiple varlistsHi everyone, I am trying to list the string values of two varlists (med_other_ind* and med_name*) w…
Change over timeHi all, I have a data-set of organizations and their service sites for 2014-2018. Organizations 1) o…
Subscribe to:
Post Comments (Atom)
0 Response to Forvalues skip the first two observations
Post a Comment