⚲
Project
General
Profile
Sign in
Register
Home
Search
:
Understanding Society User Support
All Projects
Understanding Society User Support
Overview
Activity
Issues
Download (585 Bytes)
Support #1004
ยป appendingfiles.do
Alita Nandi
, 07/19/2018 03:30 PM
// for appending the wave specific individual level files into long format we need to
// (i) create a variable called wave which is 1 for wave 1, 2 for wave 2,...
// (ii) drop the wave prefix from all variables that had one
// (iii) save each wave specific file
// (iv) append these files
global
dir
"Folder path where the data files are stored"
foreach
w
in
a
b
c
d
e
f
g
{
use
"$dir/`w'_indresp"
,
clear
gen
wave
=
strpos
(
"abcdefg"
,
"`w'"
)
rename
`w'
_
*
*
save
`w'
,
replace
}
use
a
,
clear
foreach
w
in
b
c
d
e
f
g
{
append
using
`w'
}
save
longfile
,
replace
(1-1/1)
Loading...