Converting some stata code to eviews code

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator

Lalan_dk
Posts: 4
Joined: Tue Apr 10, 2018 9:51 pm

Converting some stata code to eviews code

Postby Lalan_dk » Wed Apr 11, 2018 11:04 pm

Hi,

I'm using IFLS 5 data and want to merging some data. My friend give me these codes to perform it in stata, but i want to perform it in eviews.

Code: Select all

global ifls5 "/Users/GHBS/Documents/IFLS/IFLS 5/household"
global kompilasi "/Users/GHBS/Documents/Work/Asisten Semester 9/Ekonometrika MEP/grup kiri"

**MAIN
use "$ifls5/bk_ar1.dta", clear

keep hhid14 pid14 ar09 ar10 ar11
rename ar09 age
rename ar10 id_father
rename ar11 id_mother

save "$kompilasi/data_anak.dta", replace

** FATHER'S ID FILE
use "$ifls5/bk_ar1.dta", clear

keep hhid14 pid14 ar09
rename ar09 age_father
rename pid id_father

save "$kompilasi/data_father.dta", replace

** MOTHER'S ID FILE
use "$ifls5/bk_ar1.dta", clear

keep hhid14 pid14 ar09
rename ar09 age_mother
rename pid id_mother

save "$kompilasi/data_mother.dta", replace

** MERGE
use "$kompilasi/data_anak.dta", clear

merge m:1 hhid id_father using "$kompilasi/data_father.dta"
keep if _merge==3
drop _merge

merge m:1 hhid id_mother using "$kompilasi/data_mother.dta"
keep if _merge==3
drop _merge

save "$kompilasi/data_anak_lengkap.dta", replace



Can anyone help me to convert this stata code to eviews programming language?

here the attachment
bk_ar1.dta
(38.89 MiB) Downloaded 8 times

Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests