## rescale between 0 and 1 using eviews

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

hend elgamiel
Posts: 8
Joined: Sun Oct 08, 2017 9:38 am

### rescale between 0 and 1 using eviews

hi, i want rank firms into deciles based on cash balance and leverage and then ,i want rescale The two groups of ranked
to range between zero and one, respectively. how can do it step by step using eviews (how can rank firms into deciles based on cash and leverage and rescale between 0 and 1). my data in panel form.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11848
Joined: Tue Sep 16, 2008 5:38 pm

### Re: rescale between 0 and 1 using eviews

Need a lot more information on the structure of your data and exactly how you want to do the ranking.

hend elgamiel
Posts: 8
Joined: Sun Oct 08, 2017 9:38 am

### Re: rescale between 0 and 1 using eviews

1) my data is panel data, time seies from 2000 to 2016 for firms 90 firms. unbalanced data number of observation almost 1200 .
2) first , i want rank firms into deciles based on their cash balance and their leverage .and re-scale them to range
between zero and one.then create a composite score measure, OverFirm, which is computed as the average of ranked values of the two partitions variables.
3) i want perform it using eviews . can help me step by step.
4) any information you need it ask me. thank you

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11848
Joined: Tue Sep 16, 2008 5:38 pm

### Re: rescale between 0 and 1 using eviews

How does time fit in to 2)?

hend elgamiel
Posts: 8
Joined: Sun Oct 08, 2017 9:38 am

### Re: rescale between 0 and 1 using eviews

plz explain more what did you mean How does time fit in to 2)?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11848
Joined: Tue Sep 16, 2008 5:38 pm

### Re: rescale between 0 and 1 using eviews

To create a rank for a firm, you need 1 observation for that firm. You have 17 observations per firm. So you need to reduce those 17 years to a single observation, or you create 17 ranks for each firm.

hend elgamiel
Posts: 8
Joined: Sun Oct 08, 2017 9:38 am

### Re: rescale between 0 and 1 using eviews

i want create 17 ranks for each firm.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11848
Joined: Tue Sep 16, 2008 5:38 pm

### Re: rescale between 0 and 1 using eviews

In a program:

Code: Select all

`for !i=0 to 16   smpl @first+!i @first+!i   series ranks = @ranks(x)next`

hend elgamiel
Posts: 8
Joined: Sun Oct 08, 2017 9:38 am

### Re: rescale between 0 and 1 using eviews

i tried many times and syntex error . this my data plz learn me how rank into deciles and rescale between 0 and 1
Attachments
data.xls

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11848
Joined: Tue Sep 16, 2008 5:38 pm

### Re: rescale between 0 and 1 using eviews

hend elgamiel
Posts: 8
Joined: Sun Oct 08, 2017 9:38 am

### Re: rescale between 0 and 1 using eviews

my workfile and data
Attachments
data2.xls
data2.WF1

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11848
Joined: Tue Sep 16, 2008 5:38 pm

### Re: rescale between 0 and 1 using eviews

Code: Select all

`for !i=0 to 15   smpl @first+!i @first+!i   series ranks = @ranks(CASH_IN_FUTURE)next`

hend elgamiel
Posts: 8
Joined: Sun Oct 08, 2017 9:38 am

### Re: rescale between 0 and 1 using eviews

plz explain step by step how to perform these commands
smpl @first+!i @first+!i
series ranks = @ranks(CASH_IN_FUTURE)

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11848
Joined: Tue Sep 16, 2008 5:38 pm

### Re: rescale between 0 and 1 using eviews

File->New Program.

Copy and paste the code.

Click Run.

hend elgamiel
Posts: 8
Joined: Sun Oct 08, 2017 9:38 am

### Re: rescale between 0 and 1 using eviews

i tried many time and the programe say " Error in Sample: !I is not defined in "SMPL @FIRST+!I
@FIRST+!I".
plz give me steps with more explanations