[DDI-users] How to model a value with unit
Wendy Thomas
wlt at pop.umn.edu
Thu Feb 17 09:35:54 EST 2011
My,
First, have you looked at the examples (DDI 3.0 so some differences from
3.1 but basically similar) on the DDI site
http://www.ddialliance.org/resources/tools
Go to the bottom of the page with mark-up examples
The software company Colectica also has some samples out there
http://www.colectica.com/ddi
Can you send me the example of your variable on age with all its component
part? I'm not sure I get what you are asking for.
Is it a single variable with structured content? Age
24years10days56hours10minutes40seconds?
Is it a format for capturing each but expressing it in a sting of
veriables?
Basically in microdata the "value" is the entry in the data file while the
"Variable" describes what it is a value of. I've seen age in years,
months, hours, etc. The only times I've seen it as a combination they have
either created a long codescheme with something like the following
Code Value Label
1 1 year
2 2 years
...
99 99 years or over
X1 1 month
X2 2 months
...
X11 11 months
The variable then uses a code representation referencing this code scheme.
I've also seen it where there are two variables, one using a numberic
response of type integer and the other using a code scheme 1=years,
2=months, 3=days. The second variable provides the unit base for the first
variable. I'd need to look inside DDI to see how this might work in terms
of tying the two variables together. I'll get back to you later on that
and make sure that if we can't do it now it will be fixed in version 3.2.
As for the reasonableness of this approach in the data I find it to be a
bit of a problem when trying to analyze the data. I can't treat the
variable using the code scheme as a numeric because they represent
different things. I would end up recoding everything into a uniform value
with a single measurement unit in order to analyse the data.
It's a very reasonable structure for question or other data collection
tool. In this case you could have a single question about age with a
structured mixed response where you'd basically end up collecting each
portion of the age construct as separate items within the same question
How old is the subject:
_____ years _____months _____days or whatever
It good to hear that the study has decided to use DDI. I've had some
recent email from Jay that I need to get back to him on. My time has been
a bit limited lately.
More later...I've got a conference call coming up in a few minutes
Wendy
On Wed, 16 Feb 2011, My Coyne wrote:
>
>
> BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }
> Hi Wendy,
> Thank you for your help.
> >>> I think your confusion may be in looking first at NCubes.
> This is absolutely a true statement. I wish there is a much simpler
> example to show how to use Logical, physicaldata product for a simple
> tabular report, with microdata, some codescheme if needed, and it is
> not only integer. (i.e. the table should have string of text")
> Nevertheless, I don't think my original question relates with nCube;
> for that I would like to go back to this:
> Variable = Time in seconds
> >
> > NumericRepresentation with or without a valid range and the
> attribute
> > measurementUnit="seconds"
> >
> >
> > Variable = Age in days
> With this design, should you have:
> variable x where measurementUnit="seconds"
> variable y where measurementUnit="hours"
> variable z where measurementUnit="days"
> I would like to have a design in which there is only one variable
> scheme Age, that would contain both 'value' and 'unit'. Would you
> think this is possible, or desirable, or reasonable? (The reason I'm
> saying reasonable, because what one variable to accomodate different
> unit may not be a "reasonable" thing to do in survey instrument, I'm
> seeking for advice).
> P.S. You might have heard from Jay Greenfield that NCS (National
> Children Study) is authorized to use DDI. (I was the person who
> approached you at the very beginning, in case, you did not notice :-)
> ) I really hope will meet with you in person and learn a lot about DDI
> from you.
> My Coyne
> mcoyne at boninc.com [1]
> (cel): 301-399-6351
> On Sat 12/02/11 11:37 AM , Wendy Thomas wlt at pop.umn.edu [2] sent:
> > My,
> >
> > Easiest to explain with examples:
> >
> >
> > Variable = Gender
> > 1 = Male
> > 2 = Female
> >
> > Make a category scheme with the following categories
> > CategoryA = Male
> > CategoryB = Female
> >
> > Make a code scheme where
> > value = 1 category reference = CategoryA
> > value = 2 category reference = CategoryB
> >
> > Variable = Time in seconds
> >
> > NumericRepresentation with or without a valid range and the
> attribute
> > measurementUnit="seconds"
> >
> >
> > Variable = Age in days
> >
> > NumericRepresentation with or without a valid range and the
> attribute
> > measurementUnit="days"
> >
> >
> > I think your confusion may be in looking first at NCubes. These are
>
> > aggregations and normally data that was collected as a Numeric is
> > collapsed to groups such as age cohorts or specified ranges. In the
> case
> > of a variable used as an NCube dimension the values of the variable
>
> > provide the intercept point along the vector of that dimension,
> thereby
> > providing part of its coordinate address. The content of the data
> file
> > will be the value of the cell which falls at the given coordinate
> point.
> > In addition the measurement unit in an NCube needs to be captured
> as a
> > separate variable type because the same cube could be a count of
> persons,
> > a percent, a ranking, a count of adults, etc. For example the
> variable
> > describing the dimension of gender could be the gender of cats,
> dogs,
> > people, etc. The NCube describes the measure type of a specific
> cell. So a
> > variable expressing a measure of a count of cats might be
> >
> > Variable = count of cats
> > Numeric representation @measurementUnit="cats"
> > aggregationMethod="count"
> >
> > In a microdata variable the variable describes the value as found
> in the
> > data set. In the above examples (if expressed for a case where the
> gender
> > is female the time in seconds is 45 and the age in days is 92 a
> data
> > record in a comma delimited file would look as follows
> >
> > 2,45,92
> >
> > DDI has a number of different representation types:
> >
> > Numeric - means the content can be analysed as a number
> > Text - content should be treated as character
> > Code - the content is a key to a specified label
> > DateTime - the content expresses a date or time and describes the
> format
> > in which this is captured. The content is to be analysed as an
> expression
> > of date or time rather than of a number.
> >
> >
> > Wendy
> >
> >
> >
> > On Fri, 11 Feb 2011, My Coyne wrote:
> >
> > > Hi,
> > >
> > > I would like to model a value that has unit, for
> > example time {value = > 2, unit = second} or timve {value = 2, unit
> =
> > years}. Or age {value=1, > unit=day} etc.
> > >
> > > I was thinking of:
> > >
> > > 1. create a CategoryScheme
> > > category value
> > > category unit
> > > 2. Create a CodeScheme
> > > code for second (=1) makes reference to
> > category unit> code for minute (=2) makes reference to
> > category unit> code for hour (=3) makes reference to
> > category unit> ....
> > > ....
> > >
> > >
> > > Is this an acceptable way to model a value with
> > unit? Please help with any idea or better way to do this. Thank
> > you>
> > >
> > >
> > >
> > >
> > >
> > _______________________________________________> DDI-users mailing
> list
> > > DDI
> > -users at icpsr.umich.edu [3]>
> http://www.icpsr.umich.edu/mailman/listinfo/ddi-users> [4];
> >
> > Wendy L. Thomas Phone: +1 612.624.4389
> > Data Access Core Director Fax: +1 612.626.8375
> > Minnesota Population Center Email: wlt at pop.umn.e [5]
> > duUniversity of Minnesota
> > 50 Willey Hall
> > 225 19th Avenue South
> > Minneapolis, MN 55455
> >
> >
> >
>
>
> Links:
> ------
> [1] mailto:mcoyne at boninc.com
> [2] mailto:wlt at pop.umn.edu
> [3] mailto:-users at icpsr.umich.edu
> [4]
> https://webmail.xecu.net/parse.php?redirect=http%3A%2F%2Fwww.icpsr.umich.edu%2Fmailman%2Flistinfo%2Fddi-users%26gt
> [5] mailto:wlt at pop.umn.e
>
Wendy L. Thomas Phone: +1 612.624.4389
Data Access Core Director Fax: +1 612.626.8375
Minnesota Population Center Email: wlt at pop.umn.edu
University of Minnesota
50 Willey Hall
225 19th Avenue South
Minneapolis, MN 55455
More information about the DDI-users
mailing list