Re: [R-sig-eco] interpretation of interaction between explanatory variables

2013-05-10 Thread Bob O'Hara
It's difficult to give definitive advice about what it means, but the 
simplest approach is to look at what it means: plot the model and see 
what it looks like. Basically, the interaction says that as the 
variables both increase, the relationship gets less negative. The 
details depend on the ranges of the variables, hence plotting the 
results is helpful.

I would write some code, but that would probably mainly show that I'm 
out of date with R. But you could use expand.grid() to create new data 
to predict, use predict() to predict it, and then plot it as several 
lines on one plot (e.g. plot against C.abundances, with one line for 
each value of C.diversity).

Bob

On 05/08/2013 02:56 PM, Iris Kröger wrote:
 Dear list members,

 I want to analyse the impact of a competitor community (i.e. community 
 abundances on the one hand and community species diversity on the other 
 hand) on mosquito larval populations of species A and B. Each variable on its 
 own has a negative impact on mosquitoes - but when both variables are 
 interacting, there is a positive impact... How can I interpret that? For 
 mosquito A only C.diversity has a significant impact - but the interaction 
 between C.abundances and C.diversity is significant? What does that mean?

 I used the model:
 lm (mosquito ~ C.abundances * C.diversity)
 output Mosquito A:
   Estimate Std. Error t value Pr(|t|)
 (Intercept) -0.2120 0.1159 -1.829 0.074855 .
 C.abundances -0.1277 0.1616 -0.790 0.434067
 C.diversity -0.5787 0.1385 -4.178 0.000155 ***
 C.abundances:C.diversity 0.4096 0.1712 2.393 0.021476 *

 Output Mosquito B:
   Estimate Std. Error t value Pr(|t|)
 (Intercept) -0.2900 0.1220 -2.377 0.02233 *
 C.abundances -0.3856 0.1701 -2.266 0.02891 *
 C.diversity -0.3470 0.1458 -2.381 0.02213 *
 C.abundances:C.diversity 0.5367 0.1801 2.980 0.00489 **

 Thanks a lot for your help!
 Iris

   [[alternative HTML version deleted]]

 ___
 R-sig-ecology mailing list
 R-sig-ecology@r-project.org
 https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


-- 

Bob O'Hara

Biodiversity and Climate Research Centre
Senckenberganlage 25
D-60325 Frankfurt am Main,
Germany

Tel: +49 69 798 40226
Mobile: +49 1515 888 5440
WWW:   http://www.bik-f.de/root/index.php?page_id=219
Blog: http://blogs.nature.com/boboh
Journal of Negative Results - EEB: www.jnr-eeb.org


[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


[R-sig-eco] anyone using vegan

2013-05-10 Thread Bruce Miller

Hi all,

Anyone experienced with vegan, or possibly other R packages for 
ecological data?
I am working with a database that includes relative abundance data that 
can be exported as densities by locations or date and summered by night 
as these are bats.  So the question is the data format needed to 
generate rarefaction curves, species association metrics, diversity 
indices and the rest of the usual ecological analytics in vegan or other 
R packages that include ecological data processing.


Once I have the output from the Access DB defined I can automate 
generation of the files to open in R and run the required modules.


Anyone able to provide some suggestions/guidance?   I need to create the 
export form in Access so that all is in the correct format to be opened 
in R and the DF is correct for eh package(s).

Once processed by vegan etc. then write the results to a file.

Tnx.

Bruce


--
Bruce W. Miller, Ph.D.
Conservation Ecologist
Neotropical Bat Projects


office details
11384 Alpine Road
Stanwood, Mi. 49346
Phone (231) 679-6059

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


[R-sig-eco] betapart and nms

2013-05-10 Thread Mitchell, Kendra
I'm working on a large bacterial dataset, 700 samples with ~5600 species (rare 
species 100 observations have been removed).  The samples are from 
experimental plots from 6 ecozones.  I've done nms, betadisp, and permanova 
using several dissimilarity measures (jaccard, sorenson, Yuen's theta).  
Ecozone explains the vast majority of the difference between the samples using 
those measures.  I'm really interested in trying to find treatment effects so 
have also tried betapart-specifically trying to see if nestedness increases in 
the harsher treatments.  

Here is where I need input from the list.  beta.sim gives a similar ordination 
to the dissimilarity measures and the expected step down in stress as I 
increase number of dimensions. However beta.sne is very strange and I don't 
know how to interpret it.  The stress in 1d is 0.6, but drops to 0 in 2d.  
When I plot the 2d solution I get a horseshoe-it looks like the typical 
distortion in a PCA of nonlinear data.  I've run a lot of NMS on these types of 
nonnormal, empty, huge matrixes and have never seen this sort of pattern in the 
ordination and my stress never goes much below .15.  I'm not sure how to assess 
what beta.sne is calculating to help me make sense of this result.  I've 
subsampled my species matrix a few times just to make sure something strange 
didn't happen with the subsampling.

thanks for reading, Kendra




Here's what I've run so far

##betapart

#subsample matrix in mother to 1950 observations per sample

b03_f100_1_1 - read.table(bac_03_f100_sub1, row.names=1, header=T)

#convert to presence/abscence
b03_f100_1_pa - decostand(b03_f100_1_1, method=pa)


#betapart
bac03_bp-beta.pair(b03_f100_1_pa, index.family=sorensen )

#nms on betapart objects
scree_bsim1-nmds(bac03_bp$beta.sim, mindim=1, maxdim=6, nits=10)  #stress: 
1d .65, 2d .35, 3d .25, 4d .19
scree_bsne1-nmds(bac03_bp$beta.sne, mindim=1, maxdim=6, nits=10)  #stress: 
1d .6, 2d 0, 3d 0...


bac_bsim_nms- metaMDS(bac03_bp$beta.sim, k=3, trymin=50, trymax=250, 
wascores=FALSE)
bac_bsne_nms- metaMDS(bac03_bp$beta.sne, k=2, trymin=50, trymax=250, 
wascores=FALSE)


--
Kendra Maas Mitchell, Ph.D.
Post Doctoral Research Fellow
University of British Columbia

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology