trouble creating groups

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

trouble creating groups

Talino Bruno
I am having trouble creating 4 variables based on the following criteria:
1. T scores ≥ 60 on the externalizing scale and T scores < 60 on
internalizing scale=externalizing group.
2. T scores ≥ 60 on the internalizing scale and T scores < 60 on
externalizing scale=internalizing group.
3. T scores ≥ 60 on both internalizing and externalizing scales=co-
occurring group
4. T scores < 60 on both internalizing and externalizing scale=no problem
group

The wrinkle in this is that I am using two scales (YSR and TRF) to measure
internalizing and externalizing and I would like to create groups based on
the above criteria being met by either scale. I tried compute variable but
no luck. Any suggestion would be helpful.

=====================
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: trouble creating groups

Adam Martin-7
Hi Talino

Can you send through a subset of your data?

Adam

2009/1/24 Talino Bruno <[hidden email]>

> I am having trouble creating 4 variables based on the following criteria:
> 1. T scores ≥ 60 on the externalizing scale and T scores < 60 on
> internalizing scale=externalizing group.
> 2. T scores ≥ 60 on the internalizing scale and T scores < 60 on
> externalizing scale=internalizing group.
> 3. T scores ≥ 60 on both internalizing and externalizing scales=co-
> occurring group
> 4. T scores < 60 on both internalizing and externalizing scale=no problem
> group
>
> The wrinkle in this is that I am using two scales (YSR and TRF) to measure
> internalizing and externalizing and I would like to create groups based on
> the above criteria being met by either scale. I tried compute variable but
> no luck. Any suggestion would be helpful.
>
> =====================
> 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
>



--
Cell: +27 84 777 1801
Website: http://www.sigmasurveys.co.za
Blog: http://www.sigmasurveys.co.za/resources

====================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: trouble creating groups

Art Kendall-2
In reply to this post by Talino Bruno
open a new instance of SPSS. Copy and paste the syntax below to a syntax
window. Run the syntax.

Does this do what you want?


new file.
*generate random integers.
INPUT PROGRAM.
LOOP id=1 TO 300.
COMPUTE internalizing = rv.normal(50,10).
COMPUTE externalizing = rv.normal(50,10).
END CASE.
END LOOP.
END FILE.
END INPUT PROGRAM.
FORMATS id (F3.0).
do if externalizing ge 60 and internalizing lt 60.
compute group = 1.
else if externalizing lt 60 and internalizing gt 60.
compute group = 2.
else if externalizing ge 60 and internalizing ge 60.
compute group = 3.
else if externalizing lt 60 and internalizing lt 60.
compute group = 4.
ELSE .
compute group = 5.
end if.
formats group (f1).
value labels group
1 'externalizing'
2 'internalizing'
3 'co-occuring'
4 'no problem'
5 'oops fell through logic'.
missing values group (5).
frequencies VARIABLES = group /missing = include.


Art Kendall
Social Research Consultants

Talino Bruno wrote:

> I am having trouble creating 4 variables based on the following criteria:
> 1. T scores ≥ 60 on the externalizing scale and T scores < 60 on
> internalizing scale=externalizing group.
> 2. T scores ≥ 60 on the internalizing scale and T scores < 60 on
> externalizing scale=internalizing group.
> 3. T scores ≥ 60 on both internalizing and externalizing scales=co-
> occurring group
> 4. T scores < 60 on both internalizing and externalizing scale=no problem
> group
>
> The wrinkle in this is that I am using two scales (YSR and TRF) to measure
> internalizing and externalizing and I would like to create groups based on
> the above criteria being met by either scale. I tried compute variable but
> no luck. Any suggestion would be helpful.
>
> =====================
> 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
>
>
>

=====================
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: trouble creating groups

Adam Martin-7
Hi Art

The only "problem" with this is that Talino has two versions of
internalizing and externalizing, so there's a basic overlap.

Your syntax is otherwise flawless (and flashy too!).

Regards
Adam

2009/1/24 Art Kendall <[hidden email]>

