coding 1 to n relation

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

coding 1 to n relation

Moon Kid
As you can see in my subject I am thinking that problem in the way as a
database (especially relational) developer.

Example question in an observation:
"Why do you like your job?"
a - Good money.
b - Great coffee machine.
c - hot secretary
d - nice located office
e - others [freetext-field]

Lets imagine that e is checked and the proband enter there more than
one answers as freetext. e.g. "fresh donuts every morning, barbecue
each month, playstation in the rest room"

So I want to store these three answers in seperatly. But they don't
have to lose there relation to the observation (row)! How could this be
done?

Of course I could create variables
va, vb, vc, vd
ve_1, ve_2, ve_3, ve_4, ve_5, ...

But are there other more elegant possibilities?
--
<http://dontbubble.us/>

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: coding 1 to n relation

Jon K Peck
Look at multiple response sets.  They are based on underlying simple variables, but they can be used as a group in CTABLES and in the Chart Builder.  There are two ways of coding them - as multiple category or multiple dichotomy, but both hold essentially the same information.  See the MRSETS for more information.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        Moon Kid <[hidden email]>
To:        [hidden email],
Date:        04/18/2014 04:30 AM
Subject:        [SPSSX-L] coding 1 to n relation
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




As you can see in my subject I am thinking that problem in the way as a
database (especially relational) developer.

Example question in an observation:
"Why do you like your job?"
a - Good money.
b - Great coffee machine.
c - hot secretary
d - nice located office
e - others [freetext-field]

Lets imagine that e is checked and the proband enter there more than
one answers as freetext. e.g. "fresh donuts every morning, barbecue
each month, playstation in the rest room"

So I want to store these three answers in seperatly. But they don't
have to lose there relation to the observation (row)! How could this be
done?

Of course I could create variables
va, vb, vc, vd
ve_1, ve_2, ve_3, ve_4, ve_5, ...

But are there other more elegant possibilities?
--
<
http://dontbubble.us/>

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD