<div dir="ltr">Yes I understand the need for the special values, and your answer just confirms what I had thought: they&#39;re needed only to avoid &lt;accidental&gt; treatment as valid values.<div><br></div><div>This shouldn&#39;t be the case, however, if the researcher really knows what to do.</div>

<div>As you say, in SPSS the value -1 can be declared as missing, and in R one could simply calculate the mean of a vector excluding the negative values, or create a copy of the entire dataset where all the negative values are replaced with NAs.</div>

<div><br></div><div>This is simply a matter of procedure, which is software independent. However, &lt;special&gt; numeric values are not software independent, while using DDI as a common gateway should (in principle) be universal, rather than specific.</div>

<div><br></div><div>No matter what the software package is, when a researcher is careful to replace the respective negative values with missings, there would be no mistakes... which kind of works along my argument with cross-portability.</div>

<div><br></div><div>The DDI file could contain only valid numeric values, and then researchers might convert those to any kind of special missings depending on software.</div><div><br></div><div>Adrian</div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">On Tue, Jun 24, 2014 at 4:56 PM, Hoyle, Larry <span dir="ltr">&lt;<a href="mailto:larryhoyle@ku.edu" target="_blank">larryhoyle@ku.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">







<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">In SAS and Stata the values ._   .a - .z are special numeric values, treated as missing, which compare less than the smallest valid value.<u></u><u></u></span></p>


<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">If you use -1, for example, to represent “refused” and compute a mean on the variable the -1 will be included in the computation – not ignored.<u></u><u></u></span></p>


<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Using a scheme like<u></u><u></u></span></p><div class="">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">value timetopg <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">1 = &#39;1-2 mos&#39;<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">2 = &#39;3-5 mos&#39;<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">3 = &#39;6-12 mos&#39;<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">4 = &#39; &gt; 1 yr&#39;<u></u><u></u></span></p>
</div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">.r = &#39;Refused&#39;<u></u><u></u></span></p><div class="">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">.d = &quot;don&#39;t  remember&quot;<u></u><u></u></span></p>
</div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">.s  = &#39;set to missing by rule&#39;<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">.o = &#39;other missing&#39;<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">;<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Would allow you to compute statistics ignoring the missing values as well as tabulations using the missing values (e.g. computing the % refused).<u></u><u></u></span></p>


<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">In packages like SPSS one can specify that otherwise valid values (like -1 in your example) can be treated as missing. The advantage of using “out of band”
 values is that they cannot accidentally be treated as valid values.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">R, I believe, only has two missing values: NA and NaN. In order to prevent treating -1 - -4 as valid values in your example in R you would need to transform
 the variable to convert all of these values to NA.  If you are moving data from any software that allows multiple missing values SPSS, SAS or Stata to R you may need to use NA as the missing value for all of the categories and perhaps create a secondary variable
 preserving the different values of missing. <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">--- Larry Hoyle<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:ddi-users-bounces@icpsr.umich.edu" target="_blank">ddi-users-bounces@icpsr.umich.edu</a> [mailto:<a href="mailto:ddi-users-bounces@icpsr.umich.edu" target="_blank">ddi-users-bounces@icpsr.umich.edu</a>]
