[R] Multiple missing values
Joe King
jp at joepking.com
Sun Feb 14 19:34:16 CET 2010
Gary King's Amelia package for R and a stand alone version does EM algorithm
multiple imputation.
Joe King
206-913-2912
jp at joepking.com
"Never throughout history has a man who lived a life of ease left a name
worth remembering." --Theodore Roosevelt
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Frank E Harrell Jr
Sent: Sunday, February 14, 2010 9:39 AM
To: Patrick Burns
Cc: r-help at r-project.org; john.macinnes at ed.ac.uk
Subject: Re: [R] Multiple missing values
Patrick Burns wrote:
> I can think of a few solutions, none perfect.
>
> * You could have a master dataset that has the
> missing value codes you want, and a dataset that
> you use which is a copy of it with real NA's in it.
>
> * You could add an attribute that gives the types
> of missing values in the various positions. The
> downside is that attributes tend to disappear with
> subsetting.
The sas.get function in the Hmisc exemplifies that approach, and it has
a subsetting method that preserves the special.miss attribute.
Frank
>
> * If you only have two types, you might be able to
> get away with using NaN as the second type of NA.
>
> On 14/02/2010 14:33, John wrote:
>> Does anyone know, or know documentation that describes, how to declare
>> multiple values in R as missing that does not involve coding them as
>> NA? I
>> wish to be able to treate values as missing, while still retaining codes
>> that describe the reason for the value being missing.
>>
>> Thanks
>>
>> John MAcInnes
>>
>>
>>
--
Frank E Harrell Jr Professor and Chairman School of Medicine
Department of Biostatistics Vanderbilt University
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list