# SOCR Activity ANOVA FlignerKilleen MeatConsumption

(Difference between revisions)
 Revision as of 22:33, 21 February 2013 (view source)IvoDinov (Talk | contribs) (→Data Summaries)← Older edit Revision as of 22:37, 21 February 2013 (view source)IvoDinov (Talk | contribs) Newer edit → Line 115: Line 115: {| class="wikitable" style="text-align:center; width:30%" border="1" {| class="wikitable" style="text-align:center; width:30%" border="1" |- |- - !Sex||locality||shell.h||shell.w||aperture.h||aperture.w||whorl.w||rib.n + !Country||Meat||2000||2001||2002||2003||2004||2005||2006 |- |- - |1||1||7063||3860||2564||2522||3119||29 + |Brazil||Beef||6102||6191||6437||6273||6400||6774||6939 |- |- - |1||1||7535||3846||2522||2629||3332||37 + |Brazil||Pork||1827||1919||1975||1957||1979||1949||2191 |- |- - |1||1||7484||3952||2680||2541||3258||34 + |Brazil||Poultry||5110||5341||5873||5742||5992||6612||6853 |- |- - |1||1||7516||3763||2671||2703||3217||31 + |China||Beef||5284||5434||5818||6274||6703||7026||7395 |- |- - |1||1||7211||3698||2555||2541||3133||30 + |China||Pork||40378||41829||43238||45054||46648||49703||51809 |- |- - |1||1||7526||3828||2573||2555||3143||28 + |China||Poultry||9393||9237||9556||9963||9931||10088||10371 |- |- - |1||1||7576||3851||2439||2504||3207||32 + |EuropeanUnion||Beef||8106||7658||8187||8315||8292||8194||8270 |- |- - |1||1||7558||3781||2471||2481||3143||35 + |EuropeanUnion||Pork||19242||19317||19746||20043||19773||19768||20015 |- |- - |1||1||7674||3828||2652||2513||3230||31 + |EuropeanUnion||Poultry||6934||7359||7417||7312||7280||7596||7380 |- |- - |1||1||7526||3786||2439||2555||3166||29 + |Japan||Beef||1585||1419||1319||1366||1182||1200||1173 |- |- - |1||1||7641||3943||2587||2481||3300||30 + |Japan||Pork||2228||2268||2377||2373||2562||2507||2450 |- |- - |1||1||7470||4087||2712||2606||3286||33 + |Japan||Poultry||1772||1797||1830||1841||1713||1880||1908 |- |- - |1||1||7262||3693||2573||2504||3124||38 + |Mexico||Beef||2309||2341||2409||2308||2368||2419||2509 |- |- - |1||1||7410||3781||2532||2499||3152||28 + |Mexico||Pork||1252||1298||1349||1423||1556||1556||1580 |- |- - |1||1||7799||4045||2782||2666||3342||31 + |Mexico||Poultry||2163||2311||2424||2627||2713||2871||3005 |- |- - |1||1||7567||3855||2583||2647||3226||33 + |Russia||Beef||2246||2400||2450||2378||2308||2503||2370 |- |- - |1||1||7428||3952||2481||2546||3226||32 + |Russia||Pork||2019||2076||2453||2420||2337||2476||2637 |- |- - |1||1||7368||3730||2448||2407||3119||33 + |Russia||Poultry||1320||1588||1697||1680||1675||2139||2382 |- |- - |1||1||6915||3615||2407||2259||3069||29 + |UnitedStates||Beef||12502||12351||12737||12340||12667||12663||12830 |- |- - |1||1||7327||3920||2587||2522||3217||36 + |UnitedStates||Pork||8455||8389||8685||8816||8817||8669||8640 |- |- - |1||1||7502||3837||2657||2536||3087||32 + |UnitedStates||Poultry||11474||11558||12270||12540||13080||13430||13754 - |- + - |2||1||7188||4003||2629||2546||3277||31 + - |- + - |2||1||7178||4119||2754||2670||3258||25 + - |- + - |2||1||7192||3865||2587||2374||3101||27 + - |- + - |2||1||7035||3971||2652||2647||3207||31 + - |- + - |2||1||6674||3823||2532||2573||3004||30 + - |- + - |2||1||7470||4027||2837||2694||3184||27 + - |- + - |2||1||7252||3952||2629||2407||3166||27 + - |- + - |2||1||6739||3855||2606||2439||3087||29 + - |- + - |2||1||7345||3994||2721||2555||3166||31 + - |- + - |2||1||7419||3869||2689||2564||3198||29 + - |- + - |2||1||7040||3837||2513||2481||3124||33 + - |- + - |2||1||6623||3920||2564||2564||3124||26 + - |- + - |2||1||7169||3980||2828||2434||3161||30 + - |- + - |2||1||6956||3777||2615||2495||3050||29 + - |- + - |2||1||6549||3749||2471||2425||2994||25 + - |- + - |2||1||6831||3763||2536||2407||3036||30 + - |- + - |2||1||7053||3985||2805||2573||3184||32 + - |- + - |2||1||6919||3837||2481||2448||3152||32 + - |- + - |2||1||6808||3911||2666||2499||3101||33 + - |- + - |2||1||7137||3573||2471||2522||3050||27 + - |- + - |2||1||6928||3851||2587||2495||3166||28 + - |- + - |1||2||7294||3679||2458||2356||3101||33 + - |- + - |1||2||7576||3786||2721||2777||3143||31 + - |- + - |1||2||7840||3892||2712||2471||3082||32 + - |- + - |1||2||7586||3860||2573||2647||3207||31 + - |- + - |1||2||7715||3860||2536||2546||3184||33 + - |- + - |1||2||7715||4017||2777||2638||3305||35 + - |- + - |1||2||7456||3929||2629||2680||3203||32 + - |- + - |1||2||7526||3878||2583||2606||3291||35 + - |- + - |1||2||7526||3772||2606||2564||3152||33 + - |- + - |1||2||7780||3772||2735||2629||3217||31 + - |- + - |1||2||7077||3703||2305||2337||3092||34 + - |- + - |1||2||7336||3781||2555||2439||3143||36 + - |- + - |1||2||7544||3855||2583||2638||3119||36 + - |- + - |2||2||7086||4077||2772||2629||3143||31 + - |- + - |2||2||6716||3846||2694||2689||3069||29 + - |- + - |2||2||7276||3929||2587||2481||3170||32 + - |- + - |2||2||6928||3860||2712||2564||3082||34 + - |- + - |2||2||6716||3818||2689||2439||3082||34 + - |- + - |2||2||6915||3869||2721||2388||3069||35 + - |- + - |2||2||7095||3929||2712||2490||3110||32 + - |- + - |2||2||6928||3952||2754||2638||3092||30 + - |- + - |2||2||7387||3804||2592||2564||3110||31 + - |- + - |2||2||7095||3869||2615||2541||3272||33 + - |- + - |2||2||7095||3846||2638||2587||3119||28 + - |- + - |2||2||6938||3846||2638||2638||3069||32 + - |- + - |2||2||7169||3721||2745||2629||3092||29 + - |- + - |2||2||7035||3689||2513||2397||3018||29 + - |- + - |2||2||7086||3786||2596||2356||3101||31 + - |- + - |2||2||7123||4059||2731||2819||3217||34 + - |- + - |2||2||7137||3878||2684||2546||3133||35 + - |- + - |2||2||6956||3619||2407||2296||3082||31 + - |- + - |2||2||7123||3929||2550||2541||3124||34 + - |- + - |2||2||7220||3869||2657||2448||3207||33 + - |- + - |2||2||7493||3971||2680||2638||3235||30 + - |- + - |2||2||7271||3994||2638||2620||3193||33 + - |- + - |1||3||7831||3948||2647||2708||3360||33 + - |- + - |1||3||7863||4207||2712||2694||3416||30 + - |- + - |1||3||7775||3952||2721||2573||3291||32 + - |- + - |1||3||7715||4068||2689||2430||3300||29 + - |- + - |1||3||7493||3892||2731||2578||3175||33 + - |- + - |1||3||7243||4008||2689||2786||3110||32 + - |- + - |1||3||8187||4207||2953||2902||3490||33 + - |- + - |1||3||7850||4119||2721||2680||3499||35 + - |- + - |1||3||8086||4128||2819||2680||3291||34 + - |- + - |1||3||8211||3906||2647||2541||3277||31 + - |- + - |1||3||7799||3929||2564||2499||3351||30 + - |- + - |1||3||7683||3962||2721||2666||3272||31 + - |- + - |1||3||7428||3952||2541||2527||3258||34 + - |- + - |1||3||7715||3994||2754||2657||3291||36 + - |- + - |1||3||7780||3994||2647||2680||3383||33 + - |- + - |1||3||7567||3869||2583||2365||3249||34 + - |- + - |1||3||7891||3943||2573||2564||3207||26 + - |- + - |1||3||7526||3804||2638||2522||3217||32 + - |- + - |1||3||7664||3888||2555||2541||3249||33 + - |- + - |2||3||7003||3962||2564||2439||3268||34 + - |- + - |2||3||7368||4077||2860||2712||3156||36 + - |- + - |2||3||7276||3837||2504||2300||3143||30 + - |- + - |2||3||7276||3814||2546||2374||3161||32 + - |- + - |2||3||6989||3633||2189||2161||3277||35 + - |- + - |2||3||7104||3814||2763||2680||3087||36 + - |- + - |2||3||7123||3971||2721||2564||3217||32 + - |- + - |2||3||7229||3855||2439||2388||3281||31 + - |- + - |2||3||7396||4119||2596||2661||3268||30 + - |- + - |2||3||7660||3721||2680||2458||3198||36 + - |- + - |2||3||7044||3892||2735||2546||3036||34 + - |- + - |2||3||7220||3772||2647||2416||3087||29 + - |- + - |2||3||7317||4119||2911||2869||3235||32 + - |- + - |2||3||6841||3962||2763||2703||3152||35 + - |- + - |2||3||7294||4054||2754||2416||3166||32 + - |- + - |2||3||7873||4193||2920||2893||3342||30 + |} |}

## Motivation and Goals

In many developed countries, when people imagine their next meal, they focus on one specific part: the meat. That choice of meat, however, varies from country to country due to the popularity and availability of various domesticated animals. Furthermore, the amount of meat eaten has a surprising degree of variability across time, cultures and geographic regions.

The following activity will study the effects of that variance on the statistical analyses. Specifically, we will consider how deviations from homoscedasticity (also known as equivalence of variance or variance homogeneity) can lead to making some incomplete or even incorrect conclusions. To do so, we will employ the Fligner-Killeen method to analyze some real meet consumption data.

## Summary

This activity uses a reduced version of the open-source meat-consumption dataset. All data comes from the US Census Bureau.

This dataset summarizes the meat consumption, by animal type, of various countries (the European Union (EU) is being treated as a single country in this case). For simplicity, records from countries that did provide consumption measures for all meat types and all years were removed from the data set.

## Data

### Data Description

• Number of cases: 147
• Variables
• Country: The country or world region in question
• Brazil
• China
• European Union
• Japan
• Mexico
• Russia
• United States
• Meat: The type of meat
• Beef
• Pork
• Poultry
• Years Represented (2000 – 2006)
• Values are in thousands of metric tons

### Data Summaries

#### Chicken/Poultry

YearBrazilChinaEuropeJapanMexicoRussiaUnitedStatesYearAverageYearSD
2000511093936934177221631320114745452.2863990.459
2001534192377359179723111588115585598.7143942.57
2002587395567417183024241697122705866.7144134.211
2003574299637312184126271680125405957.8574234.565
2004599299317280171327131675130806054.8574379.591
20056612100887596188028712139134306373.7144388.111
20066853103717380190830052382137546521.8574448.974
Country_Average5931.8579791.2867325.4291820.1432587.714178312586.57
Country_SD629.6543407.0908200.482666.03895304.2404357.6777886.5564

