LVCF

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

LVCF

Margaret Wallen

 


I have a databases where each case has several data points from 3 different data collection points in time.  I have very little missing data, ie just a couple of variables for a couple of cases.  However, I would like to carry the baseline value forward to the missing data point at the later time point.  Also, I would like to do this in such a way that I can log it in the syntax file and have it saved for checking and reproducing. Thanks for any assistance
Reply | Threaded
Open this post in threaded view
|

Re: LVCF

Maguin, Eugene
Margaret,

It sounds like what you want to do has two parts to it. One part is
documentation and the second is the actual carry forward and replacement.
There is a way to do the replacement through syntax. There is also an spss
command, RMV, that can do missing value replacement. The documentation part,
at least as I envision it, is pretty simple to do. But, if you truly have
two cases with missing values on two variables, I wonder why you don't just
do the replacement and documentation by hand. Scan down the data file to
find the problem, look backward or to the left, depending how your dataset
is organized, to find the replacement value and then write four lines of
code to replace the values and, simultaneously, document the replacement.

If your dataset is too long or wide to do the missing value search by
scanning, then you might use this code to find the problem case(s).

Temporary.
Select if (missing(x1) or missing(z27)).
List caseid x1 z27.

Please reply on list if you want more.

Gene Maguin




>>I have a databases where each case has several data points from 3
different data collection points in time.  I have very little missing data,
ie just a couple of variables for a couple of cases.  However, I would like
to carry the baseline value forward to the missing data point at the later
time point.  Also, I would like to do this in such a way that I can log it
in the syntax file and have it saved for checking and reproducing. Thanks
for any assistance

=====================
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: LVCF

hillel vardi
In reply to this post by Margaret Wallen
Shalom

Here is a syntax that will ccarry the baseline value forward and replace
latter  missing  data with it .

dataset close all.
data list  FIXED / ID 1-6 (a)   RiskDate 9-19(edate)    RiskLevel
30-32   FinalScore 40-45(f) .
begin data
025319   9-Feb-2010 08:16:53 33        93.27
025319  12-Dec-2009 23:06:11 65        38.47
025319  28-Aug-2009 21:26:02           42.97
025319  29-Jul-2009 07:37:00 11        47.77
025319  30-Apr-2009 18:38:28  2        41.87
025319   6-Apr-2009 22:06:10
025319  17-Dec-2008 17:04:35
025319  16-Sep-2008 16:16:38 23        44.97
025319  16-Jun-2008 13:32:32 11        51.73
025320  24-Mar-2008 13:33:40 45        81.73
025320  24-Feb-2008 18:04:11 65        51.73
025320  28-Nov-2007 10:12:13 17        38.6
025320  23-Feb-2006 16:59:33 77
025320   2-Jan-2009 10:10:02           53.07
025320  12-Oct-2008 00:07:12           53.07
025320  14-Jul-2008 21:53:34  2
025320  13-Apr-2008 17:36:18 98        66.49
end data .
formats   FinalScore (f6.2) .
sort cases by id RiskDat .
add files  file= * / by id/ first=first .
if first eq 1  #RiskLevel =  RiskLevel  .
if first eq 1  #FinalScore =  FinalScore .
do if  sysmis(RiskLevel)  or sysmis(FinalScore)  .
print /  ID   RiskDate #RiskLevel #FinalScore  .
end if.
if first eq 0  and sysmis(RiskLevel)   RiskLevel=  #RiskLevel    .
if first eq 0  and sysmis(FinalScore)   FinalScore=  #FinalScore    .
execute .



Hillel  Vardi
BGU

Margaret Wallen wrote:

>
>
> ------------------------------------------------------------------------
>
> I have a databases where each case has several data points from 3
> different data collection points in time.  I have very little missing
> data, ie just a couple of variables for a couple of cases.  However, I
> would like to carry the baseline value forward to the missing data
> point at the later time point.  Also, I would like to do this in such
> a way that I can log it in the syntax file and have it saved for
> checking and reproducing. Thanks for any assistance

=====================
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: LVCF

Bruce Weaver
Administrator
In reply to this post by Margaret Wallen
Margaret Wallen wrote
I have a databases where each case has several data points from 3 different data collection points in time.  I have very little missing data, ie just a couple of variables for a couple of cases.  However, I would like to carry the baseline value forward to the missing data point at the later time point.  Also, I would like to do this in such a way that I can log it in the syntax file and have it saved for checking and reproducing. Thanks for any assistance                                          

Margaret, have you seen Dave Streiner's article, "Missing data and the trouble with LCOF"?

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

HTH.
--
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: LVCF

Melissa Ives
That link goes to a page where you can log in to read or purchase the article.
If that doesn't appeal to you, there was an earlier message on this list that provided a summary:

Re: [SPSSX-L] Last Observation Carried Farward (LOCF)
  From: Mike Palij <[hidden email]>
  Date: May 05 2010 - 1:41pm


Melissa
-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bruce Weaver
Sent: Friday, July 30, 2010 6:21 AM
To: [hidden email]
Subject: Re: [SPSSX-L] LVCF

Margaret Wallen wrote:

>
>
> I have a databases where each case has several data points from 3
> different data collection points in time.  I have very little missing
> data, ie just a couple of variables for a couple of cases.  However, I
> would like to carry the baseline value forward to the missing data
> point at the later time point.  Also, I would like to do this in such
> a way that I can log it in the syntax file and have it saved for
> checking and reproducing. Thanks for any assistance
>


Margaret, have you seen Dave Streiner's article, "Missing data and the trouble with LCOF"?

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

HTH.


-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/LVCF-tp2256831p2259423.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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

PRIVILEGED AND CONFIDENTIAL INFORMATION
This transmittal and any attachments may contain PRIVILEGED AND
CONFIDENTIAL information and is intended only for the use of the
addressee. If you are not the designated recipient, or an employee
or agent authorized to deliver such transmittals to the designated
recipient, you are hereby notified that any dissemination,
copying or publication of this transmittal is strictly prohibited. If
you have received this transmittal in error, please notify us
immediately by replying to the sender and delete this copy from your
system. You may also call us at (309) 827-6026 for assistance.

=====================
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