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 2008, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 10 Apr 2008 14:25:26 -0400
Reply-To:   Muthia Kachirayan <muthia.kachirayan@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Muthia Kachirayan <muthia.kachirayan@GMAIL.COM>
Subject:   Re: Modeling Cumulative Percentages
Comments:   To: jeffrey.m.allard@gmail.com
In-Reply-To:   <e0a4eb06-1959-48d1-967f-35563d8fbbbd@k37g2000hsf.googlegroups.com>
Content-Type:   text/plain; charset=ISO-8859-1

On Thu, Apr 10, 2008 at 8:11 AM, <jeffrey.m.allard@gmail.com> wrote:

> Hello All- > > Can anyone point me in a direction for a good way to model a > cumulative (percentage complete)curve? Specifically, I am able to > observe from point in time zero, the number of events by day (these > are responses to a marketing promotion). I observe the data for say 2 > years: > Day 1: 380 > Day 2: 420 > .. > Day 60: 25 > .. > Day 720: 5 > > and I want to be able to model this as a 'percentage complete' bounded > by 0 and 100% over time, extending out beyond my observed time period > (there will be small counts out there but I know responses still occur > even after 2 years). I need the model to predict percentage and not > actual counts. > > Thanks! >

I think that you have a frequency distribution and you want to compute cumulative frequency in percents for the first 720 observations. This means that the cumulative frequency is found for the first 720 observations and cumulative_total and output the percent of observations by dividing the cumulated frequency by cumulative_total. All observations beyond 720 are to be ignored. If this is correct, then you can do it this way.

data have; do day = 1 to 1000; x = round((ranuni(123) * 999),1); output; end; run; %let n = 720; data need; if _n_ = 1 then do; do i = 1 to &n; set have ; tot ++ x; end; end; do i = 1 to &n; set have; cum_x ++ x; cum_p = cum_x / tot * 100; output; end; stop; drop i tot cum_x; run; proc print data = need; run;

Muthia Kachirayan


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