Custom Tables (URGENT)

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

Custom Tables (URGENT)

Mohammed Mustafa
Dear all,
 
i need some urgent and prompt help on this
i would highly appreciate if somebody can answer me shortly
 
i need to design a table using parts of the variables as Banner
 
for example
 
i'm having variables about gender & age in the dataset in addition to the rest of the variables
i need to have a table with the quetiones in rows and to use the following for the columns (banner)
 
Young females (it means i need to select only the code of females from the gender variable plus 3 codes from the age for the young ppl)
young males
older females
older males
 
and so on
 
Can somebody please help me on this??
 
Many thanks in advance
 
Mohd
 
Reply | Threaded
Open this post in threaded view
|

Re: Custom Tables (URGENT)

Art Kendall
one way would be to create a new variable with 4 values. Then use that for the banner  variable in the GUI. Remember to exit the GUI via <paste>.
something like this untested syntax should do it.

recode agegroup (1 thru 4 =1) (5 thru hi =2)(else=0) into youngold.
do if   gender eq 'f' and youngold=1.
compute newvar = 1.
else if
gender eq 'm' and youngold=1.
compute newvar = 2.
else if gender eq 'f' and youngold=2.
compute newvar = 3.
else if gender eq 'm' and youngold=2.
compute newvar = 4.
else.
compute newvar= 0.
formats youngold newvar (f1).
Missing values youngold newvar (0).
Value labels
 youngold
    0 'out of desired pop'
    1 'younger'
    2 'older'/
 newvar
    0 'out of desired pop'
    1 'Young females'
    2 'young males'
    3 'older females'
    4 'older males'.


Art Kendall
Social Research Consultants


On 3/23/2011 11:42 AM, Mohammed Mustafa wrote:
Dear all,
 
i need some urgent and prompt help on this
i would highly appreciate if somebody can answer me shortly
 
i need to design a table using parts of the variables as Banner
 
for example
 
i'm having variables about gender & age in the dataset in addition to the rest of the variables
i need to have a table with the quetiones in rows and to use the following for the columns (banner)
 
Young females (it means i need to select only the code of females from the gender variable plus 3 codes from the age for the young ppl)
young males
older females
older males
 
and so on
 
Can somebody please help me on this??
 
Many thanks in advance
 
Mohd
 
===================== 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
Reply | Threaded
Open this post in threaded view
|

Re: Custom Tables (URGENT)

ViAnn Beadle

Why not nest age under gender?

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Art Kendall
Sent: Wednesday, March 23, 2011 10:38 AM
To: [hidden email]
Subject: Re: Custom Tables (URGENT)

 

one way would be to create a new variable with 4 values. Then use that for the banner  variable in the GUI. Remember to exit the GUI via <paste>.
something like this untested syntax should do it.

recode agegroup (1 thru 4 =1) (5 thru hi =2)(else=0) into youngold.
do if   gender eq 'f' and youngold=1.
compute newvar = 1.
else if gender eq 'm' and youngold=1.
compute newvar = 2.

else if gender eq 'f' and youngold=2.
compute newvar = 3.

else if gender eq 'm' and youngold=2.
compute newvar = 4.

else.
compute newvar= 0.
formats youngold newvar (f1).
Missing values youngold newvar (0).
Value labels
 youngold
    0 'out of desired pop'
    1 'younger'
    2 'older'/
 newvar
    0 'out of desired pop'
    1 'Young females'
    2 'young males'
    3 'older females'
    4 'older males'.


Art Kendall
Social Research Consultants


On 3/23/2011 11:42 AM, Mohammed Mustafa wrote:

Dear all,
 
i need some urgent and prompt help on this
i would highly appreciate if somebody can answer me shortly
 
i need to design a table using parts of the variables as Banner
 
for example
 
i'm having variables about gender & age in the dataset in addition to the rest of the variables
i need to have a table with the quetiones in rows and to use the following for the columns (banner)
 
Young females (it means i need to select only the code of females from the gender variable plus 3 codes from the age for the young ppl)
young males
older females
older males
 
and so on
 
Can somebody please help me on this??
 
Many thanks in advance
 
Mohd
 

===================== 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: Custom Tables (URGENT)

Art Kendall
I guessed that for some reason that did not work.


Art
On 3/23/2011 1:15 PM, ViAnn Beadle wrote:

Why not nest age under gender?

 

From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Art Kendall
Sent: Wednesday, March 23, 2011 10:38 AM
To: [hidden email]
Subject: Re: Custom Tables (URGENT)

 

one way would be to create a new variable with 4 values. Then use that for the banner  variable in the GUI. Remember to exit the GUI via <paste>.
something like this untested syntax should do it.

recode agegroup (1 thru 4 =1) (5 thru hi =2)(else=0) into youngold.
do if   gender eq 'f' and youngold=1.
compute newvar = 1.
else if gender eq 'm' and youngold=1.
compute newvar = 2.

else if gender eq 'f' and youngold=2.
compute newvar = 3.

else if gender eq 'm' and youngold=2.
compute newvar = 4.

else.
compute newvar= 0.
formats youngold newvar (f1).
Missing values youngold newvar (0).
Value labels
 youngold
    0 'out of desired pop'
    1 'younger'
    2 'older'/
 newvar
    0 'out of desired pop'
    1 'Young females'
    2 'young males'
    3 'older females'
    4 'older males'.


Art Kendall
Social Research Consultants


On 3/23/2011 11:42 AM, Mohammed Mustafa wrote:

Dear all,
 
i need some urgent and prompt help on this
i would highly appreciate if somebody can answer me shortly
 
i need to design a table using parts of the variables as Banner
 
for example
 
i'm having variables about gender & age in the dataset in addition to the rest of the variables
i need to have a table with the quetiones in rows and to use the following for the columns (banner)
 
Young females (it means i need to select only the code of females from the gender variable plus 3 codes from the age for the young ppl)
young males
older females
older males
 
and so on
 
Can somebody please help me on this??
 
Many thanks in advance
 
Mohd
 

===================== 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
Reply | Threaded
Open this post in threaded view
|

Re: Custom Tables (URGENT)

John F Hall
In reply to this post by Mohammed Mustafa

Art’s is one way but IF is cumbersome and possibly expensive.  Here’s an example for creating a variable PENS where pensionable age is different for men and women.

 

compute          pens = sex*100+age.

recode             pens (100 thru 164 =1) ( 200 thru 259 =2) (165 thru 190 = 3) (260 thru 290=4).

format pens    (f1.0).

var lab             pens 'Gender/pensioner combination'.

val lab pens    1 'Male under 65'           2 'Female under 60'

                                    3 'Male pensioner'         4 'Female pensioner'.

freq pens.

 

You can adapt it for your data.

 

 

John Hall

[hidden email]

www.surveyresearch.weebly.com

 

 

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mohammed Mustafa
Sent: 23 March 2011 16:43
To: [hidden email]
Subject: Custom Tables (URGENT)

 

Dear all,
 
i need some urgent and prompt help on this
i would highly appreciate if somebody can answer me shortly
 
i need to design a table using parts of the variables as Banner
 
for example
 
i'm having variables about gender & age in the dataset in addition to the rest of the variables
i need to have a table with the quetiones in rows and to use the following for the columns (banner)
 
Young females (it means i need to select only the code of females from the gender variable plus 3 codes from the age for the young ppl)
young males
older females
older males
 
and so on
 
Can somebody please help me on this??
 
Many thanks in advance
 
Mohd
 

Reply | Threaded
Open this post in threaded view
|

Re: Custom Tables (URGENT)

ViAnn Beadle
In reply to this post by Art Kendall

<vent>

There is absolutely no clue from the OP whether he actually tried anything. IMHO, the semantic and data content of posts seems to be negatively correlated with the urgency of the request.

</vent>

 

From: Art Kendall [mailto:[hidden email]]
Sent: Wednesday, March 23, 2011 11:19 AM
To: ViAnn Beadle
Cc: [hidden email]
Subject: Re: [SPSSX-L] Custom Tables (URGENT)

 

I guessed that for some reason that did not work.


Art
On 3/23/2011 1:15 PM, ViAnn Beadle wrote:

Why not nest age under gender?

 

