Last Observation Carried Farward (LOCF)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Last Observation Carried Farward (LOCF)

Ray Haraf
Hi there!

I am running ANOVA with missing data for which I want to carry forward the
last observation (LOCF). There no such an option for missing data in SPSS.
Can someone suggest a syntax to accomplish LOCF in SPSS 18?

Thanks,
Ray

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Last Observation Carried Farward (LOCF)

Mike
On Wednesday, May 05, 2010 10:31 AM, Ray Haraf wrote:
> Hi there!
>
> I am running ANOVA with missing data for which I want to carry
> forward the last observation (LOCF). There no such an option for
> missing data in SPSS.Can someone suggest a syntax to accomplish
> LOCF in SPSS 18?

:LOCF is not a good way to analyze data because of issues
with missingness and assumption that the last value is appropriate
or valid to represent subsequent time values.  That being said,
over a decade ago I had to do such an analysis and I think that
following syntax might do the trick but I have not tested on
actual data (let me know if there are errors):

* Assuming you have 20 repeated measurements.

subtitle 'Computing Last Variable with Nonmissing Value'.

compute last_var= 20.
compute last_value=$SYSMIS.

vector value_vec=var1 to var20.
do if(missing(value_vec(20)).
loop #i=1 to 20 if (missing(value_vec(20-#i))).
compute last_var=(last_var - 1).
end loop.

compute last_value=value_vec(last_var).

loop #j=1 to 20 if (last_var lt 20).
do if (missing(value_vec(#j))).
compute value_vec(#j)=last_value.
end if.
end loop.

-Mike Palij
New York University
[hidden email]

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Last Observation Carried Farward (LOCF)

Bruce Weaver
Administrator
In reply to this post by Ray Haraf
Ray Haraf wrote
Hi there!

I am running ANOVA with missing data for which I want to carry forward the
last observation (LOCF). There no such an option for missing data in SPSS.
Can someone suggest a syntax to accomplish LOCF in SPSS 18?

Thanks,
Ray
Ray, you might want to take a look at Dave Streiner's article, "Missing data and the trouble with LOCF".  You should be able to access it here:

   http://ebmh.bmj.com/content/11/1/3.2.full

Streiner calls LOCF "fatally flawed", and says it should "never be used, despite its imprimatur by various governmental drug approval agencies and the Cochrane Collaboration."

--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: Last Observation Carried Farward (LOCF)

Mike
On Wednesday, May 05, 2010 1:25 PM, Bruce Weaver wrote:

> Ray Haraf wrote:
>> Hi there!
>> I am running ANOVA with missing data for which I want to
>>carry forward the last observation (LOCF). There no such an
>>option for missing data in SPSS. Can someone suggest a syntax
>>to accomplish LOCF in SPSS 18?
>
> Ray, you might want to take a look at Dave Streiner's article, "Missing data
> and the trouble with LOCF".  You should be able to access it here:
>
>   http://ebmh.bmj.com/content/11/1/3.2.full
>
> Streiner calls LOCF "fatally flawed", and says it should "never be used,
> despite its imprimatur by various governmental drug approval agencies and
> the Cochrane Collaboration."

I don't want to come off soundling like an advocate for LOCF
because I do think there are better ways of dealing with missing
data and the best method will be dependent upon the nature of
the data and the factors operating in the situations in which they
were collected.  But it seems to me that Streiner's objection
is mainly the following:

If after the last available value, subsequent values woul either
systematically go up or go down, then LOCF will provide biased
estimates for the missing values.

However, he does not deal with the case where there may be
routine data collection and the data have asymtopted at some
level, that is, they randomly vary around some mean value over
time (e.g., in a placebo or control condition).  In this case, the
LOCF just represents the steady state value for the variable,
though one might suggest adding some random error comparable
to earlier data to maintain the variability of the values after the
last value.  Streiner rightly points out that if value should increase
or decrease subsequent to the last value, then LOCF will not be
a good substitute value.  If there is not systemative tendency to
increase or decrease, then LOCF will not be biased though alone
it will underestimate the varaince.

Again, one needs to know why are there missing values and
under what conditions they are missing.  One has to understand
the data and why it is what it is and not mindlessly apply techniques
to solve problems.

-Mike Palij
New York University
[hidden email]

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD