Josh Jahner | 9 Feb 01:12
Picon
Favicon
Gravatar

Residual Deviance in Binomial GLM


Hello,
I am attempting to calculate the variation in many butterfly population sizes across 35 years of
monitoring. The data are in fractions, so I am using a binomial glm with a logit link function to look for
population trends across years. I was wondering if I could use the residual deviance output from the glm's
as a proxy of population variability? What are the issues associated with doing this? Thanks!
Josh

 		 	   		  
	[[alternative HTML version deleted]]
Vincenzo Ellis | 8 Feb 20:40
Picon
Gravatar

lda on groups of species

Hi everyone,

I am trying to perform a linear discriminant analysis (lda) using the MASS
package on a community dataset (sites by species, similar to the dune
dataset in vegan). I have defined groups of species based on an a priori
ecological hypothesis. Does anyone know how to perform the lda on species
based on their abundances at each site?  I want to see if the groups of
species are significantly different from one another, and how they are
realized in the community space.  So far I can only find examples of lda's
of sites where they have been previously grouped based on clustering
alogrithms.

Thanks so much,
Vincenzo

	[[alternative HTML version deleted]]
Picon
Gravatar

Using function adonis for unbalanced designs?

  Hi all,

I am trying to use PERMANOVA in a one factor design to test for 
differences in diet among species (species are in rows and foods in 
columns).I however have different sample sizes for each species (groups).

In Anderson, 2001 I found that the PERMANOVA method is for balanced 
designs but it could be modified for unbalanced designs.Does adonis 
account for differences in sample size among groups?I couldn’t find 
direct reference to this in the Vegan manual or tutorial.I read that 
MRPP can be used for unbalanced designs.  I'm not sure about Anosim.I 
would greatly appreciate any suggestions.

Thanks,

Bibiana
_______________________________________________
R-sig-ecology mailing list
R-sig-ecology@...
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
Caroline Wallis | 8 Feb 15:10
Picon
Favicon
Gravatar

adonis: error in rowSums

I am trying to use the 'adonis' function in the 'vegan' package to assess differences in water depth and
water velocity between areas of a river channel categorised by surface flow type (6 types in total,
unequal sample sizes). 

Sample Data (LB):

SFT	Depth	Vel
BSW	0.18	1.2
BSW	0.16	1.03
BSW	0.16	0.98
BSW	0.22	0.53
BSW	0.11	0.668
BSW	0.14	0.432
BSW	0.12	0.391
BSW	0.16	0.647
BSW	0.2	0.903
BSW	0.3	0.594
BSW	0.37	0.429
....

The dependent data was used in data frame format, rather than a dissimilarity matrix.

Using the call
'adonis(formula=SFT~Depth*Vel,data=LB,permutations=999,method="canberra",strata=NULL)' I
get the following error:

Error in rowSums (x, na.rm=TRUE)
'x' must be an array of at least two dimensions

I examined the adonis code to find 'x'. It first appears at the permutation stage:
(Continue reading)

Alison Anderson | 8 Feb 14:39
Picon
Gravatar

R-Sig Eco- Looking for help with R code to calculte fish metrics using 2 tables

Hello All,

I am looking for help finding R code to help me generate fish indices of stream quality.  A brief over view of
what I currently have:  I am using two different data sets to help generate these metrics.  The first one
consists of site data, where each row is a sampling event and each column is a species, with the
corresponding cells containing abundances for that site.  The second data set is a fish traits database
where each row is a fish species (same species as the sampling events) and each column is a specific trait
with each cell indicating whether the fish species has that trait or not.  Specifically, I'm looking for
code that will help me read from both tables at once, with out me having to write a bunch of if-then statements.

Any help, or ideas on a starting point, would be greatly appreciated.

Thanks,

Alison Anderson

--
Alison M. Anderson
Graduate Research Assistant
West Virginia University
aander16@...
(419)305-4167

	[[alternative HTML version deleted]]

_______________________________________________
R-sig-ecology mailing list
R-sig-ecology@...
(Continue reading)

Picon
Favicon
Gravatar

Comparison of gam and gamm fits

Dear list members,

I apologise in advance for the large-ish email, but I thought it was important to paste in some plots for what follows.

I am using generalised additive models to capture patterns of seasonal and interannual variation in the
abundance of zooplankton, in a lake ecosystem. I am trying to fit models with smoothers for year and day of
year to capture the "average" pattern in each of these temporal dimensions, and then have added a
two-dimensional (tensor product) smoother to try to model any changes in the seasonal pattern among
years. I am mindful that I may need to deal with correlated errors in these models and so would like to fit
error structures to see if they improve model fit, judged by AIC. Therefore, as a first step I re-fitted the
gam model using gamm, to allow later inclusion of a correlation structure:

Daph_gam4<-gam((DAPHG+0.1)~s(Year,bs="cr")+s(DOY,bs="cr")+te(Year,DOY),family=Gamma(link="log"),data=ZooDat2)
Daph_gam4_no_ac<-gamm((DAPHG+0.1)~s(Year,bs="cr")+s(DOY,bs="cr")+te(Year,DOY),family=Gamma(link="log"),data=ZooDat2)

...where DAPHG is the abundance of a particular species of interest and DOY= day of year. I am using a Gamma
distribution as the data are heavily skewed and on a continuous scale (numbers per litre lake water).

The problem I am having is that these two models produce dramatically different fits, see the image plots
below. In this case the result of the gam model (Daph_gam4, labelled gam in the plot) bears a much greater
resemblance to the original data. Could anyone help me to understand why these two model fits are so very
different, when they are fitting the same smoothers?

Any help much appreciated!

Steve

Dr Stephen  Thackeray
Lake Ecosystem Group
Centre for Ecology and Hydrology
(Continue reading)

Alan Haynes | 7 Feb 18:00
Picon
Gravatar

envfit on 3rd dimension

Dear list,

Im using envfit() on an rda object and would like to know if it considers
the 3rd dimension in its comparisons of factor centroids. Based on the
output giving only PCs 1 and 2 for vectors and factors, Im guessing not.

Is there a way to get the info on the third dimension?

Thanks in advance

Alan

--------------------------------------------------
Email: aghaynes@...
Mobile: +41794385586
Skype: aghaynes

	[[alternative HTML version deleted]]
Lee, Laura | 6 Feb 17:18
Gravatar

zeroinfl package - Year effect and precision

Hello. I originally posted this to the main R-help mailing list, but I'm afraid it got lost in the fray. 

I am using the zeroinfl package to fit a zero-inflated negative binomial. The explanatory variables are
Year and Depth x STemp (interaction). I am in need of guidance for extracting the year effect and the
associated precision.

Thank you for your time.

Cheers,

Laura
sergio vignali | 4 Feb 20:44
Picon
Gravatar

WinBUGS

Hi,
I tryed to use WinBUGS under R with the package R2WinBUGS on ubuntu 11.10
with wine 1.3,
but I don't be able to set the command bugs(), in particular the
bugs.directory and the other options about wine,
is there someone who can help me?

Thanks

Sergio Vignali

	[[alternative HTML version deleted]]
carolina monmany | 4 Feb 20:03
Picon
Gravatar

vegan's ordistep function

Dear all,

I am running a redundancy analysis in vegan and I am using ordistep to
perform a forward selection of variables in my model. I'm following Borcard
et al. (2011) for this. I got stuck in one of the steps and couldn't find
out why.

> RDA.all <- rda(main ~ ., data=second)
> RDA.all
Call: rda(formula = main ~ MeanAsp + SDAsp + MenaSlo + SDSlo + Urban +
Treelines + TreeGroups +
SolTress + IntermGrass + TallGrass + Highways + Canals + DistDCA +
MeanTrackDens + SDTrackDens +
MeanMagnetism, data = second)

               Inertia Proportion Rank
Total         0.005999   1.000000
Constrained   0.005999   1.000000    9
Unconstrained 0.000000   0.000000    0
Inertia is variance
Some constraints were aliased because they were collinear (redundant)

Eigenvalues for constrained axes:
     RDA1      RDA2      RDA3      RDA4      RDA5      RDA6      RDA7
 RDA8      RDA9
4.421e-03 1.406e-03 8.930e-05 5.354e-05 1.413e-05 8.836e-06 4.612e-06
1.324e-06 3.500e-07

# And here's the problem,

(Continue reading)

Picon
Gravatar

metaMDS result

Hi Members,

I tried to use a metaMDS to explore my two fungal communities data.
That's the result:

Call:
metaMDS(comm = species.data_log, distance = "bray", k = 2, trymax =
200,      autotransform = F)

global Multidimensional Scaling using monoMDS

Data:     species.data_log
Distance: bray

Dimensions: 2
Stress:     0.0369308
Stress type 1, weak ties
Two convergent solutions found after 13 tries
Scaling: centring, PC rotation, halfchange scaling
Species: expanded scores based on ‘species.data_log’

species matrix was log10() trasformed before NMDS (otherwise I got really
similar result with sqrt() trasfromed data)

I wonder if the stress is too low according to dune examples and maybe
there is something not working in my data or code...

thanks you for helping,

G
(Continue reading)


Gmane