Re: removing ?formatted missing values #7

  • Permalink
  • submit to reddit
  • Email
  • Follow


First off - let me say I joined this list about 2 weeks ago- and am enjoying
the stimulating discussions.  Its so often that we not able to keep up with
SAS- and the dynamic, spirit and advice that is being provided by the guru's
on this list is awesome.  Great work!!!

Thank you David for your sound advice.  I have some familiarity with survey
data (only been at it for
about 10 years now ;))- I'm going with IVEWARE- because it is a really good
imputation program- and also the National Center for Health Statistics used
it for their income imputations for the National Health Interview Survey-
and the survey I'm working is the child component of that- so there is some
precedent.

I'm only a recent convert to imputation.

Thanks much,
Mah-J


-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of
David L Cassell
Sent: Tuesday, November 29, 2005 3:39 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: removing ?formatted missing values


mah-j@statworks.com wrote:
>I'm working with a national survey that has the missing values set as .L
>and
>.M- (I'm not sure whether this is some kind of a format as these show up as
>. missing in frequencies etc.)- is there a general statement that I can use
>to remove these from the 100+ variables in the dataset- such as format
>_all_
>for real formats?
>
>The reason I need to do this is that I'm running an imputation using
>IVEWARE
>(SAS callable procedure)- and for some reason- this program doesn't like
>the
>.L and .M's
>
>ps: Any users of IVEWARE on this list- willing to humor a few questions?

[1]  If you have a "national survey", I hope you're going to use survey
sample
methods for analysis.  Since you're working with IVEware, I assume you have.

[2]  You can use PROC MI in SAS 9 for multiple imputation as well, and then
you can get more help from this list.  PROC MI *does* know how to handle
what we call "special missing values".

[3]  The purpose of special missing values is to provide additional
meta-data to
the user.  It's not only a missing value, it's also a floorwax!  Sorry, I
couldn't resist
the old SNL joke.  It is not only a missing value, it is also a descriptor
for the cause
of the missing-ness, or the consequences of the missing-ness.  So look up
the
meaning of these special missing values, because they may need to be treated
differently than other missings.  That may impact the imputation, as well as
the
later analyses.

[4]  You can always ask IVEware quesitons here.  You may not find anyone
with a
good answer, but you can ask...

HTH,
David
--
David L. Cassell
mathematical statistician
Design Pathways
3115 NW Norwood Pl.
Corvallis OR 97330

_________________________________________________________________
Don�t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
0
Reply msoobader (65) 11/30/2005 2:51:06 PM

See related articles to this posting

comp.soft-sys.sas 131320 articles. 29 followers. Post

0 Replies
179 Views

Similar Articles

[PageSpeed] 2


Reply:

Similar Artilces:

Re: removing ?formatted missing values
I assume that it is the MISSING= option. Simply use options missing=.; to get the "normal" missings. On Tue, 29 Nov 2005 11:52:19 -0500, mah-j@statworks.com <msoobader@VERIZON.NET> wrote: >Hi, > >I'm working with a national survey that has the missing values set as .L and >.M- (I'm not sure whether this is some kind of a format as these show up as >. missing in frequencies etc.)- is there a general statement that I can use >to remove these from the 100+ variables in the dataset- such as format _all_ >for real formats? > >The reason I need...

Re: removing ?formatted missing values #3
Hi, I'm working with a national survey that has the missing values set as .L and ..M- (I'm not sure whether this is some kind of a format as these show up as .. missing in frequencies etc.)- is there a general statement that I can use to remove these from the 100+ variables in the dataset- such as format _all_ for real formats? The reason I need to do this is that I'm running an imputation using IVEWARE (SAS callable procedure)- and for some reason- this program doesn't like the ..L and .M's ps: Any users of IVEWARE on this list- willing to humor a few questions? Thank ...