<b>On Behalf Of </b>Adrian Du?a<br>
<b>Sent:</b> Tuesday, June 24, 2014 4:03 AM<br>
<b>To:</b> Data Documentation Initiative Users Group<br>
<b>Subject:</b> Re: [DDI-users] DDI-users Digest, Vol 105, Issue 6 (SAS/Stata extended missings)<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hi Bob,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I&#39;ve never used SAS, but have to ask something regarding these different types of missings.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Is there any particular advantage of .r, .d and .m over something like:<u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">value timetopg <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">1 = &#39;1-2 mos&#39;<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">2 = &#39;3-5 mos&#39;<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">3 = &#39;6-12 mos&#39;<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">4 = &#39; &gt; 1 yr&#39;<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">-1 = &#39;Refused&#39;<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">-2 = &quot;don&#39;t  remember&quot;<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">-3 = &#39;set to missing by rule&#39;<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">-4 = &#39;other missing&#39;<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">;<u></u><u></u></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I&#39;m thinking about cross portability of these codes, and the above suggestion would work (I think) in every statistical package while .d and .r etc are specific for SAS only.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Adrian<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Mon, Jun 23, 2014 at 7:49 PM, Bob McConnaughey &lt;<a href="mailto:bobmcconn@gmail.com" target="_blank">bobmcconn@gmail.com</a>&gt; wrote:<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">i suspect i&#39;m belaboring the obvious here, but here&#39;s how SAS treats numeric missings<u></u><u></u></p>
</div>
<p class="MsoNormal">SAS numeric missings appear to be &quot;character strings&quot; - but they are treated, within SAS (and Stata i believe) as &quot;invented&quot; numbers, smaller than the &quot;smallest&quot; negative number.  eg -1*10**10000 &gt; .z &gt; .a &gt; . &gt; ._ ;  (though i don&#39;t think
 i&#39;ve ever seen &quot;._&quot; used).  However their great virtues are: 1. As &quot;known&quot; missings they automatically get excluded from computations involving the variable they represent.  And, like any other value (character or numeric) the can be described using formats..
  That is when you do, say, a frequency proc and assign formats to the missing you&#39;d see something like:<u></u><u></u></p>
<div>
<p class="MsoNormal">time_to_pregnancy1<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">value timetopg <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">  1-2 = &#39;1-2 mos&#39;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">  3-5 = &#39;3-5 mos&#39;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">  6-12 = &#39;6-12 mos&#39;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 13-high = &#39; &gt; 1 yr&#39;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> .r         = &#39;Refused&#39;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> .d        = &quot;don&#39;t  remember&quot;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> .m       = &#39;set to missing by rule&#39;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">.          = &#39;other missing&#39;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Value labels are the equivalent SPSS feature (i think..i haven&#39;t used SPSS in 35 yrs) and even now most of our original questionnaires use &quot;out of range&quot; numbers for special missing values.  But the number of times post-docs and researchers
 have come up with funky basic descriptive statistics because, oh, &quot;99&quot; was used for a missing value for &quot;height_inches&quot; is well nigh uncountable.  And matters are getting worse because there&#39;s a general tendency to not use codebooks any more;  instead projects
 rely on &quot;annotated questionnaires&quot; and SAS &quot;proc contents&quot; I am very much hoping to get people here to go back to using codebooks and the various DDI products SHOULD be convincing. (well, convincing for people other than the small group of reproductive epidemiology
 researchers I work with most closely).<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">thanks for the responses!<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#222222;background:white">Bob McC....</span><span style="font-size:9.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#222222"><br>


<br>
<span style="background:white">&quot;At times like this, an adult needs a drink.&quot;</span><br>
<span style="background:white">Dance, Dance, Dance.  H. Murakami</span></span> <u></u>
<u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
DDI-users mailing list<br>
<a href="mailto:DDI-users@icpsr.umich.edu" target="_blank">DDI-users@icpsr.umich.edu</a><br>
<a href="http://lists.icpsr.umich.edu/mailman/listinfo/ddi-users" target="_blank">http://lists.icpsr.umich.edu/mailman/listinfo/ddi-users</a><u></u><u></u></p>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">-- <u></u><u></u></p>
<div>
<p class="MsoNormal">Adrian Dusa<br>
University of Bucharest<br>
Romanian Social Data Archive<br>
1, Schitu Magureanu Bd.<br>
050025 Bucharest sector 5<br>
Romania<br>
Tel.:<a href="tel:%2B40%2021%203126618" value="+40213126618" target="_blank">+40 21 3126618</a> \<br>
        <a href="tel:%2B40%2021%203120210" value="+40213120210" target="_blank">+40 21 3120210</a> / int.101<br>
Fax: <a href="tel:%2B40%2021%203158391" value="+40213158391" target="_blank">+40 21 3158391</a><u></u><u></u></p>
</div>
</div>
</div></div></div>
</div>

<br>_______________________________________________<br>
DDI-users mailing list<br>
<a href="mailto:DDI-users@icpsr.umich.edu">DDI-users@icpsr.umich.edu</a><br>
<a href="http://lists.icpsr.umich.edu/mailman/listinfo/ddi-users" target="_blank">http://lists.icpsr.umich.edu/mailman/listinfo/ddi-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Adrian Dusa<br>University of Bucharest<br>Romanian Social Data Archive<br>1, Schitu Magureanu Bd.<br>050025 Bucharest sector 5<br>Romania<br>

Tel.:+40 21 3126618 \<br>        +40 21 3120210 / int.101<br>Fax: +40 21 3158391</div>
</div>