Remove space

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

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

Remove space

Postby mpsc19 » Mon Sep 25, 2017 4:54 pm

Hi! I want to delete the space between 0 and 1 of the code at the end, how is it done? Thanks. Im using Eviews 9.

smpl @all if @val(a2)=397050 1

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

Re: Remove space

Postby startz » Mon Sep 25, 2017 6:30 pm

mpsc19 wrote:Hi! I want to delete the space between 0 and 1 of the code at the end, how is it done? Thanks. Im using Eviews 9.

smpl @all if @val(a2)=397050 1

Uh, position the cursor in front of the 1 and hit backspace?

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

Re: Remove space

Postby mpsc19 » Tue Sep 26, 2017 6:14 am

startz wrote:
mpsc19 wrote:Hi! I want to delete the space between 0 and 1 of the code at the end, how is it done? Thanks. Im using Eviews 9.

smpl @all if @val(a2)=397050 1

Uh, position the cursor in front of the 1 and hit backspace?


No :( I get the poster "WARNING: Sample contains no observations"

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

Re: Remove space

Postby startz » Tue Sep 26, 2017 6:22 am

mpsc19 wrote:
startz wrote:
mpsc19 wrote:Hi! I want to delete the space between 0 and 1 of the code at the end, how is it done? Thanks. Im using Eviews 9.

smpl @all if @val(a2)=397050 1

Uh, position the cursor in front of the 1 and hit backspace?


No :( I get the poster "WARNING: Sample contains no observations"

How many observations are there in your file in which @val(a2) equals exactly 3970501?

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

Re: Remove space

Postby mpsc19 » Tue Sep 26, 2017 6:50 am

startz wrote:
mpsc19 wrote:
startz wrote:Uh, position the cursor in front of the 1 and hit backspace?


No :( I get the poster "WARNING: Sample contains no observations"

How many observations are there in your file in which @val(a2) equals exactly 3970501?


There are 12 observations

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

Re: Remove space

Postby startz » Tue Sep 26, 2017 6:53 am

Perhaps you should post your workfile. Be sure it Includes a series that you've set equal to @val(a2). Tell us a couple of observations that have the right value.

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

Re: Remove space

Postby mpsc19 » Tue Sep 26, 2017 7:04 am

What I did was create an alpha to join two codes (example: 236120 and 1) and then see the observations. At first it worked because, for example, the two codes were together (2361201), but some are shown separately (397050 1) and I have that problem

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

Image

I do not know if it's what you ask because I do not handle English very much. Sorry and thanks.

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

Re: Remove space

Postby startz » Tue Sep 26, 2017 7:11 am

Show us the example that doesn't work, not an example that does work. And first create a new series equal to @val(a2) and show us that one too.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 30 guests