LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2006, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sun, 30 Apr 2006 22:49:46 -0400
Reply-To:     "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Subject:      Re: Lifecycle Analysis: Depreciate Assets into the Future?

On Wed, 26 Apr 2006 18:23:11 -0400, Peter Larsen <phlarsen@YAHOO.COM> wrote:

>Hi Folks- > >BACKGROUND: I am building a program that contains different types of >public infrastructure that have various lifespans (e.g. 10 and 15 years in >my example below). Ideally, I would like to see the value of these assets >depreciate over time based on the lifespan identified in the dataset. > >In the future (i.e. Year_2007, Year_2020, etc.), if the value of the asset >hits (or goes below) zero, I want to have SAS replace that depreciated >value with the original value (i.e. ReplValue) AND begin the depreciation >process all over again until the program reaches the date identified in >the %let statement (i.e. FUTURE). Finally, I would like to calculate the >present value of what it would cost in today's dollars to replace the >piece of infrastructure as many times as necessary given the lifespan of >the asset and FUTURE date identified in the %let statement. > >QUESTION: How do I go about doing all of this assuming that: >A) The rate of depreciation could be linear OR could be exponential with >both types of decay based on the lifespan of the asset. For example, an >asset with a 10 year lifespan decayed linearly would show the asset >decreasing 10% per year until it reaches zero in 2016. NOTE: For reasons >I don't want to get into now, it is entirely plausible that the >exponential decay would occur in addition to the linear decay. So, in >short, I would like to see two sets of present value results: one just >linear and the other an exponential decay in addition to the linear decay >over time. Make sense? > >B) The interest rate used is the PV calculation is fixed. > >As usual, many thanks for your help in advance. I assume this is some >sort of nested "do" loop statement, but I can't figure it out just yet.

Show your code, and the results, and explain the deficiencies.

> >Pete > >---------------------- >options macrogen mlogic source source2 symbolgen sortsize = >80M; > >TITLE1 'INFRASTRUCTURE DATABASE'; >DATA INFRA; > INPUT Location $ Type $ ReplValue YearBuilt LifeSpan; > CARDS; > Bethel School 10000 2006 10 > Nome School 20000 1960 15 >; >run; > >%macro generic; > >%let FUTURE = 2026; >%let INTRATE=0.07; > >data Infra; > set Infra; > format ReplValue dollar20.; > informat ReplValue dollar20.; > %do i=2006 %to &FUTURE.; > Year_&i.=ReplValue; > format Year_&i. dollar20.; > informat Year_&i. dollar20.; > %end;

The DATA step has array and looping features. It's not necessary to use macro code to control repetitious processes.

>run; > >%mend generic; >%generic;


Back to: Top of message | Previous page | Main SAS-L page