SPSS Data Arrangement

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

SPSS Data Arrangement

Sarah Wright
Hello SPSS group- 

I am new to this group and am in the midst of getting to know SPSS.  I would really appreciate any feedback on the following question related to efficient data manipulation:  

I have one beach and three sampling transects (m1, m2, and m3) within the beach.  It is important to keep the data separated by transect because sometimes specific analysis will need to be done on each transect.  However, it is also important to combine all the transect data as one full beach.  This would mean joining the three sampling transect columns together, basically m1 stacked above m2, which is stacked above m3 in one column.  In order to do the analysis I would like to do, it also means being able to easily replicate the other environmental data (e.g. AirTemperature, WindSpeed, 24hrRainfall) into a stacked column to match the combined beach data.  (The environmental data is basically the same for the three transects but would need to match the transects).  I can obviously do this manually, but I have to do it many times for many beaches and was trying to figure out a quicker way since it is already set up best for analysis on individual transects.  

It does not seem like "Compute Variable" works - I tried to make a new variable mbeach=m1&m2&m3, but this produced blanks in a new column.  Another method was combining the variable, but that just added the variables together for a total value vs. preserving the original values and making a larger dataset.  Would the Restructure command work for either stacking the beach transect data or replicating the environmental data to match the stacked beach transect data?  From what I was trying, I wasn't having much luck with it.       

I would really appreciate any advice on whether I should continue to look for an easier way or to get to work on it manually.  Thank you very much.  
Sarah 
Reply | Threaded
Open this post in threaded view
|

Re: SPSS Data Arrangement

Rich Ulrich
If you need to go from a WIDE orientation to a LONG orientation,
you want CasesToVars.   VarsToCases goes the opposite way.
For LONG orientation, you do want to create the "transect"
identifier, so that every line remains identified as to what it is.


Wide-to-long can also be achieved with XSAVE -- either by writing
several files with several XSAVEs, which are then combined by ADD FILE; 
or by using Vectors and a LOOP  in order to write every set into one file
at once.

--
Rich Ulrich


Date: Mon, 31 Dec 2012 14:52:15 -0600
From: [hidden email]
Subject: SPSS Data Arrangement
To: [hidden email]

Hello SPSS group- 

I am new to this group and am in the midst of getting to know SPSS.  I would really appreciate any feedback on the following question related to efficient data manipulation:  

I have one beach and three sampling transects (m1, m2, and m3) within the beach.  It is important to keep the data separated by transect because sometimes specific analysis will need to be done on each transect.  However, it is also important to combine all the transect data as one full beach.  This would mean joining the three sampling transect columns together, basically m1 stacked above m2, which is stacked above m3 in one column.  In order to do the analysis I would like to do, it also means being able to easily replicate the other environmental data (e.g. AirTemperature, WindSpeed, 24hrRainfall) into a stacked column to match the combined beach data.  (The environmental data is basically the same for the three transects but would need to match the transects).  I can obviously do this manually, but I have to do it many times for many beaches and was trying to figure out a quicker way since it is already set up best for analysis on individual transects.  

It does not seem like "Compute Variable" works - I tried to make a new variable mbeach=m1&m2&m3, but this produced blanks in a new column.  Another method was combining the variable, but that just added the variables together for a total value vs. preserving the original values and making a larger dataset.  Would the Restructure command work for either stacking the beach transect data or replicating the environmental data to match the stacked beach transect data?  From what I was trying, I wasn't having much luck with it.       

I would really appreciate any advice on whether I should continue to look for an easier way or to get to work on it manually.  Thank you very much.  
Sarah 
Reply | Threaded
Open this post in threaded view
|

Automatic reply: [SPSSX-L] SPSS Data Arrangement

Cleland, Patricia (EDU)
I have retired from the Ontario Public Service as of December 31, 2012. This email account will not be monitored.  If your issue is work related, please contact Caroline Rodrigues ([hidden email]) who will redirect you to the appropriate person. If your email is personal, please email me at home.

=====================
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: SPSS Data Arrangement

Sarah Wright
In reply to this post by Rich Ulrich
Thank you very much Rich for your response - I am working through it.  


On Mon, Dec 31, 2012 at 5:16 PM, Rich Ulrich <[hidden email]> wrote:
If you need to go from a WIDE orientation to a LONG orientation,
you want CasesToVars.   VarsToCases goes the opposite way.
For LONG orientation, you do want to create the "transect"
identifier, so that every line remains identified as to what it is.