Re: removing ?formatted missing values #2
Thanks - that doesn't work. -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of Gerhard Hellriegel Sent: Tuesday, November 29, 2005 12:07 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: removing ?formatted missing values I assume that it is the MISSING= option. Simply use options missing=.; to get the "normal" missings. On Tue, 29 Nov 2005 11:52:19 -0500, mah-j@statworks.com <msoobader@VERIZON.NET> wrote: >Hi, > >I'm working with a national survey that has the missing values set as .L and >.M- (I'm not sure w...

Re: removing ?formatted missing values #5
Mah-J, You are, in fact, dealing with numeric missing values. SAS allows a range of missing values in order to allow you to handle, for instance, different reasons for a respondent not to answer a survey. The sort order is: ._ . .A - .Z So, the proper action for what you want is to translate all those to the default missing value of ".". Try this code to prove the point: data test; var = 29; output; var = .; output; var = .L; output; var = 34; output; var = .M; output; run; proc print; data change; set test; if var <= .Z then var = .; run; proc print; run...

Re: removing ?formatted missing values #4
Thank you for the detailed explanation- very helpful and worked nicely. Thanks also to Dan- same solution. Mah-J -----Original Message----- From: Skogmo, Arild [mailto:Arild.Skogmo@ssb.no] Sent: Tuesday, November 29, 2005 12:41 PM To: mah-j@statworks.com Subject: SV: Re: removing ?formatted missing values Hi, they .M and .L's and so on are missing values, just special kinds.. It is to distinguish between missings... for example in a proc freq. read: http://support.sas.com/documentation/onlinedoc/91pdf/sasdoc_913/base_lrconce pt_8943.pdf from page 101 on.. check this, I think you can ...

Re: removing ?formatted missing values #6
mah-j@statworks.com wrote: >I'm working with a national survey that has the missing values set as .L >and >.M- (I'm not sure whether this is some kind of a format as these show up as >. missing in frequencies etc.)- is there a general statement that I can use >to remove these from the 100+ variables in the dataset- such as format >_all_ >for real formats? > >The reason I need to do this is that I'm running an imputation using >IVEWARE >(SAS callable procedure)- and for some reason- this program doesn't like >the >.L and .M's > >p...

Re: Formating missing values in date column #7 663975
Ian and David , I used the anydate informat to get the date values into a SAS Data set simply becuase I was being lazy. Toby Dunn From: Ian Whitlock <iw1junk@COMCAST.NET> Reply-To: iw1junk@COMCAST.NET To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Formating missing values in date column Date: Thu, 20 Apr 2006 15:54:45 +0000 David, I have to disagree. First of all the question was how to replace a missing numeric value with a character string, and the informat ANYDTDTE cannot handle that problem. Second I would look with great suspicion on any code using ANYDTDTE. It cannot tell yo...

Re: Formating missing values in date column #7 1552659
Madan , See if one of these meets your needs: data one ; infile cards ; input start anydtdte. stop anydtdte. ; cards ; 01/19/06 02/02/06 01/19/06 . 01/30/06 02/02/06 01/26/06 01/28/06 01/08/06 01/16/06 01/23/06 01/26/06 01/23/06 01/26/06 12/30/05 01/25/06 01/10/06 . 01/17/06 01/25/06 01/24/06 01/30/06 01/15/06 01/29/06 02/01/06 02/05/06 02/17/06 . 02/01/06 02/05/06 01/28/06 02/06/06 02/02/06 02/06/06 02/04/06 02/14/06 02/03/06 02/18/06 ; run ; proc format ; value MissFMT '01JAN1970'd - High = [Date9.] other = 'NAV' ; ; ru...

Re: How to replace the Missing Value with the correct Value by #7
Maryann, I'm not sure if you got the needed solution yet. Here is one way I think might solve it: data have; infile datalines missover; input policy @9 year yymmdd8. @25 effective_date yymmdd8.; format year effective_date yymmddn8.; datalines; 1 20040930 1 20050930 20050801 1 20060930 20060801 1 20070930 20070801 1 20080930 20080801 2 20040930 20031001 2 20050930 2 20060930 20051001 2 20070930 20061001 2 20080930 20071001 3 20070930 3 20...

