Hi, I was wondering if is possible making a loop to fill a serie, for example:
set obs 10
foreach x in "Enero" "Febrero" "Marzo"{
gen mes_`x'=`x'
}
And get
mes_Enero filled with all the observations with Enero
mes_Febrero filled with all the observations with Febrero
the same with "Marzo"
Name the series is possible, the problem is about the observations.
Really need the help
Thank u
set obs 10
foreach x in "Enero" "Febrero" "Marzo"{
gen mes_`x'=`x'
}
And get
mes_Enero filled with all the observations with Enero
mes_Febrero filled with all the observations with Febrero
the same with "Marzo"
Name the series is possible, the problem is about the observations.
Really need the help
Thank u
Comment