Wide-to-long can also be achieved with XSAVE -- either by writing
several files with several XSAVEs, which are then combined by ADD FILE; 
or by using Vectors and a LOOP  in order to write every set into one file
at once.

--
Rich Ulrich


Date: Mon, 31 Dec 2012 14:52:15 -0600
From: [hidden email]
Subject: SPSS Data Arrangement
To: [hidden email]


Hello SPSS group- 

I am new to this group and am in the midst of getting to know SPSS.  I would really appreciate any feedback on the following question related to efficient data manipulation:  

I have one beach and three sampling transects (m1, m2, and m3) within the beach.  It is important to keep the data separated by transect because sometimes specific analysis will need to be done on each transect.  However, it is also important to combine all the transect data as one full beach.  This would mean joining the three sampling transect columns together, basically m1 stacked above m2, which is stacked above m3 in one column.  In order to do the analysis I would like to do, it also means being able to easily replicate the other environmental data (e.g. AirTemperature, WindSpeed, 24hrRainfall) into a stacked column to match the combined beach data.  (The environmental data is basically the same for the three transects but would need to match the transects).  I can obviously do this manually, but I have to do it many times for many beaches and was trying to figure out a quicker way since it is already set up best for analysis on individual transects.  

It does not seem like "Compute Variable" works - I tried to make a new variable mbeach=m1&m2&m3, but this produced blanks in a new column.  Another method was combining the variable, but that just added the variables together for a total value vs. preserving the original values and making a larger dataset.  Would the Restructure command work for either stacking the beach transect data or replicating the environmental data to match the stacked beach transect data?  From what I was trying, I wasn't having much luck with it.       

I would really appreciate any advice on whether I should continue to look for an easier way or to get to work on it manually.  Thank you very much.  
Sarah 

Reply | Threaded
Open this post in threaded view
|

Re: SPSS Data Arrangement

Bruce Weaver
Administrator
AGGREGATE is another possibility, depending on exactly what it is you are trying to do.  What type of analyses will you be doing?  


Sarah Wright wrote
Thank you very much Rich for your response - I am working through it.


On Mon, Dec 31, 2012 at 5:16 PM, Rich Ulrich <[hidden email]> wrote:

>  If you need to go from a WIDE orientation to a LONG orientation,
> you want CasesToVars.   VarsToCases goes the opposite way.
> For LONG orientation, you do want to create the "transect"
> identifier, so that every line remains identified as to what it is.
>
>
> Wide-to-long can also be achieved with XSAVE -- either by writing
> several files with several XSAVEs, which are then combined by ADD FILE;
> or by using Vectors and a LOOP  in order to write every set into one file
> at once.
>
> --
> Rich Ulrich
>
> ------------------------------
> Date: Mon, 31 Dec 2012 14:52:15 -0600
> From: [hidden email]
> Subject: SPSS Data Arrangement
> To: [hidden email]
>
>
> Hello SPSS group-
>
> I am new to this group and am in the midst of getting to know SPSS.  *I
> would really appreciate any feedback on the following question related to
> efficient data manipulation:  *
>
> I have one beach and three sampling transects (m1, m2, and m3) within the
> beach.  It is important to keep the data separated by transect because
> sometimes specific analysis will need to be done on each transect.
>  However, it is also important to combine all the transect data as one full
> beach.  This would mean joining the three sampling transect columns
> together, basically m1 stacked above m2, which is stacked above m3 in one
> column.  In order to do the analysis I would like to do, it also means
> being able to easily replicate the other environmental data (e.g.
> AirTemperature, WindSpeed, 24hrRainfall) into a stacked column to match the
> combined beach data.  (The environmental data is basically the same for the
> three transects but would need to match the transects).  I can obviously do
> this manually, but I have to do it many times for many beaches and was
> trying to figure out a quicker way since it is already set up best for
> analysis on individual transects.
>
> It does not seem like "Compute Variable" works - I tried to make a new
> variable mbeach=m1&m2&m3, but this produced blanks in a new column.
>  Another method was combining the variable, but that just added the
> variables together for a total value vs. preserving the original values and
> making a larger dataset.  Would the Restructure command work for either
> stacking the beach transect data or replicating the environmental data to
> match the stacked beach transect data?  From what I was trying, I wasn't
> having much luck with it.
>
> I would really appreciate any advice on whether I should continue to look
> for an easier way or to get to work on it manually.  Thank you very much.
> Sarah
>
Sarah Wright wrote
Thank you very much Rich for your response - I am working through it.


