2
$\begingroup$

I'm editing this question in hopes of improving it, and thus receiving some advice on it.

I have collected info on diet from several populations. There are different groups (e.g. ElMolo) made of individuals and each individual eats different foods (e.g. cheese). Each food has a specific weight (g) (dependent variable) Also, each food is classified to a category (e.g cheese is animal).

Goal: I want to know if the proportion of each food category (e.g. animal) changes significantly accross populations (e.g. Webuye). For instance, do ElMolo eat proportionaly more animal foods than the other populations?

Below is a graph to illustrate my results: enter image description here

Questions:

  1. I believe I should not do an ANOVA on the frequencies, but instead do a loglinear analysis using a contingency table. Is this correct?

  2. Before applying loglinear analysis, I need to build a contingency table. I tried this:

    ContingencyTable2<-xtabs(Weight~Food+Tribe, data=AllDiet)
    

However my data is raw: so Weight is weight of food in g per individual (i.e the data is not in frequency). Here it says that "If a variable is included on the left side of the formula, it is assumed to be a vector of frequencies (useful if the data have already been tabulated)." So do I need to calculate the frequencies before building the contingency table or is there another way to do this?

Any help is appreciated! Thank you

$\endgroup$
4
  • $\begingroup$ Be aware that questions about how to use R are generally off topic here. You may not get an answer to #2. $\endgroup$ Commented Nov 10, 2016 at 16:21
  • $\begingroup$ That's fine. #1 is more important. Thank you for the warning $\endgroup$
    – answer42
    Commented Nov 11, 2016 at 10:11
  • $\begingroup$ Sure, just letting you know. What is the relationship between Freq & Weight? $\endgroup$ Commented Nov 11, 2016 at 13:11
  • $\begingroup$ Sorry it took me so long to reply: Weight=Freq *Meal Weight; However I'd like to analyse Freq only $\endgroup$
    – answer42
    Commented Nov 16, 2016 at 13:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.