s-news
[Top] [All Lists]

Re: replace missing with previous value

To: CHUL LEE <chullee@students.wisc.edu>
Subject: Re: replace missing with previous value
From: Patrick Burns <pburns@pburns.seanet.com>
Date: Wed, 01 Feb 2006 21:58:21 +0000
Cc: s-news@lists.biostat.wustl.edu
In-reply-to: <e95a961b15a07.15a07e95a961b@wiscmail.wisc.edu>
References: <e95a961b15a07.15a07e95a961b@wiscmail.wisc.edu>
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
This is known as 'Last Observation Carried Forward' or
LOCF.  There is a discussion of algorithms for it somewhere
in the R archives.

You do not want to do serious computing in Excel or other
spreadsheets -- see
http://www.burns-stat.com/pages/Tutor/spreadsheet_addiction.html


Patrick Burns
patrick@burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and "A Guide for the Unwilling S User")

CHUL LEE wrote:

Dear list,
It is not an issue of S-Plus, but I know someone in this forum can help me. I have data which have missing cases. I want to replace this missing with above value. For example,

Col1      Col2
Smith     3
         2.5
         4
Johnson   4
         4.5
         3
         2.5


In this case, I want to replace Row 2 & 3 in Col1 with Smith, but Row 5,6,&7 with Johnson. Is there a easy way to do by Excel or with Statistics programs? This data has more than 80,000 rows.

Chul
--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news





<Prev in Thread] Current Thread [Next in Thread>