How to Mark Cases where Data in Two Variables Is Not the Same?

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

How to Mark Cases where Data in Two Variables Is Not the Same?

Justin Meyer-3
Hello SPSSlisters,

 

I have a dataset made up of fall and spring standardized test data. I
matched the fall and spring data by student ID and now I want to check
this matching by comparing the birthdate, gender, and free or reduced
lunch status of each student from fall to spring. Birthdate looks like
this: 12012001, gender looks like this: M or F, and FRL looks like this:
0 or 1. How can I create a variable that tells me that the data in fall
does not match spring, i.e., a student was reported as a male in fall
and a female in spring? This would be easy in Excel, but I can't seem to
get SPSS to do it by working with the compute function. Can anyone
suggest a solution?

 

Thank you,

 

____________________________________

Justin Meyer

Researcher

Rowland Reading Foundation

1 South Pinckney Street, Suite 324

Madison, WI  53703

phone: 866-370-7323  fax: 608-204-3846

www.rowlandreading.org <http://www.rowlandreading.org/>

____________________________________

 

====================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: How to Mark Cases where Data in Two Variables Is Not the Same?

Albert-Jan Roskam
Hi,

You could perhaps do something like:

compute gender_check = 0.
if (gender_spring = gender_fall) gender_check = 1.
value labels gender_check 0 'different' 1 'same'.
fre gender_check.

Cheers!!
Albert-Jan


--- On Fri, 6/27/08, Justin Meyer <[hidden email]> wrote:

> From: Justin Meyer <[hidden email]>
> Subject: How to Mark Cases where Data in Two Variables Is Not the Same?
> To: [hidden email]
> Date: Friday, June 27, 2008, 4:48 PM
> Hello SPSSlisters,
>
>
>
> I have a dataset made up of fall and spring standardized
> test data. I
> matched the fall and spring data by student ID and now I
> want to check
> this matching by comparing the birthdate, gender, and free
> or reduced
> lunch status of each student from fall to spring. Birthdate
> looks like
> this: 12012001, gender looks like this: M or F, and FRL
> looks like this:
> 0 or 1. How can I create a variable that tells me that the
> data in fall
> does not match spring, i.e., a student was reported as a
> male in fall
> and a female in spring? This would be easy in Excel, but I
> can't seem to
> get SPSS to do it by working with the compute function. Can
> anyone
> suggest a solution?
>
>
>
> Thank you,
>
>
>
> ____________________________________
>
> Justin Meyer
>
> Researcher
>
> Rowland Reading Foundation
>
> 1 South Pinckney Street, Suite 324
>
> Madison, WI  53703
>
> phone: 866-370-7323  fax: 608-204-3846
>
> www.rowlandreading.org
> <http://www.rowlandreading.org/>
>
> ____________________________________
>
>
>
> ====================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