Hi, I would like to create a formula for making variables of the kind:
gen newvar = v[k] + v[k+8] + v[k+16] + v[k+24] + v[k+32]
where I will specify the k.
Any idea how I can execute this?
Thanks
Related Posts with Creating variables that sum variables in regularly interspaced columns
🗎 Temporary file with -tempfile-Dear All, I am looking for a way to make use of temporary files with the putpdf image command. Unfo…
Census data use of weights and survey-designHi! I am using Mexico 2010 census data to do an individual-level analysis. Upon reading the availa…
synth_runner's CIsHi everyone, Is there a way to graph confidence intervals when using synth_runner? (to put it around…
Summing across variables with conditionsHello, I am working with a data set where the variables represent questions from a survey that used…
Restricting Loop to Observation NumberI wish to create a variable that looks something like 1994M1, 1994M2.....1994M12 to indicate the mon…
Subscribe to:
Post Comments (Atom)
0 Response to Creating variables that sum variables in regularly interspaced columns
Post a Comment