From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Art Kendall
Sent: Wednesday, March 23, 2011 10:38 AM
To: [hidden email]
Subject: Re: Custom Tables (URGENT)

 

one way would be to create a new variable with 4 values. Then use that for the banner  variable in the GUI. Remember to exit the GUI via <paste>.
something like this untested syntax should do it.

recode agegroup (1 thru 4 =1) (5 thru hi =2)(else=0) into youngold.
do if   gender eq 'f' and youngold=1.
compute newvar = 1.
else if gender eq 'm' and youngold=1.
compute newvar = 2.
else if gender eq 'f' and youngold=2.
compute newvar = 3.

else if gender eq 'm' and youngold=2.
compute newvar = 4.

else.
compute newvar= 0.
formats youngold newvar (f1).
Missing values youngold newvar (0).
Value labels
 youngold
    0 'out of desired pop'
    1 'younger'
    2 'older'/
 newvar
    0 'out of desired pop'
    1 'Young females'
    2 'young males'
    3 'older females'
    4 'older males'.

Art Kendall
Social Research Consultants


On 3/23/2011 11:42 AM, Mohammed Mustafa wrote:

Dear all,
 
i need some urgent and prompt help on this
i would highly appreciate if somebody can answer me shortly
 
i need to design a table using parts of the variables as Banner
 
for example
 
i'm having variables about gender & age in the dataset in addition to the rest of the variables
i need to have a table with the quetiones in rows and to use the following for the columns (banner)
 
Young females (it means i need to select only the code of females from the gender variable plus 3 codes from the age for the young ppl)
young males
older females
older males
 
and so on
 
Can somebody please help me on this??
 
Many thanks in advance
 
Mohd
 

===================== 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: Custom Tables (URGENT)

Art Kendall
Very much the same as phone calls to a consulting center.

Art

On 3/23/2011 2:01 PM, ViAnn Beadle wrote:

<vent>

There is absolutely no clue from the OP whether he actually tried anything. IMHO, the semantic and data content of posts seems to be negatively correlated with the urgency of the request.

</vent>

 

From: Art Kendall [[hidden email]]
Sent: Wednesday, March 23, 2011 11:19 AM
To: ViAnn Beadle
Cc: [hidden email]
Subject: Re: [SPSSX-L] Custom Tables (URGENT)

 

I guessed that for some reason that did not work.


Art
On 3/23/2011 1:15 PM, ViAnn Beadle wrote:

Why not nest age under gender?

 

From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Art Kendall
Sent: Wednesday, March 23, 2011 10:38 AM
To: [hidden email]
Subject: Re: Custom Tables (URGENT)

 

one way would be to create a new variable with 4 values. Then use that for the banner  variable in the GUI. Remember to exit the GUI via <paste>.
something like this untested syntax should do it.

recode agegroup (1 thru 4 =1) (5 thru hi =2)(else=0) into youngold.
do if   gender eq 'f' and youngold=1.
compute newvar = 1.
else if gender eq 'm' and youngold=1.
compute newvar = 2.
else if gender eq 'f' and youngold=2.
compute newvar = 3.

else if gender eq 'm' and youngold=2.
compute newvar = 4.

else.
compute newvar= 0.
formats youngold newvar (f1).
Missing values youngold newvar (0).
Value labels
 youngold
    0 'out of desired pop'
    1 'younger'
    2 'older'/
 newvar
    0 'out of desired pop'
    1 'Young females'
    2 'young males'
    3 'older females'
    4 'older males'.

Art Kendall
Social Research Consultants


On 3/23/2011 11:42 AM, Mohammed Mustafa wrote:

Dear all,
 
i need some urgent and prompt help on this
i would highly appreciate if somebody can answer me shortly
 
i need to design a table using parts of the variables as Banner
 
for example
 
i'm having variables about gender & age in the dataset in addition to the rest of the variables
i need to have a table with the quetiones in rows and to use the following for the columns (banner)
 
Young females (it means i need to select only the code of females from the gender variable plus 3 codes from the age for the young ppl)
young males
older females
older males
 
and so on
 
Can somebody please help me on this??
 
Many thanks in advance
 
Mohd
 

===================== 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