Hi all,
I wanr to create variables in a forval numeric forloop
forval i = -7(1)7{
gen dummy_`i' = 1 if dif>`i'-1 & dif<`i'+1
}
however this syntax is invalid. What can I do?
Thank you for your help!!
Related Posts with creating variables in forval numeric forloop
Appending datasets by keeping the common variabels onlyHi, I want to append datasets for various countries, each of which contains variables that others do…
Replace missing values by system-missing '.' if label value is "Manquant"Hello, I have a survey where most variables have a different code for missing values, I need to uni…
Overlaying a line graph over a catplot or tabplot graphDear Statalisters, First time statalist user here. I am studying the supply and demand of fishing p…
Equation not found after gsem + ImputationDear all, using Stata 15.1, I want to run a gsem model after Multiple Imputation. First I impute usi…
Check if a group of variables exists before running a series of commandsHi I have other two questions for you all. I have a number of datasets (about 250) and I want to cr…
Subscribe to:
Post Comments (Atom)
0 Response to creating variables in forval numeric forloop
Post a Comment