> open a new instance of SPSS. Copy and paste the syntax below to a syntax
> window. Run the syntax.
>
> Does this do what you want?
>
>
> new file.
> *generate random integers.
> INPUT PROGRAM.
> LOOP id=1 TO 300.
> COMPUTE internalizing = rv.normal(50,10).
> COMPUTE externalizing = rv.normal(50,10).
> END CASE.
> END LOOP.
> END FILE.
> END INPUT PROGRAM.
> FORMATS id (F3.0).
> do if externalizing ge 60 and internalizing lt 60.
> compute group = 1.
> else if externalizing lt 60 and internalizing gt 60.
> compute group = 2.
> else if externalizing ge 60 and internalizing ge 60.
> compute group = 3.
> else if externalizing lt 60 and internalizing lt 60.
> compute group = 4.
> ELSE .
> compute group = 5.
> end if.
> formats group (f1).
> value labels group
> 1 'externalizing'
> 2 'internalizing'
> 3 'co-occuring'
> 4 'no problem'
> 5 'oops fell through logic'.
> missing values group (5).
> frequencies VARIABLES = group /missing = include.
>
>
> Art Kendall
> Social Research Consultants
>
> Talino Bruno wrote:
>
>> I am having trouble creating 4 variables based on the following criteria:
>> 1. T scores ≥ 60 on the externalizing scale and T scores < 60 on
>> internalizing scale=externalizing group.
>> 2. T scores ≥ 60 on the internalizing scale and T scores < 60 on
>> externalizing scale=internalizing group.
>> 3. T scores ≥ 60 on both internalizing and externalizing scales=co-
>> occurring group
>> 4. T scores < 60 on both internalizing and externalizing scale=no problem
>> group
>>
>> The wrinkle in this is that I am using two scales (YSR and TRF) to measure
>> internalizing and externalizing and I would like to create groups based on
>> the above criteria being met by either scale. I tried compute variable but
>> no luck. Any suggestion would be helpful.
>>
>> =====================
>> 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
>>
>>
>>
>>
> =====================
> 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
>



--
Cell: +27 84 777 1801
Website: http://www.sigmasurveys.co.za
Blog: http://www.sigmasurveys.co.za/resources

====================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: trouble creating groups

Art Kendall
Are you saying that there are 2 variables that are bipolar? Rather than 2 unipolar scales?
If that is so are these the groups
YSR lt 60 and TRF lt 60(both below cut)
YSR lt 60 and TRF ge 60(one below cut other above cut)
YSR ge 60 and TRF lt 60(one above cut and other below cut)
YSR ge 60 and TRF ge 60 (both above cut)


In the OP it said
1. T scores ≥ 60 on the externalizing scale and T scores < 60 on
internalizing scale=externalizing group.

I was not sure what "≥ 60" meant .  [The use of different fonts is
another reason to use the conventional operators lt le eq ge gt]
It reads as if there were to scales each for a different construct.

If you let me know I can easily adapt the simulation.

Art Kendall
Social Research Consultants

> Hi Art
>
> The only "problem" with this is that Talino has two versions of
> internalizing and externalizing, so there's a basic overlap.
>
> Your syntax is otherwise flawless (and flashy too!).
>
> Regards
> Adam
>
> 2009/1/24 Art Kendall <[hidden email]>
>
>
>> open a new instance of SPSS. Copy and paste the syntax below to a syntax
>> window. Run the syntax.
>>
>> Does this do what you want?
>>
>>
>> new file.
>> *generate random integers.
>> INPUT PROGRAM.
>> LOOP id=1 TO 300.
>> COMPUTE internalizing = rv.normal(50,10).
>> COMPUTE externalizing = rv.normal(50,10).
>> END CASE.
>> END LOOP.
>> END FILE.
>> END INPUT PROGRAM.
>> FORMATS id (F3.0).
>> do if externalizing ge 60 and internalizing lt 60.
>> compute group = 1.
>> else if externalizing lt 60 and internalizing gt 60.
>> compute group = 2.
>> else if externalizing ge 60 and internalizing ge 60.
>> compute group = 3.
>> else if externalizing lt 60 and internalizing lt 60.
>> compute group = 4.
>> ELSE .
>> compute group = 5.
>> end if.
>> formats group (f1).
>> value labels group
>> 1 'externalizing'
>> 2 'internalizing'
>> 3 'co-occuring'
>> 4 'no problem'
>> 5 'oops fell through logic'.
>> missing values group (5).
>> frequencies VARIABLES = group /missing = include.
>>
>>
>> Art Kendall
>> Social Research Consultants
>>
>> Talino Bruno wrote:
>>
>>
>>> I am having trouble creating 4 variables based on the following criteria:
>>> 1. T scores ≥ 60 on the externalizing scale and T scores < 60 on
>>> internalizing scale=externalizing group.
>>> 2. T scores ≥ 60 on the internalizing scale and T scores < 60 on
>>> externalizing scale=internalizing group.
>>> 3. T scores ≥ 60 on both internalizing and externalizing scales=co-
>>> occurring group
>>> 4. T scores < 60 on both internalizing and externalizing scale=no problem
>>> group
>>>
>>> The wrinkle in this is that I am using two scales (YSR and TRF) to measure
>>> internalizing and externalizing and I would like to create groups based on
>>> the above criteria being met by either scale. I tried compute variable but
>>> no luck. Any suggestion would be helpful.
>>>
>>> =====================
>>> 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
>>>
>>>
>>>
>>>
>>>
>> =====================
>> 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
>>
>>
>
>
>
>

=====================
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
Art Kendall
Social Research Consultants