expanding frequency table

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

expanding frequency table

Johnny Amora
Frequency table like below commonly available in
journals. There are situations in which the data need
to be expanded to form a datafile in spss format.  The
expanded datafile should consist of only three
variables such as sex, marital_status, and opinion
with 600 cases.  Do you know the syntax?

SEX      MARITALSTATUS              OPINION
                          Agree     Neutral   Disagree
male     single             40       50           30
         married            60       50           70

Female   single             30       60           10
         married            70       40           90

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

=====================
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: expanding frequency table

Art Kendall
Open a new instance of SPSS, cut and paste the syntax below the sig block.
This should be an example of getting a crosstab when you have data that
is already tabulated.

Art Kendall
Social Research Consultants



*SEX      MARITALSTATUS              OPINION
 *                         Agree     Neutral   Disagree
*male     single             40       50           30
*         married            60       50           70
*
*Female   single             30       60           10
*         married            70       40           90
*.
new file.
data list list /sex (f1) MaritalStatus(f1) opinion (f1) kount (f2).
begin data.
1 1 1 40
1 1 2 50
1 1 3 30
1 2 1 60
1 2 2 50
1 2 3 70
2 1 1 30
2 1 2 60
2 1 3 10
2 2 1 70
2 2 2 40
2 2 3 90
end data.
value labels
 sex 1 'male' 2 'female' /
 MaritalStatus 1 'single' 2 'married'/
 opinion 1 'agree' 2 ' neutral' 3 'disagree'.

weight by kount.
crosstabs tables = MaritalStatus by opinion by sex.


John Amora wrote:

> Frequency table like below commonly available in
> journals. There are situations in which the data need
> to be expanded to form a datafile in spss format.  The
> expanded datafile should consist of only three
> variables such as sex, marital_status, and opinion
> with 600 cases.  Do you know the syntax?
>
> SEX      MARITALSTATUS              OPINION
>                           Agree     Neutral   Disagree
> male     single             40       50           30
>          married            60       50           70
>
> Female   single             30       60           10
>          married            70       40           90
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> =====================
> 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