Reduce a sample

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator

mpsc19
Posts: 24
Joined: Mon Jul 10, 2017 8:41 am

Reduce a sample

Postby mpsc19 » Sat Sep 09, 2017 6:40 pm

Im a very new user of Eviews and I speak spanish.

I already did this to join the code of a set of houses with the code of a home. The number 2361202 is the code of a particular home and now I want to reduce the sample to parents and children between 18 and 30 years living in that home (only children between this years), and my question is how to do it. Thanks.

alpha a2= a1 + @str(nro_hogar)
alpha a1=codusu
alpha a2= a1 + @str(nro_hogar)
series anh
anh= @sumsby (CH03=3, a2)
smpl @all if @val(a2)=2361202

startz
Non-normality and collinearity are NOT problems!
Posts: 3175
Joined: Wed Sep 17, 2008 2:25 pm

Re: Reduce a sample

Postby startz » Sat Sep 09, 2017 7:13 pm

Something like
smpl if @val(a2)=2361202 and (status="parent" or (status="child" and age>18 and age<30))


Return to “Programming”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 8 guests