[R-sig-eco] complicated unbalanced anova
Tim Seipel
t.seipel at env.ethz.ch
Wed May 22 23:43:32 CEST 2013
Dear List,
I am trying to analyze the response of a morphological trait to climate
(continuous variables: mean annual temperature, and annual
precipitation), probability of occurrence (continuous variable bound
between 0 and 1), range (a two level factor), region (6 levels). (data
attached)
The observational data (n=137) has a complicated and unbalanced structure.
ran (range) has two levels nat and non, and within ranges we sampled
regions.
Of the six total regions four were nested in non, and two in the nat.
Within a region samples were taken from across a climate gradient, and
the gradients overlap to different degrees between regions and range.
####
df5<-read.table('df5.txt',header=T)
tapply(df5$mat,df5$region,range)
####
I wish to evaluate the expectation that there is no difference between
range (nat or non). Then I wish to perform analysis of variance to
report the deviance each variable and some of the interactions account for.
Additionally, I am interested in the regional response of the trait to
climate (slopes estimates of climate variables in for each region) and
the interactions.
I have considered a number of approaches and done some reading, but
being an ecologist my knowledge is only sufficient to make me dangerous.
--The simplistic way is to analyze the variables with a type 1 anova
approach.
mod<-glm(measure~poo+ran+poly(tap,2)+poly(tap,2):region+poo:region+poly(mat,2)+poly(mat,2):region+region,data=df5)
anova(mod) ##based on visual inspection of trends I suspect the
relationship of climate to trait is non linear.
--Another possibility is a type 3 anova
drop1(mod, .~.,test='Chi')
My question for the list is: What is the most robust way to analyze the
variance in this instance?
Thanks.
Sincerely,
Tim
PS. The 137 observations are means from populations. In the data frame
the sd and se of each population is also reported.
-------------- next part --------------
region poo mat tap N ran measure sd se ci
Austral 0.410559085 14.87916667 947 19 non 78.84210526 11.50006356 2.638295522 5.542853211
Austral 0.494718302 15.05 958 10 non 103.9 31.90071403 10.08789153 22.82039609
Austral 0.494718302 15.26666667 952 19 non 118.3157895 32.72452806 7.507521621 15.77271764
Austral 0.725812757 11.59166667 756 20 non 64 10.9400279 2.446264607 5.120090665
Austral 0.725812757 11.83333333 727 20 non 82.9 21.68652262 4.849253876 10.14960501
Austral 0.73029912 12.59583333 865 20 non 82.4 20.25209541 4.528506202 9.478272411
Austral 0.748952794 8.070833333 1508 20 non 105.15 37.07925367 8.291173176 17.3536249
Austral 0.876440832 9.2 968 20 non 72.25 23.17638317 5.182396824 10.84688121
Austral 0.876440832 9.525 988 20 non 75.85 28.90324149 6.462961273 13.52713341
Hawaii 0.059268486 18.8 1026 18 non 140.6111111 28.10304335 6.623950843 13.97531467
Hawaii 0.059268486 19.26666667 978 20 non 133.3 26.31009412 5.883115895 12.31350308
Hawaii 0.148847932 19.9625 1172 20 non 103.2 29.72257692 6.646170247 13.9105942
Hawaii 0.846340335 11.74583333 955 20 non 191.4 53.46656604 11.95548762 25.02312317
Hawaii 0.846340335 11.875 991 20 non 144.3 47.27756784 10.57158555 22.12658285
Hawaii 0.846340335 11.94583333 1004 20 non 97.05 24.90714334 5.569406564 11.65690191
Hawaii 0.855717121 8.8375 861 56 non 116.1607143 37.11788434 4.960085933 9.940234338
Kashmir 0.189138556 15.77083333 543 20 nat 142.645 67.90348782 15.18368147 31.77981055
Kashmir 0.333616793 13.51666667 691 40 nat 115.12 37.19318383 5.880758716 11.89495726
Kashmir 0.333616793 13.69583333 688 20 nat 92.01 32.05222547 7.167095499 15.00090328
Kashmir 0.333616793 13.90416667 671 20 nat 51.185 24.15337559 5.400858972 11.30412774
Kashmir 0.333616793 14.03333333 661 6 nat 73.65 29.74039341 12.14146477 31.21062879
Kashmir 0.479352575 13.95416667 740 20 nat 155.785 47.34739781 10.58720001 22.15926428
Kashmir 0.626897979 12.30416667 782 20 nat 59.51 29.70891945 6.643116342 13.9042023
Kashmir 0.725812757 12.09583333 795 20 nat 116.32 37.13545051 8.30373917 17.37992583
Kashmir 0.871570282 8.1625 1070 20 nat 101.615 33.88929772 7.577877341 15.86067956
Montana 0.265449902 4.145833333 436 40 non 63.945 20.05567827 3.171081167 6.414117084
Montana 0.265449902 4.266666667 432 20 non 59.28 14.07983253 3.148346266 6.589564466
Montana 0.340263128 6.483333333 388 40 non 159.35 39.74790432 6.284695493 12.71199651
Montana 0.46564964 4.645833333 472 20 non 152.91 44.27749696 9.900749307 20.72250646
Montana 0.488571494 3.870833333 598 20 non 112.905 26.28692841 5.877935885 12.3026612
Montana 0.488571494 3.916666667 590 20 non 103.42 22.50323018 5.031875239 10.53183591
Oregon 0.313574447 8.475 445 20 non 98.85 23.07943947 5.160719554 10.80151016
Oregon 0.346968649 2.308333333 653 20 non 80.25 27.76191067 6.207751945 12.99297414
Oregon 0.488571494 3.275 652 20 non 73.2 23.00022883 5.143007517 10.76443844
Oregon 0.488571494 3.316666667 610 20 non 76.8 19.6939745 4.403706573 9.217063785
Oregon 0.488571494 4.275 621 15 non 55.26666667 21.68431516 5.598866098 12.00837348
Oregon 0.508922169 6.491666667 478 20 non 107.95 55.81310448 12.48018957 26.12133696
Oregon 0.538233466 8.116666667 516 6 non 127 22.82980508 9.320228896 23.9584111
Oregon 0.596435673 5.2625 596 20 non 106.4 36.15813223 8.08520416 16.92252679
Oregon 0.596435673 5.5125 585 20 non 74.35 22.06276931 4.933385194 10.32569388
Switzer 0.431716484 2.4375 935 15 nat 101.6666667 38.06510713 9.8283684 21.07975371
Switzer 0.761860004 6.595833333 1353 10 nat 119.1 39.89555809 12.61608321 28.539563
Switzer 0.876440832 9.258333333 1039 20 nat 171.1 19.71881282 4.40926059 9.228688476
Switzer 0.88080125 8.604166667 1178 6 nat 135.1666667 33.18081775 13.54601212 34.82113271
Switzer 0.88080125 8.841666667 1103 4 nat 180.75 66.34945365 33.17472683 105.5767868
Switzer 0.88080125 9.354166667 1079 8 nat 130.375 45.73194413 16.16868391 38.23286208
Austral 0.410559085 14.87916667 947 19 non 78.84210526 11.50006356 2.638295522 5.542853211
Austral 0.494718302 15.05 958 10 non 103.9 31.90071403 10.08789153 22.82039609
Austral 0.494718302 15.26666667 952 19 non 118.3157895 32.72452806 7.507521621 15.77271764
Austral 0.725812757 11.59166667 756 20 non 64 10.9400279 2.446264607 5.120090665
Austral 0.725812757 11.83333333 727 20 non 82.9 21.68652262 4.849253876 10.14960501
Austral 0.73029912 12.59583333 865 20 non 82.4 20.25209541 4.528506202 9.478272411
Austral 0.748952794 8.070833333 1508 20 non 105.15 37.07925367 8.291173176 17.3536249
Austral 0.876440832 9.2 968 20 non 72.25 23.17638317 5.182396824 10.84688121
Austral 0.876440832 9.525 988 20 non 75.85 28.90324149 6.462961273 13.52713341
Hawaii 0.059268486 18.8 1026 18 non 140.6111111 28.10304335 6.623950843 13.97531467
Hawaii 0.059268486 19.26666667 978 20 non 133.3 26.31009412 5.883115895 12.31350308
Hawaii 0.148847932 19.9625 1172 20 non 103.2 29.72257692 6.646170247 13.9105942
Hawaii 0.846340335 11.74583333 955 20 non 191.4 53.46656604 11.95548762 25.02312317
Hawaii 0.846340335 11.875 991 20 non 144.3 47.27756784 10.57158555 22.12658285
Hawaii 0.846340335 11.94583333 1004 20 non 97.05 24.90714334 5.569406564 11.65690191
Hawaii 0.855717121 8.8375 861 56 non 116.1607143 37.11788434 4.960085933 9.940234338
Kashmir 0.189138556 15.77083333 543 20 nat 142.645 67.90348782 15.18368147 31.77981055
Kashmir 0.333616793 13.51666667 691 40 nat 115.12 37.19318383 5.880758716 11.89495726
Kashmir 0.333616793 13.69583333 688 20 nat 92.01 32.05222547 7.167095499 15.00090328
Kashmir 0.333616793 13.90416667 671 20 nat 51.185 24.15337559 5.400858972 11.30412774
Kashmir 0.333616793 14.03333333 661 6 nat 73.65 29.74039341 12.14146477 31.21062879
Kashmir 0.479352575 13.95416667 740 20 nat 155.785 47.34739781 10.58720001 22.15926428
Kashmir 0.626897979 12.30416667 782 20 nat 59.51 29.70891945 6.643116342 13.9042023
Kashmir 0.725812757 12.09583333 795 20 nat 116.32 37.13545051 8.30373917 17.37992583
Kashmir 0.871570282 8.1625 1070 20 nat 101.615 33.88929772 7.577877341 15.86067956
Montana 0.265449902 4.145833333 436 40 non 63.945 20.05567827 3.171081167 6.414117084
Montana 0.265449902 4.266666667 432 20 non 59.28 14.07983253 3.148346266 6.589564466
Montana 0.340263128 6.483333333 388 40 non 159.35 39.74790432 6.284695493 12.71199651
Montana 0.46564964 4.645833333 472 20 non 152.91 44.27749696 9.900749307 20.72250646
Montana 0.488571494 3.870833333 598 20 non 112.905 26.28692841 5.877935885 12.3026612
Montana 0.488571494 3.916666667 590 20 non 103.42 22.50323018 5.031875239 10.53183591
Oregon 0.313574447 8.475 445 20 non 98.85 23.07943947 5.160719554 10.80151016
Oregon 0.346968649 2.308333333 653 20 non 80.25 27.76191067 6.207751945 12.99297414
Oregon 0.488571494 3.275 652 20 non 73.2 23.00022883 5.143007517 10.76443844
Oregon 0.488571494 3.316666667 610 20 non 76.8 19.6939745 4.403706573 9.217063785
Oregon 0.488571494 4.275 621 15 non 55.26666667 21.68431516 5.598866098 12.00837348
Oregon 0.508922169 6.491666667 478 20 non 107.95 55.81310448 12.48018957 26.12133696
Oregon 0.538233466 8.116666667 516 6 non 127 22.82980508 9.320228896 23.9584111
Oregon 0.596435673 5.2625 596 20 non 106.4 36.15813223 8.08520416 16.92252679
Oregon 0.596435673 5.5125 585 20 non 74.35 22.06276931 4.933385194 10.32569388
Switzer 0.431716484 2.4375 935 15 nat 101.6666667 38.06510713 9.8283684 21.07975371
Switzer 0.761860004 6.595833333 1353 10 nat 119.1 39.89555809 12.61608321 28.539563
Switzer 0.876440832 9.258333333 1039 20 nat 171.1 19.71881282 4.40926059 9.228688476
Switzer 0.88080125 8.604166667 1178 6 nat 135.1666667 33.18081775 13.54601212 34.82113271
Switzer 0.88080125 8.841666667 1103 4 nat 180.75 66.34945365 33.17472683 105.5767868
Switzer 0.88080125 9.354166667 1079 8 nat 130.375 45.73194413 16.16868391 38.23286208
Austral 0.410559085 14.87916667 947 19 non 78.84210526 11.50006356 2.638295522 5.542853211
Austral 0.494718302 15.05 958 10 non 103.9 31.90071403 10.08789153 22.82039609
Austral 0.494718302 15.26666667 952 19 non 118.3157895 32.72452806 7.507521621 15.77271764
Austral 0.725812757 11.59166667 756 20 non 64 10.9400279 2.446264607 5.120090665
Austral 0.725812757 11.83333333 727 20 non 82.9 21.68652262 4.849253876 10.14960501
Austral 0.73029912 12.59583333 865 20 non 82.4 20.25209541 4.528506202 9.478272411
Austral 0.748952794 8.070833333 1508 20 non 105.15 37.07925367 8.291173176 17.3536249
Austral 0.876440832 9.2 968 20 non 72.25 23.17638317 5.182396824 10.84688121
Austral 0.876440832 9.525 988 20 non 75.85 28.90324149 6.462961273 13.52713341
Hawaii 0.059268486 18.8 1026 18 non 140.6111111 28.10304335 6.623950843 13.97531467
Hawaii 0.059268486 19.26666667 978 20 non 133.3 26.31009412 5.883115895 12.31350308
Hawaii 0.148847932 19.9625 1172 20 non 103.2 29.72257692 6.646170247 13.9105942
Hawaii 0.846340335 11.74583333 955 20 non 191.4 53.46656604 11.95548762 25.02312317
Hawaii 0.846340335 11.875 991 20 non 144.3 47.27756784 10.57158555 22.12658285
Hawaii 0.846340335 11.94583333 1004 20 non 97.05 24.90714334 5.569406564 11.65690191
Hawaii 0.855717121 8.8375 861 56 non 116.1607143 37.11788434 4.960085933 9.940234338
Kashmir 0.189138556 15.77083333 543 20 nat 142.645 67.90348782 15.18368147 31.77981055
Kashmir 0.333616793 13.51666667 691 40 nat 115.12 37.19318383 5.880758716 11.89495726
Kashmir 0.333616793 13.69583333 688 20 nat 92.01 32.05222547 7.167095499 15.00090328
Kashmir 0.333616793 13.90416667 671 20 nat 51.185 24.15337559 5.400858972 11.30412774
Kashmir 0.333616793 14.03333333 661 6 nat 73.65 29.74039341 12.14146477 31.21062879
Kashmir 0.479352575 13.95416667 740 20 nat 155.785 47.34739781 10.58720001 22.15926428
Kashmir 0.626897979 12.30416667 782 20 nat 59.51 29.70891945 6.643116342 13.9042023
Kashmir 0.725812757 12.09583333 795 20 nat 116.32 37.13545051 8.30373917 17.37992583
Kashmir 0.871570282 8.1625 1070 20 nat 101.615 33.88929772 7.577877341 15.86067956
Montana 0.265449902 4.145833333 436 40 non 63.945 20.05567827 3.171081167 6.414117084
Montana 0.265449902 4.266666667 432 20 non 59.28 14.07983253 3.148346266 6.589564466
Montana 0.340263128 6.483333333 388 40 non 159.35 39.74790432 6.284695493 12.71199651
Montana 0.46564964 4.645833333 472 20 non 152.91 44.27749696 9.900749307 20.72250646
Montana 0.488571494 3.870833333 598 20 non 112.905 26.28692841 5.877935885 12.3026612
Montana 0.488571494 3.916666667 590 20 non 103.42 22.50323018 5.031875239 10.53183591
Oregon 0.313574447 8.475 445 20 non 98.85 23.07943947 5.160719554 10.80151016
Oregon 0.346968649 2.308333333 653 20 non 80.25 27.76191067 6.207751945 12.99297414
Oregon 0.488571494 3.275 652 20 non 73.2 23.00022883 5.143007517 10.76443844
Oregon 0.488571494 3.316666667 610 20 non 76.8 19.6939745 4.403706573 9.217063785
Oregon 0.488571494 4.275 621 15 non 55.26666667 21.68431516 5.598866098 12.00837348
Oregon 0.508922169 6.491666667 478 20 non 107.95 55.81310448 12.48018957 26.12133696
Oregon 0.538233466 8.116666667 516 6 non 127 22.82980508 9.320228896 23.9584111
Oregon 0.596435673 5.2625 596 20 non 106.4 36.15813223 8.08520416 16.92252679
Oregon 0.596435673 5.5125 585 20 non 74.35 22.06276931 4.933385194 10.32569388
Switzer 0.431716484 2.4375 935 15 nat 101.6666667 38.06510713 9.8283684 21.07975371
Switzer 0.761860004 6.595833333 1353 10 nat 119.1 39.89555809 12.61608321 28.539563
Switzer 0.876440832 9.258333333 1039 20 nat 171.1 19.71881282 4.40926059 9.228688476
Switzer 0.88080125 8.604166667 1178 6 nat 135.1666667 33.18081775 13.54601212 34.82113271
Switzer 0.88080125 8.841666667 1103 4 nat 180.75 66.34945365 33.17472683 105.5767868
Switzer 0.88080125 9.354166667 1079 8 nat 130.375 45.73194413 16.16868391 38.23286208
More information about the R-sig-ecology
mailing list