1 I have a series with numbers stored as string (for some reason that is how they were imported from xls / although in xls they are stored as numbers).
How to convert the whole series in number format?
Otherwise I receive the following info: "alpha series in specification DUM_POZICIJA (name of my problematic series) @expand can convert to categorical dummies"
2 The series was made with the program>
smpl @all
alpha dum_pozicija="4"
dum_pozicija= @recode(poz01 ="18" or poz01="23","1",dum_pozicija)
dum_pozicija= @recode(poz01 ="1" or ...,"2",dum_pozicija)
etc...
But if I tried to use numbers (4) instead of strings ("4") I receive a message "cannot assign numeric expression to string variable in "alpha dum_pozicija=4".
Can I somehow define numbers in the above program?
something like str2num ?
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: something like str2num ?
thanks!
Suppose it refers to second part?
It does not refer to converting the whole series to numbers? Because if I apply to whole series @val(nameofseries) it returns numbers and n/a...
Suppose it refers to second part?
It does not refer to converting the whole series to numbers? Because if I apply to whole series @val(nameofseries) it returns numbers and n/a...
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: something like str2num ?
@val will convert a whole alpha series, or a single character, into a number. Any text that doesn't represent a number will be converted into an NA.
Who is online
Users browsing this forum: No registered users and 2 guests
