how to create chain linked data series

how to create chain linked data series

Post by Hong Chua » Thu, 10 Apr 2003 12:51:05



Hi,
I've got a series of percentage changes for each month eg. inflation rate. I
want to create a price level series from that. How would I do that in SAS?
Eg,
I've got series called Change from t=1,...,T. I want to create a series
called Level where I preset Level(t=1)=100. Then
Level(t=2)=Level(t=1)*Change(t=2). Please help. Thanks.

Hong Leng

 
 
 

how to create chain linked data series

Post by Roger Lusti » Thu, 10 Apr 2003 22:52:18


Dear Hong Leng:

The RETAIN statement should help you here.

data new;
set old(keep=change);

*** Don't re-initialize the new variable each time;
*** Also, set initial value to 100;
retain level (100);

*** Multiply previous value by change amount;
if _n_>1 then level = level * change;
run;

Best,

Roger Lustig

PS: What happens to change(1)?


> Hi,
> I've got a series of percentage changes for each month eg. inflation rate. I
> want to create a price level series from that. How would I do that in SAS?
> Eg,
> I've got series called Change from t=1,...,T. I want to create a series
> called Level where I preset Level(t=1)=100. Then
> Level(t=2)=Level(t=1)*Change(t=2). Please help. Thanks.

> Hong Leng


 
 
 

1. dosFs2 Problem - lost chains" cross-linked with another chain NEED HELP!

Hi,

I am having a major Hard drive problem. I am using a motorola 8260
(PPC603core) and the following problem was seen when chkdsk is run on
the hard drive.

"/main/Ai" has illegal start cluster
"/main/Ai" file larger than its chain of clusters Entry will be
deleted.

"/main - lost chains" cross-linked with another chain
"/main - lost chains" cross-linked with another chain
"/main - lost chains" cross-linked with another chain

this last message repeats over and over. If the system is rebooted and
chkdsk is run again, the "/main - lost chains" cross-linked with
another chain message is all that is displayed and continues to
displayed over and over (for the last 15 hours).

As far as I can tell (after checking extensively) there never was a
file named Ai on the /main partition and no one had any files open in
write mode on the /main partition.

I need to know how this corruption can occur. I do know what the error
means, but this corruption should not occur if there were no files
open when the power was recycled or the machine was reset. It almost
appears as if every cluster on the /main partition is corrupted, the
FAT is definited screwed.

Does anyone know of any solutions to this problem. KNown causes?? Has
anyone seen this problem before????

Any help or info would be greatly appreciated.

Thanx in advance.

Shanan


2. Automatically start Remote Control for Win95 Question

3. Creating hypertext links while exporting SAS data to Excel

4. please tell me the ftp site of TI

5. Creating links in PDF files created with Adobe Illustrator...

6. Formating to ascii???

7. Link Created in Acrobat 5 does not link when tested in Reader 5

8. Win95 RAMDRIVE ?

9. Acrobat does not create all link all web links in a doc

10. Chain-Link Algorithm for Perimeter

11. create data entry from existing SAS data set ???

12. How to create a weekly data from a monthly data?

13. Creating SAS data set from Excel data