<div dir="ltr"><div>OK. Each variable declares BOTH its valid value representation and it missing value representation. Missing value representations are managed structures which can be described by any combination of a code/numeric/text representation. In addition a default missing value can be declared for a logical record or for a physical data file.</div>
<div><br></div><div>So in effect each variable using the same set of missing values would each reference the same managed missing value description. If a missing value is not an option (i.e. it must have a valid value) then no MissingValuesReference would be included in the Variable/VariableRepresentation.</div>
<div><br></div><div>Regarding identification of CaseID: see DataRelationship/LogicalRecord/CaseIdentification/</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 25, 2014 at 10:52 AM, Adrian Dușa <span dir="ltr">&lt;<a href="mailto:dusa.adrian@unibuc.ro" target="_blank">dusa.adrian@unibuc.ro</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Not sure...<br>
It has to be variable specific, because each variable has different<br>
cases with missing data.<br>
<br>
But if the CodeList contains information for &lt;each&gt; variable which has<br>
missing data, then it&#39;s ok. I was thinking about embedding this kind<br>
of information inside each variable, but a reference to a CodeList<br>
might also be an idea (provided the above).<br>
<br>
My previous email needs a slight correction: the numbers 1, 5, 8, 9,<br>
15 and 78 should not be line numbers but rather unique identifiers<br>
(sort of a Primary Key) for the cases where the missing values are<br>
found.<br>
<br>
IMPORTANT: in this case, we also need to know which variable in the<br>
dataset contains the unique identifiers (ex. &quot;CaseID&quot;).<br>
<br>
That actually solves all matters, because I can automatically create<br>
the necessary commands in the specific setup file(s) which will<br>
replace missing with the specific desired values depending on the<br>
statistical package.<br>
<br>
In SPSS, for a hypothetical variable &quot;Age&quot; it would be something like this:<br>
<br>
DO IF (CaseID = 1 | CaseID = 5 | CaseID = 9).<br>
RECODE Age (SYSMIS = -1).<br>
END IF.<br>
EXECUTE.<br>
<br>
I&#39;m sure that SAS and Stata are much easier to work with, and R is just trivial:<br>
mydata$Age[mydata$CaseID %in% c(1, 5, 9)] &lt;- -1<br>
<br>
On Wed, Jun 25, 2014 at 5:31 PM, Wendy Thomas &lt;<a href="mailto:wlt@umn.edu">wlt@umn.edu</a>&gt; wrote:<br>
&gt;<br>
&gt; Does this 3.2 structure do what you need? it can be referenced from any<br>
&gt; variable, noted as the default missing values for a LogicalRecord and a<br>
&gt; Physical Instance.<br>
&gt;<br>
&gt; &lt;r:ManagedMissingValuesRepresentation&gt;  (note I&#39;ve left off the<br>
&gt; identification and other versionable type information)<br>
&gt;   &lt;r:ManagedMissingValuesRepresenntationName&gt;Combined Missing<br>
&gt; Types&lt;/r:ManagedMissingValuesRepresentationName&gt;<br>
&gt;   &lt;r:MissingCodeRepresentation&gt;<br>
&gt;     &lt;r:RecommendedDataType&gt;integer&lt;/r:RecommendedDataType&gt;<br>
&gt;     &lt;r:CodeListReference/&gt;               to a CodeList with name Missing at<br>
&gt; Random<br>
&gt;  &lt;/r:MissingCodeRepresentation&gt;<br>
&gt;   &lt;r:MissingCodeRepresentation&gt;<br>
&gt;     &lt;r:RecommendedDataType&gt;integer&lt;/r:RecommendedDataType&gt;<br>
&gt;     &lt;r:CodeListReference/&gt;               to a CodeList with name Missing by<br>
&gt; Design<br>
&gt;  &lt;/r:MissingCodeRepresentation&gt;<br>
&gt; &lt;/r:ManagedMissingValuesRepresentation&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Wed, Jun 25, 2014 at 2:39 AM, Adrian Dușa &lt;<a href="mailto:dusa.adrian@unibuc.ro">dusa.adrian@unibuc.ro</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Dear All,<br>
&gt;&gt;<br>
&gt;&gt; Following a private discussion, an idea emerged that i think it&#39;s useful<br>
&gt;&gt; to circulate and discuss.<br>
&gt;&gt;<br>
&gt;&gt; From what I understand, SAS codes special missing values as extremely low<br>
&gt;&gt; values, while Stata went for the opposite way, coding them as extremely<br>
&gt;&gt; large values.<br>
&gt;&gt;<br>
&gt;&gt; Those are decisions which are software specific, and it is unlikely that<br>
&gt;&gt; other software packages will follow one trend or another.<br>
&gt;&gt;<br>
&gt;&gt; There might be a way to solve all particular needs, using DDI as a<br>
&gt;&gt; mediator and most importantly using only &quot;normal&quot; values.<br>
&gt;&gt;<br>
&gt;&gt; The main quest is to differentiate between missing values. In R, and I&#39;m<br>
&gt;&gt; sure DDI can do that too, each variable can be attached with a list of<br>
&gt;&gt; attributes. One such component of the list of attributes could be dedicated<br>
&gt;&gt; to the missing values, and further differentiate within:<br>
&gt;&gt; - &quot;missing at random&quot;: 1, 5, 9<br>
&gt;&gt; - &quot;missing by design&quot;: 8, 15, 78<br>
&gt;&gt;<br>
&gt;&gt; Here, the (simple integer) numbers 1, 5, 8, 9, 15 and 78 are nothing but<br>
&gt;&gt; the indexes of the line numbers (ie the cases) where the missing values<br>
&gt;&gt; reside in a particular variable.<br>
&gt;&gt;<br>
&gt;&gt; If I had this kind of information in the DDI XML file, I could then<br>
&gt;&gt; instruct my R function to create &lt;specific&gt; setup files for SAS or Stata<br>
&gt;&gt; using .r and .d in those specific cases, while in R all missing values could<br>
&gt;&gt; remain as simple NAs but users can still differentiate between missings by<br>
&gt;&gt; just looking at the list of attributes.<br>
&gt;&gt;<br>
&gt;&gt; This way it would accomplish the other need to avoid accidental mistakes,<br>
&gt;&gt; and it is both package independent and specific in the same time, using DDI<br>
&gt;&gt; as an exchange platform.<br>
&gt;&gt;<br>
&gt;&gt; Recoding specific missing values is trivial in R, but I have to confess I<br>
&gt;&gt; don&#39;t know if and how this might be done in other software via setup files.<br>
&gt;&gt; People using specific software packages might confirm if this approach is<br>
&gt;&gt; possible or not. Raw data should be read by all packages from a .csv file<br>
&gt;&gt; where missing values are system missing (empty) values.<br>
&gt;&gt;<br>
&gt;&gt; Best wishes,<br>
&gt;&gt; Adrian<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Adrian Dusa<br>
&gt;&gt; University of Bucharest<br>
&gt;&gt; Romanian Social Data Archive<br>
&gt;&gt; 1, Schitu Magureanu Bd.<br>
&gt;&gt; 050025 Bucharest sector 5<br>
&gt;&gt; Romania<br>
&gt;&gt; Tel.:+40 21 3126618 \<br>
&gt;&gt;         +40 21 3120210 / int.101<br>
&gt;&gt; Fax: +40 21 3158391<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; DDI-users mailing list<br>
&gt;&gt; <a href="mailto:DDI-users@icpsr.umich.edu">DDI-users@icpsr.umich.edu</a><br>
&gt;&gt; <a href="http://lists.icpsr.umich.edu/mailman/listinfo/ddi-users" target="_blank">http://lists.icpsr.umich.edu/mailman/listinfo/ddi-users</a><br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Wendy L. Thomas                              Phone: +1 612.624.4389<br>
&gt; Data Access Core Director                 Fax:   +1 612.626.8375<br>
&gt; Minnesota Population Center             Email: <a href="mailto:wlt@umn.edu">wlt@umn.edu</a><br>
&gt; University of Minnesota<br>
&gt; 50 Willey Hall<br>
&gt; 225 19th Avenue South<br>
&gt; Minneapolis, MN 55455<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; DDI-users mailing list<br>
&gt; <a href="mailto:DDI-users@icpsr.umich.edu">DDI-users@icpsr.umich.edu</a><br>
&gt; <a href="http://lists.icpsr.umich.edu/mailman/listinfo/ddi-users" target="_blank">http://lists.icpsr.umich.edu/mailman/listinfo/ddi-users</a><br>
&gt;<br>
<br>
<br>
<br>
--<br>
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<br>
<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>
</blockquote></div><br><br clear="all"><br>-- <br><div>Wendy L. Thomas                              Phone: +1 612.624.4389</div><div>Data Access Core Director                 Fax:   +1 612.626.8375</div><div>Minnesota Population Center             Email: <a href="mailto:wlt@umn.edu" target="_blank">wlt@umn.edu</a></div>
<div>University of Minnesota</div><div>50 Willey Hall</div><div>225 19th Avenue South</div><div>Minneapolis, MN 55455</div>
</div>