0
$\begingroup$

I need to transform a fairly large data set in order to analyse a certain variable as a percentage. I have seconds that I want to convert to their percentage value but by grouping variables.
ie. Age/sex category and month

I am working with SPSS and have convinced myself there must be an easy way to do this without having to manually calculate it all in excel. I suspect it will have to do with creating a new variable but for the life of me can not figure it out.

I simply want to compare proportion of time (seconds) spent eating certain plant parts by age/sex categories and months. All the papers I have read compare mean percentages (of time) is there an easy way to calculate this or must i continue to slug away with excel??

  • In desperate need :(

EDIT

here is how my data is set up at present

This is how the data is structured at present. Each row is a recorded observation of a feeding event the date is in the first 3 columns, plant part, AgeSex category and group are all converted into numerical data.

What I set out to determine is whether there is significant difference in ingestion of certain plant parts and nutrients by age/sex category.

To look at the difference most sources I look at, consider the proportion of time by age/sex in relation to each plant part. I want to also do it by month as it is already well recognised that there is significant change in dietary composition month-month.

So I guess what I am asking is if there is some way to calculate the mean percentage of seconds while applying the required grouping factors?

If this is on the incorrect board still I will figure out how to get it moved. :)

Thanks.

$\endgroup$
  • 1
    $\begingroup$ This would be a wrong board because it is about software using. You can ask the admin to move this to stack overflow. Also, you need to tell us what is the structure of your data. This is currently unanswerable. $\endgroup$ – Penguin_Knight Feb 21 '15 at 5:59
  • $\begingroup$ I believe there's potentially a more-or-less statistical question here (since a suitable calculation, transformation or analysis that could be performed in a package like SPSS may address the issue) -- but the question may not yet be sufficiently clear to discern it. Please explain as clearly as you can the situation and what you're trying to achieve. $\endgroup$ – Glen_b Feb 21 '15 at 6:49
2
$\begingroup$

It's still somewhat unclear about what your denominator would be. But you can try to tinker with this suggestion and achieve your desired results.

Let's say this is the data:

enter image description here

Go to Data > Aggregate and put the second variable into the "Summaries of Variables" panel. Then click the Function button below to change the function to "Sum" instead of "Mean." Your final screen should look like the picture below. If there are subgroup total you wish to compute, the put those subgroup indicator into the "Break Variables" panel. If nothing is specified, then the total will be based on all the cases.

When all set, click OK to apply.

enter image description here

This will be the new total variable created at the end of the data set:

enter image description here

Then you can compute the line-by-line percentage using compute:

enter image description here

Now that each line has a percent, the group-specific total percentage of seconds will just be the group sum. You can use:

Analyze > Compare Means > Means panel to get that. Put the percent variable into Dependent, and the group variable into Independent. Click the Option button and make sure the output will contain "Sum" by transferring the Sum into the right hand side.


In regards to layout for analysis as it will be grouped by month and age/sex dor further analysis would it be better to have a column for each groups line-by-line percentage or could I have it all in one column deapite them being for different groups/months and then reapply a grouping factor while doing the testing?

Without knowing the research questions and the design, it is hard to tell. Generally, t-test, ANOVA type of test will require the data to be in a so called "long" form, which means there will be a second variable, a group, age, and sex. If you are planning to do paired t-test type of analysis (e.g. compare the seconds spent eating between a mother/child dyad, etc.) then it will be easier to input them as the so called "wide" form, with each pair occupying the same row. There will be a variable for the mother's time in seconds, another for the child's time in seconds.

I am not too familiar about ecological/biological studies and how to deal with scenario like repeated observations. For instance, you might have observed the same subject today and yesterday. This kind of repeated measurements require more sophisticated analysis beyond just ANOVA or linear regression.

I would suggest you to talk to someone who is experienced in this kind of research and get some practical input. Not all data are analyzable, especially the ones that were collected without a preplanned analysis.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks you so much Penguin_knight. Just a quick follow up question. In regards to layout for analysis as it will be grouped by month and age/sex dor further analysis would it be better to have a column for each groups line-by-line percentage or could I have it all in one column deapite them being for different groups/months and then reapply a grouping factor while doing the testing? $\endgroup$ – Hayley Roberts Feb 21 '15 at 19:56
  • $\begingroup$ @HayleyRoberts, I addressed your question in the answer. Good luck. $\endgroup$ – Penguin_Knight Feb 21 '15 at 22:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.