#### Pork

YearBrazilChinaEuropeJapanMexicoRussiaUnitedStatesYearAverageYearSD
200018274037819242222812522019845510771.5714570.99
200119194182919317226812982076838911013.7115049.33
200219754323819746237713492453868511403.2915502.7
200319574505420043237314232420881611726.5716145.49
200419794664819773256215562337881711953.1416648.16
200519494970319768250715562476866912375.4317714.83
200621915180920015245015802637864012760.2918438.64
Country_Average197145522.7119700.5723951430.5712345.4298638.714
Country_SD1104159.521312.355121.3013135.3808223.0148164.5121

#### Beef

YearBrazilChinaEuropeJapanMexicoRussiaUnitedStatesYearAverageYearSD
2000610252848106158523092246125025447.7143922.316
2001619154347658141923412400123515399.1433835.093
2002643758188187131924092450127375622.4294016.753
2003627362748315136623082378123405607.7143933.847
2004640067038292118223682308126675702.8574077.861
2005677470268194120024192503126635825.5714056.693
2006693973958270117325092370128305926.5714148.408
Country_Average6445.1436276.28681461320.5712380.4292379.28612584.29
Country_SD307.1685806.2036226.9295151.213871.7538885.31259190.4396

### Raw Dataset

CountryMeat2000200120022003200420052006
BrazilBeef6102619164376273640067746939
BrazilPork1827191919751957197919492191
BrazilPoultry5110534158735742599266126853
ChinaBeef5284543458186274670370267395
ChinaPork40378418294323845054466484970351809
ChinaPoultry939392379556996399311008810371
EuropeanUnionBeef8106765881878315829281948270
EuropeanUnionPork19242193171974620043197731976820015
EuropeanUnionPoultry6934735974177312728075967380
JapanBeef1585141913191366118212001173
JapanPork2228226823772373256225072450
JapanPoultry1772179718301841171318801908
MexicoBeef2309234124092308236824192509
MexicoPork1252129813491423155615561580
MexicoPoultry2163231124242627271328713005
RussiaBeef2246240024502378230825032370
RussiaPork2019207624532420233724762637
RussiaPoultry1320158816971680167521392382
UnitedStatesBeef12502123511273712340126671266312830
UnitedStatesPork8455838986858816881786698640
UnitedStatesPoultry11474115581227012540130801343013754