On Mon, Dec 31, 2012 at 5:16 PM, Rich Ulrich <[hidden email]> wrote:

>  If you need to go from a WIDE orientation to a LONG orientation,
> you want CasesToVars.   VarsToCases goes the opposite way.
> For LONG orientation, you do want to create the "transect"
> identifier, so that every line remains identified as to what it is.
>
>
> Wide-to-long can also be achieved with XSAVE -- either by writing
> several files with several XSAVEs, which are then combined by ADD FILE;
> or by using Vectors and a LOOP  in order to write every set into one file
> at once.
>
> --
> Rich Ulrich
>
> ------------------------------
> Date: Mon, 31 Dec 2012 14:52:15 -0600
> From: [hidden email]
> Subject: SPSS Data Arrangement
> To: [hidden email]
>
>
> Hello SPSS group-
>
> I am new to this group and am in the midst of getting to know SPSS.  *I
> would really appreciate any feedback on the following question related to
> efficient data manipulation:  *
>
> I have one beach and three sampling transects (m1, m2, and m3) within the
> beach.  It is important to keep the data separated by transect because
> sometimes specific analysis will need to be done on each transect.
>  However, it is also important to combine all the transect data as one full
> beach.  This would mean joining the three sampling transect columns
> together, basically m1 stacked above m2, which is stacked above m3 in one
> column.  In order to do the analysis I would like to do, it also means
> being able to easily replicate the other environmental data (e.g.
> AirTemperature, WindSpeed, 24hrRainfall) into a stacked column to match the
> combined beach data.  (The environmental data is basically the same for the
> three transects but would need to match the transects).  I can obviously do
> this manually, but I have to do it many times for many beaches and was
> trying to figure out a quicker way since it is already set up best for
> analysis on individual transects.
>
> It does not seem like "Compute Variable" works - I tried to make a new
> variable mbeach=m1&m2&m3, but this produced blanks in a new column.
>  Another method was combining the variable, but that just added the
> variables together for a total value vs. preserving the original values and
> making a larger dataset.  Would the Restructure command work for either
> stacking the beach transect data or replicating the environmental data to
> match the stacked beach transect data?  From what I was trying, I wasn't
> having much luck with it.
>
> I would really appreciate any advice on whether I should continue to look
> for an easier way or to get to work on it manually.  Thank you very much.
> Sarah
>
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: SPSS Data Arrangement

John F Hall
In reply to this post by Sarah Wright

Sarah

 

Bit late on New Year’s Eve here (by now actually New Year’s Day) but being a newbie to SPSS you might like to look at the SPSS tutorials on my site, plus the links to other useful sites.  However they’re related more to questionnaire surveys than to beach transepts.

 

 

John F Hall (Mr)

[retired academic survey researcher]

 

Email:     [hidden email]

Website: www.surveyresearch.weebly.com

 

 

 

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Sarah Wright
Sent: 31 December 2012 21:52
To: [hidden email]
Subject: SPSS Data Arrangement

 

Hello SPSS group- 

 

I am new to this group and am in the midst of getting to know SPSS.  I would really appreciate any feedback on the following question related to efficient data manipulation:  

 

I have one beach and three sampling transects (m1, m2, and m3) within the beach.  It is important to keep the data separated by transect because sometimes specific analysis will need to be done on each transect.  However, it is also important to combine all the transect data as one full beach.  This would mean joining the three sampling transect columns together, basically m1 stacked above m2, which is stacked above m3 in one column.  In order to do the analysis I would like to do, it also means being able to easily replicate the other environmental data (e.g. AirTemperature, WindSpeed, 24hrRainfall) into a stacked column to match the combined beach data.  (The environmental data is basically the same for the three transects but would need to match the transects).  I can obviously do this manually, but I have to do it many times for many beaches and was trying to figure out a quicker way since it is already set up best for analysis on individual transects.  

 

It does not seem like "Compute Variable" works - I tried to make a new variable mbeach=m1&m2&m3, but this produced blanks in a new column.  Another method was combining the variable, but that just added the variables together for a total value vs. preserving the original values and making a larger dataset.  Would the Restructure command work for either stacking the beach transect data or replicating the environmental data to match the stacked beach transect data?  From what I was trying, I wasn't having much luck with it.       

 

