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
MediationHello Stata community ! I am new on stata and for my mastre thesis I want to do a mediation model w…
Constructing a Panel form entry and exit variablesHi, I currently have a database of all Australian legislators since the 20th century. The data is f…
When to use pweightHi, I am using cmxtmixlogit to check the relationship between Y (action chosen by subject) and X (p…
Asdoc Query (reporting for thesis format)hello and good day, I am using Local projection method and I want to export the result of my regress…
Making quarterly variable from separate day , month and year variableIn BRFSS data the interview date variable is suppressed though the the day , month and year variable…
Subscribe to:
Post Comments (Atom)
0 Response to Creating variables that sum variables in regularly interspaced columns
Post a Comment