Re: proc format value assignment oddity
Paul: An 'empty' character value ('') does not appear to have any meaning in = PROC FORMAT (MSW SAS, V9.13). This program demonstrates that: proc format; value $miss ' ' =3D 'missing' '00'x =3D 'null '=20 other =3D 'notMiss' ; run; quit; data test; length x $ 10; x=3D''; output; x=3D' '; output; x=3D'00'x; output; x=3D'z'; output; run; proc freq data=3Dtest; tables x/missing; format x $miss. ; run; quit; It does not seem to matter how many blanks one uses to make a missing = character...

Re: proc format value assignment oddity
Thanks Ron - this seems very sensible, (after it's been explained, that is). So in this context '' is seen by Proc Format as ASCII '27'x and "" is seen as '22'x - seems that Mike's response gets at the reason - open text is allowed to the left of the assignment statement, and '' and "" are defined as you say in open text. Sig's comment re standards in this era of DBMS connectivity are well taken! Paul Choate DDS Data Extraction (916) 654-2160 -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On...

Re: proc format value assignment oddity
Paul, I see you have some good answers. I think several years ago Peter Lund gave a SUGI paper on formats in which he discussed the problem. Over the years I have developed the following conventions for using quote marks in SAS. 1) Never use single quotes unless you have to, i.e. to hide macro triggers. (65% doesn't matter, 30% either matters or will when modified, 5% must be single quotes and they will stick out as important.) 2) Never use "" to mean " " - usually they mean the same in SAS, but not always. (options formdlim=""; and i...

Re: Missing value #7
Thanks for the suggestion Zack. Also, I used the EOF option (from a previous post in the forum) to solve the LOST CARD problem. Thanks a lot Cheers, Kumar On 3/26/07, Zack, Matthew M. (CDC/CCHP/NCCDPHP) <mmz1@cdc.gov> wrote: > > See the DO-END loop below that writes the data to the output data set, > ID. This new code resets the index, I. > > You still have a LOST-CARD problem (cf., the LOG). > > Matthew Zack > > -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of > SAS-L Nirmal > Sent: Monday, March ...

Re: missing values #7
Mia - try this: data revenue; input dept $ rev ; cards; 001 100 002 200 003 250 005 100 ; proc sort; by dept; data expense; input dept $ exp ; cards; 001 80 003 200 004 60 007 50 ; proc sort; by dept; data Income; merge revenue expense; by dept; retain Inc; if first.dept then Inc=0; Inc=sum(rev,-1*exp,Inc); /** sum allows you to add missing values **/ proc print; run; Or you can use Proc Summary: data revenue; input dept $ rev ; cards; 001 100 002 200 003 250 005 100 ; data expense; input dept $ exp ; rev=-1*exp; cards; 001 80 003 ...

Re: Formating a Macro value ?? #7
On Thu, 31 Jul 2008 08:38:40 -0700, Duell, Bob <BD9439@ATT.COM> wrote: >Because CALL SYMPUT does not use the formatted value of the variable. >(BTW, this annoys me sometimes.) If you just want to apply whatever format is in place without even knowing, use the VVALUE function: Data test ; time = datetime(); format time datetime20.; call symput('time', vvalue( time )); Run; >Try this instead: > >Data test ; > time = datetime(); > format time datetime20.; > call symput('time', put( time, datetime20. )); >Run; >proc pr...

Re: Missing values to zeros #7
On Sun, 20 Aug 2006 23:24:26 -0700, jayesh <jayesh.natrajan@GMAIL.COM> wrote: >Hi , > >Use DECODE function of SQL. That's not in PROC SQL. The PUT function could be used instead, but it gets tricky because of data type concerns. > >Regards, >Jayesh N > >sasguy wrote: >> How can we covert missing values to zeros of around hundred variables >> without using >> if-then-else >> is there any efficient way we can write? >> Thanks in advance ...

Re: newbie: Missing values #7
calculating a average by AVSBP = ((HSBP1 + HSBP2 + SBP)/3); might not be a good idea. Better use the MEAN function. Gerhard On Mon, 31 Mar 2008 06:57:07 -0400, Howard Schreier <hs AT dc-sug DOT org> <schreier.junk.mail@GMAIL.COM> wrote: >On Sun, 30 Mar 2008 20:46:22 -0400, lp <lp@MENON.US> wrote: > >>Hi, >>Sorry, if this is a basic question but, I have a SAS data set and have >>weight and height as my variables and am attempting to calculate BMI, >>however, there are missing values on some of the cells (indicated as '.' and >>...

Re: Numerical missing values #7
Karovaldas@GMAIL.COM wrote: >I use SPSS and can define any numeric values of a variable to be >treated as missing. I've been searching for way to do that in SAS and >can't seem to be able to find it. Is it possible to declare a value of >999 in variable VAR1 to be treated as missing in all analyses and >reports? > >The only way I found to do this is to recode the value of 999 to >something like '.a'. I am a bit confused about SAS approach to missing >values that are coded with different numeric codes. Appreciate all >help I can get. I see that...

Re: Formats with missing values in 9.2
hi ... what does "problem" mean ... this works fine in 9.2 for me ... proc format; VALUE ALERTFMT .F ="Forgot item" 1 ="Alert" 2 ="Drowsy" 3 ="Stupor" 4 ="Coma" ; run; data x; input x @@; datalines; 1 2 3 4 .f ; run; proc print data=x; format x alertfmt.; run; Obs x 1 Alert 2 Drowsy 3 Stupor 4 Coma 5 Forgot item -- Mike Zdeb U@Albany School of Public Health One University Place Rensselaer, New York 12144-3456 P/518-402-6479 F/630-604-1475 > I have found that ...

Re: Formating missing values in date column
Hi, skip the $ -sign in your format. Dates are numeric. Try : proc format; value NAVdate . ='N/AV' other=[mmddyy8.]; run; options yearcutoff=1920; data test; input start : mmddyy8. stop : mmddyy8.; cards; 01/19/06 02/02/06 01/19/06 . 01/30/06 02/02/06 01/26/06 01/28/06 01/08/06 01/16/06 ; proc print; format _numeric_ NAVdate.; run; On Wed, 19 Apr 2006 11:30:13 +0530, Madan Gopal Kundu <Madan.Kundu@RANBAXY.COM> wrote: >Hi, >I have the following dataset with two columns of date. The last column >contain missing value at three positions....

Re: format different types of missing values
change the define statement to: define a / display format=miss.; ^^^^^^^ Why? I don't know. It seems to me if you don't specify it as a display var, it is by default treated as a summary var, but the result show of two obs seem to contradict this. Maybe Mr. Pass can give us some explanation? Kind regards, Ya -----Original Message----- From: Kevin Auslander [mailto:kauslander@TERRECRS.COM] Sent: Monday, July 14, 2003 8:04 AM To: SAS-L@LISTSERV.UGA.EDU Subject: format different types of missing values The following code: data set1; input a b $; ...

Re: Missing values---the simplest code #7
On Thu, 2 Dec 2004 14:07:32 -0500, Moud, Kamyar <Kamyar.Moud@CIBC.CA> wrote: >Hi SAS-L > >A simple one: > >I have 50 columns with different names and some of them contain missing values. How can I replcae these missing variables with a constant number. what is the simplest code to replace these missing values? > >Thanks for your help > >Kam I think the simplest way uses option missing = "<constant value>"; Probably only the first character of multiple value would appear. I think the reason this is best, is that it affects only the output...

Re: Creating missing string values. #7
Try Val=''; hth Paul Choate DDS Data Extraction (916) 654-2160 -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Friar Broccoli Sent: Friday, February 03, 2006 5:45 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Creating missing string values. Hi; I just discovered that I could create a missing string value using val=PUT(.,8.); thus avoiding the numeric value converted to string value note. Is there a more elegant way to do this? Friar Broccoli Robert Keith Elias, Quebec, Canada Email: EliasRK (of) gmail * com Best programmer's &am...

Re: What happened to my special missing values? #7
Dan, Good point. I tried doing the PROC FREQ with the format removed, like Mike suggested. The output shows a U value for missing - not a regular missing. I agree that we need to see more information. Jack Clark Research Analyst Center for Health Program Development and Management University of Maryland, Baltimore County -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Mike Rhoads Sent: Monday, April 21, 2008 3:19 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: What happened to my special missing values? I suspect Dan is right -- I had another ...