gen x =.
di 12*14
set obs 168
gen year = .
gen month = .
local yearVar weight
foreach var in `yearVar' {
foreach m of numlist 1/12 {
foreach y of numlist 1997/2010 {
local n = (`m'-1)*14 + `y'-1996
replace x = `var'[`y'-1996] in `n'
replace year = `y' in `n'
replace month = `m' in `n'
}
}
}
sort year month