I would really appreciate any advice on whether I should continue to look for an easier way or to get to work on it manually.  Thank you very much.  

Sarah 

Reply | Threaded
Open this post in threaded view
|

Re: SPSS Data Arrangement

Sarah Wright
In reply to this post by Bruce Weaver
Hi Bruce - I am looking at the possible causes of high E. coli at beaches through correlations, t-tests, Mann-Whitney, ANOVA, and Kruskal-Wallis.  I am trying to preserve the values as they are - in just looking through AGGREGATE it seemed like you needed to change the values through a function?  

I am trying to reorganize some data from my datasets (e.g. combining the E. coli results from the beach transects to represent a full beach) and trying to replicate other environmental data (e.g. the rainfall, wind data) so that I can correctly fill this data out for the full beach data (typically the environmental data is the same for each date of testing, which involves multiple E. coli results from the transects).  

Thanks for your response.  Sarah 


On Mon, Dec 31, 2012 at 6:18 PM, Bruce Weaver <[hidden email]> wrote:
AGGREGATE is another possibility, depending on exactly what it is you are
trying to do.  What type of analyses will you be doing?



Sarah Wright wrote
> Thank you very much Rich for your response - I am working through it.
>
>
> On Mon, Dec 31, 2012 at 5:16 PM, Rich Ulrich <

> rich-ulrich@

> > wrote:
>
>>  If you need to go from a WIDE orientation to a LONG orientation,
>> you want CasesToVars.   VarsToCases goes the opposite way.
>> For LONG orientation, you do want to create the "transect"
>> identifier, so that every line remains identified as to what it is.
>>
>>
>> Wide-to-long can also be achieved with XSAVE -- either by writing
>> several files with several XSAVEs, which are then combined by ADD FILE;
>> or by using Vectors and a LOOP  in order to write every set into one file
>> at once.
>>
>> --
>> Rich Ulrich
>>
>> ------------------------------
>> Date: Mon, 31 Dec 2012 14:52:15 -0600
>> From:

> wright.sarah@

>> Subject: SPSS Data Arrangement
>> To:

> SPSSX-L@.UGA

>>
>>
>> Hello SPSS group-
>>
>> I am new to this group and am in the midst of getting to know SPSS.  *I
>> would really appreciate any feedback on the following question related to
>> efficient data manipulation:  *
>>
>> I have one beach and three sampling transects (m1, m2, and m3) within the
>> beach.  It is important to keep the data separated by transect because
>> sometimes specific analysis will need to be done on each transect.
>>  However, it is also important to combine all the transect data as one
>> full
>> beach.  This would mean joining the three sampling transect columns
>> together, basically m1 stacked above m2, which is stacked above m3 in one
>> column.  In order to do the analysis I would like to do, it also means
>> being able to easily replicate the other environmental data (e.g.
>> AirTemperature, WindSpeed, 24hrRainfall) into a stacked column to match
>> the
>> combined beach data.  (The environmental data is basically the same for
>> the
>> three transects but would need to match the transects).  I can obviously
>> do
>> this manually, but I have to do it many times for many beaches and was
>> trying to figure out a quicker way since it is already set up best for
>> analysis on individual transects.
>>
>> It does not seem like "Compute Variable" works - I tried to make a new
>> variable mbeach=m1&m2&m3, but this produced blanks in a new column.
>>  Another method was combining the variable, but that just added the
>> variables together for a total value vs. preserving the original values
>> and
>> making a larger dataset.  Would the Restructure command work for either
>> stacking the beach transect data or replicating the environmental data to
>> match the stacked beach transect data?  From what I was trying, I wasn't
>> having much luck with it.
>>
>> I would really appreciate any advice on whether I should continue to look
>> for an easier way or to get to work on it manually.  Thank you very much.
>> Sarah
>>


Sarah Wright wrote
> Thank you very much Rich for your response - I am working through it.
>
>
> On Mon, Dec 31, 2012 at 5:16 PM, Rich Ulrich <

> rich-ulrich@

> > wrote:
>
>>  If you need to go from a WIDE orientation to a LONG orientation,
>> you want CasesToVars.   VarsToCases goes the opposite way.
>> For LONG orientation, you do want to create the "transect"
>> identifier, so that every line remains identified as to what it is.
>>
>>
>> Wide-to-long can also be achieved with XSAVE -- either by writing
>> several files with several XSAVEs, which are then combined by ADD FILE;
>> or by using Vectors and a LOOP  in order to write every set into one file
>> at once.
>>
>> --
>> Rich Ulrich
>>
>> ------------------------------
>> Date: Mon, 31 Dec 2012 14:52:15 -0600
>> From:

> wright.sarah@

>> Subject: SPSS Data Arrangement
>> To:

> SPSSX-L@.UGA

>>
>>
>> Hello SPSS group-
>>
>> I am new to this group and am in the midst of getting to know SPSS.  *I
>> would really appreciate any feedback on the following question related to
>> efficient data manipulation:  *
>>
>> I have one beach and three sampling transects (m1, m2, and m3) within the
>> beach.  It is important to keep the data separated by transect because
>> sometimes specific analysis will need to be done on each transect.
>>  However, it is also important to combine all the transect data as one
>> full
>> beach.  This would mean joining the three sampling transect columns
>> together, basically m1 stacked above m2, which is stacked above m3 in one
>> column.  In order to do the analysis I would like to do, it also means
>> being able to easily replicate the other environmental data (e.g.
>> AirTemperature, WindSpeed, 24hrRainfall) into a stacked column to match
>> the
>> combined beach data.  (The environmental data is basically the same for
>> the
>> three transects but would need to match the transects).  I can obviously
>> do
>> this manually, but I have to do it many times for many beaches and was
>> trying to figure out a quicker way since it is already set up best for
>> analysis on individual transects.
>>
>> It does not seem like "Compute Variable" works - I tried to make a new
>> variable mbeach=m1&m2&m3, but this produced blanks in a new column.
>>  Another method was combining the variable, but that just added the
>> variables together for a total value vs. preserving the original values
>> and
>> making a larger dataset.  Would the Restructure command work for either
>> stacking the beach transect data or replicating the environmental data to
>> match the stacked beach transect data?  From what I was trying, I wasn't
>> having much luck with it.
>>
>> I would really appreciate any advice on whether I should continue to look
>> for an easier way or to get to work on it manually.  Thank you very much.
>> Sarah
>>





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/SPSS-Data-Arrangement-tp5717184p5717189.html
Sent from the SPSSX Discussion mailing list archive at Nabble.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: SPSS Data Arrangement

Sarah Wright
In reply to this post by John F Hall
Thanks John - I will take a look.  


On Mon, Dec 31, 2012 at 6:54 PM, John F Hall <[hidden email]> wrote:

Sarah

 

Bit late on New Year’s Eve here (by now actually New Year’s Day) but being a newbie to SPSS you might like to look at the SPSS tutorials on my site, plus the links to other useful sites.  However they’re related more to questionnaire surveys than to beach transepts.

 

 

John F Hall (Mr)

[retired academic survey researcher]

 

Email:     [hidden email]

Website: www.surveyresearch.weebly.com

 

 

 

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Sarah Wright
Sent: 31 December 2012 21:52
To: [hidden email]
Subject: SPSS Data Arrangement

 

Hello SPSS group- 

 

I am new to this group and am in the midst of getting to know SPSS.  I would really appreciate any feedback on the following question related to efficient data manipulation:  

 

I have one beach and three sampling transects (m1, m2, and m3) within the beach.  It is important to keep the data separated by transect because sometimes specific analysis will need to be done on each transect.  However, it is also important to combine all the transect data as one full beach.  This would mean joining the three sampling transect columns together, basically m1 stacked above m2, which is stacked above m3 in one column.  In order to do the analysis I would like to do, it also means being able to easily replicate the other environmental data (e.g. AirTemperature, WindSpeed, 24hrRainfall) into a stacked column to match the combined beach data.  (The environmental data is basically the same for the three transects but would need to match the transects).  I can obviously do this manually, but I have to do it many times for many beaches and was trying to figure out a quicker way since it is already set up best for analysis on individual transects.  

 

It does not seem like "Compute Variable" works - I tried to make a new variable mbeach=m1&m2&m3, but this produced blanks in a new column.  Another method was combining the variable, but that just added the variables together for a total value vs. preserving the original values and making a larger dataset.  Would the Restructure command work for either stacking the beach transect data or replicating the environmental data to match the stacked beach transect data?  From what I was trying, I wasn't having much luck with it.       

 

I would really appreciate any advice on whether I should continue to look for an easier way or to get to work on it manually.  Thank you very much.  

Sarah