## Exploratory data analyses (EDA)

Various data patterns may be observed and explored using different types of graphical tools for plotting variables. Which of the following graphs are more or less likely to demonstrate visually significant grouping differences?

## Quantitative data analysis (QDA)

Open the SOCR ANOVA-Two Way applet (requires Java-enabled browser).

Copy and paste the Sex and Locality data into the first two columns. Pick one of the other six variables (in this case, Shell.h) and copy that data into the third. Use the ctrl + c command and the "paste" button in the applet. Name the three columns appropriately.

Next, click on the “mapping tab”. Select "sex" and "locality" as the independent variables. Next, name the third column as your dependent variable. We will use "shell.h" in the following example, but it is recommended that you use another in its place to explore these measures. Make sure you click “turn the interaction” on,

Press the Calculate button. This should bring up the results page with the following text:

ANOVA results
Sample Size = 112
Dependent Variable = Shell.h
Independent Variable(s) = Locality Sex Interaction Locality: Sex
*** Two-Way Analysis of Variance Results ***
See EBook's Standard 2-Way ANOVA Table
Main Effect: Locality21912452.01667956226.0083318.396510.00000
Main Effect: Sex16197835.013126197835.01312119.238090.00000
Interaction Locality: Sex2161192.2539280596.126961.550560.21690
Error1065509737.0135951978.65107
Total:11113170123.10714
Variable: Locality
Degrees of Freedom = 2
Residual Sum of Squares = 1912452.01667
Mean Square Error = 956226.00833
F-Value = 18.39651
P-Value = .00000
Variable: Sex
Degrees of Freedom = 1
Residual Sum of Squares = 6197835.01312
Mean Square Error = 6197835.01312
F-Value = 119.23809
P-Value = .00000
Variable: Interaction Locality: Sex
Degrees of Freedom = 2
Residual Sum of Squares = 161192.25392
Mean Square Error = 80596.12696
F-Value = 1.55056
P-Value = .21690
Residual: Degrees of Freedom = 106
Residual Sum of Squares = 5509737.01359
Mean Square Error = 51978.65107
F-Value = 29.47512
P-Value = 0.0
R-Square = .60598

For the effect of locality and the interaction effects, you can need to conduct post-hoc t-tests, in this case, a pooled independent samples t-test. You can do this in a similar manner to the two-way ANOVA; however will have to enter the values in a slightly different way (see below). Note that your critical t-values must have Bonferoni correction.

## Conclusions

According to the results of the analysis, you will find that there is are significant main effects of locality (F(2, 106) = 18.39651, p < 0.001) and sex (F(1, 106) = 119.23809, p < 0.001) on shell width. The interaction between sex and locality is not significant on shell width (F (2,106) = 1.55056, p > 0.20). Post-hoc tests reveal that t-tests will reveal that there is a significant difference in width between male (M 7106.88136, SD = 247.06778) and female (M = 7578.03773, SD = 256.89806) snails shells (t (110) = 9.88846, p < 0.001). The 99.7% confidence interval for the difference is 471.15638 ± 157.08993. Note that this interval does not include 0 (a lack of difference between the means). There is also a significant difference in width between the snails collected at localities one and two, two and three, & one and three. We leave these analyses to you in the first practice problems

Based on these results, it would be possible to classify whether a Cocholotoma septemspirale is male or female, regardless of the locality it comes from (there is no interaction of the two effects); females have significantly taller shells. Limitations of the study include its correlational nature. One issue with the study, for example, is that age might be a confounding variable, if these snails are the type that grows throughout their lifecycle.

## Practice problems

• Finish the post-hoc t-tests for the effect of locality on shell width.
• Complete an analysis similar to the one above, using one of the variables other than shell.h as -your dependent variable. See if that variable would be of use in classifying the snails.
• Complete a new analysis of this pain/neuroimaging data set. Use sex and disease group as independent variables. Choose for your dependent variable one of the brain volumes.