mujeeb rahman | 1 Jan 14:45
Picon

PCA

Hi..
During PCA in ade4TkGUI, the following error message is shown.

*Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,
:
  line 1 did not have 20 elements*
**
what i can do in this matter. My data (soil fauna abundance) with 17 colmns
and 60 rows.

Thanking you

Mujeeb Rahman
KFRI, Peechi, Kerala
India

	[[alternative HTML version deleted]]
T. Avery | 2 Jan 15:49
Picon
Picon

Re: R-sig-ecology Digest, Vol 10, Issue 2

Hi Mujeeb,
One of your data rows has 20 elements when it should (according to your 
message) 17 elements (columns). With a small dataset, just carefully go 
over the data. I find it is best to save data into a text file with 
either comma delimiter or tab delimiters. I suspect you saved from Excel 
to a text file. In some cases Excel adds a few columns to some data if 
you had used columns at the end of your data while entering into Excel 
and subsequently deleted them. Another trick is to highlight a series of 
columns in Excel (like 50 just to make sure) and delete the columns 
(just not the data, but right clikc and delete) and do that for a bunch 
of rows too. That will remove those cells that may have been written to 
and then their data deleted.

I get this issue all the time the first time students try to import data 
from Excel.

cheers,
trevor

> Today's Topics:
>
>    1. PCA (mujeeb rahman)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 1 Jan 2009 19:15:27 +0530
> From: "mujeeb rahman" <mujeebrahmanp@...>
> Subject: [R-sig-eco] PCA
(Continue reading)

Kim Milferstedt | 2 Jan 18:07
Picon

metaMDS: how does stress affect ordination distance?

Hello,

I am using metaMDS in vegan 1.13-1 on R 2.6.1 for ordinating microbial
sequence data.

If've got three general question about nmds using metaMDS:

1) Is it fair to assess the range of the x and y axes in nmds for
comparable data with similar ranges of observed distance?

2) What effect does Kruskal's stress have on the scaling in metaMDS's
analysis?

3) Is Kruskal's stress multiplied by a factor of 100 in metaMDS as well,
as metaMDS relies on isoMDS (see R-mailing list archive under  ``isoMDS
- high stress value and strange configuration'')?

Here's a description of my situation: My sequences come from 12 samples.
Depending on their level of sequence similarity, I group them into 300
to 16 groups (300 unique sequence types to 16 sequence types that allow
sequences to be 20% different). For all the groupings, the overall
observed distance in the data remains quite similar.

I now want to see at what level of similarity, samples start coalescing
in an ordination plot. For this I use metaMDS for various levels of
similarity. I assume that I can see the samples coalesce by observing
the range of the x and y axes shrink in the nmds plot (i.e. the
ordination distance).

As I expected, in general, the range of the x and y axes of the nmds
(Continue reading)

Picon

Re: R-sig-ecology Digest, Vol 10, Issue 2, PCA

Look carefully at your dataframe, some elements will be missing!

-----Oorspronkelijk bericht-----
Van: r-sig-ecology-bounces@...
[mailto:r-sig-ecology-bounces@...] Namens
r-sig-ecology-request@...
Verzonden: vrijdag 2 januari 2009 12:00
Aan: r-sig-ecology@...
Onderwerp: R-sig-ecology Digest, Vol 10, Issue 2

Send R-sig-ecology mailing list submissions to
	r-sig-ecology@...

To subscribe or unsubscribe via the World Wide Web, visit
	https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
or, via email, send a message with subject or body 'help' to
	r-sig-ecology-request@...

You can reach the person managing the list at
	r-sig-ecology-owner@...

When replying, please edit your Subject line so it is more specific
than "Re: Contents of R-sig-ecology digest..."

Today's Topics:

   1. PCA (mujeeb rahman)

----------------------------------------------------------------------

(Continue reading)

Jari Oksanen | 6 Jan 09:51
Picon
Picon
Favicon

Re: metaMDS: how does stress affect ordination distance?

Quoting Kim Milferstedt <milferst@...>:

> Hello,
>
> I am using metaMDS in vegan 1.13-1 on R 2.6.1 for ordinating microbial
> sequence data.
>
> If've got three general question about nmds using metaMDS:
>
> 1) Is it fair to assess the range of the x and y axes in nmds for
> comparable data with similar ranges of observed distance?
>
The scaling of NMDS is undefined, and in general you cannot compare  
axis scaling across ordinations. Indeed, you can multiply any scores  
by any constant and it doesn't change the configuration nor the  
solution. However, metaMDS implements Minchin's (DECODA) half-change  
scaling that fixes the scale: one unit means halving of similarity  
from the replicate similarity. Making some assumptions, you can  
compare the scale. The replicate similarity is one key concept here:  
you must assume that the solutions are comparable in that sense as  
well. Replicate similarity is the estimated dissimilarity among points  
at zero distance in ordination, or an estimate of dissimilarity of  
replicate samples form the same community, but found from the  
dissimilarity--distance plot of NMDS.

> 2) What effect does Kruskal's stress have on the scaling in metaMDS's
> analysis?

None.
>
(Continue reading)

J. Sebastian Tello | 6 Jan 19:43
Picon
Favicon

Estimation of R2 values in SAR models

Hi all,

Recently Hawkins et al. (2007) have shown using a monte carlo experiment, that typically the R2 values
associated to a variable are much smaller when estimated using OLS than when using a SAR model. I was
wondering if this is the case because in the SAR model (and maybe other spatial analyses) the proportion of
variation explained is estimated after removing the spatial autocorrelation in the residuals, and thus
reducing the unexplained variation. Any comentaries, ideas or references will be highly appreciated.

Cheers,

 J. Sebastián Tello

Department of Biological Sciences
285 Life Sciences Building
Louisiana State University
Baton Rouge, LA, 70803
(225) 578-4284 (office and lab.)

      
	[[alternative HTML version deleted]]

_______________________________________________
R-sig-ecology mailing list
R-sig-ecology@...
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
Matthew Landis | 6 Jan 21:42
Favicon

Re: Estimation of R2 values in SAR models

Sebastian,

I can't help you out, but I'll be very interested in the responses.  I
was recently looking at a similar issue -- how to calculate R2 values
for Generalized Least Squares regression for temporally autocorrelated
error terms.  I didn't have much luck in finding a solution myself.

Matt

J. Sebastian Tello wrote:
> Hi all,
> 
> Recently Hawkins et al. (2007) have shown using a monte carlo experiment, that typically the R2 values
associated to a variable are much smaller when estimated using OLS than when using a SAR model. I was
wondering if this is the case because in the SAR model (and maybe other spatial analyses) the proportion of
variation explained is estimated after removing the spatial autocorrelation in the residuals, and thus
reducing the unexplained variation. Any comentaries, ideas or references will be highly appreciated.
> 
> Cheers,
> 
> 
>  J. Sebastián Tello
> 
> 
> Department of Biological Sciences
> 285 Life Sciences Building
> Louisiana State University
> Baton Rouge, LA, 70803
> (225) 578-4284 (office and lab.)
> 
(Continue reading)

Julian Burgos | 8 Jan 00:30

Re: Estimation of R2 values in SAR models

Hi Sebastian,

Could you provide the full reference for Hawkins et al. (2007)?
Thanks,

Julian

J. Sebastian Tello wrote:
> Hi all,
> 
> Recently Hawkins et al. (2007) have shown using a monte carlo experiment, that typically the R2 values
associated to a variable are much smaller when estimated using OLS than when using a SAR model. I was
wondering if this is the case because in the SAR model (and maybe other spatial analyses) the proportion of
variation explained is estimated after removing the spatial autocorrelation in the residuals, and thus
reducing the unexplained variation. Any comentaries, ideas or references will be highly appreciated.
> 
> Cheers,
> 
> 
>  J. Sebastián Tello
> 
> 
> Department of Biological Sciences
> 285 Life Sciences Building
> Louisiana State University
> Baton Rouge, LA, 70803
> (225) 578-4284 (office and lab.)
> 
> 
> 
(Continue reading)

Carsten Dormann | 8 Jan 08:43
Picon
Favicon

Re: Estimation of R2 values in SAR models

Dear Sebastian and Julian, and others,

the full reference of the paper Sebastian referred to is:
Hawkins BA, Diniz-Filho JAF, Bini LM, De Marco P, Blackburn TM (2007) Red herrings revisited: spatial
autocorrelation and parameter estimation in geographical ecology. Ecography 30:375-384

It is part of an ongoing debate about the importance of spatial effects on regression estimates, started by
Lennon JJ (2000) Red-shifts and red herrings in geographical ecology. Ecography 23:101-113

Returning to the main problem of estimating effect size (or partial R2) for effects in spatial models:
1. I regard the Hawkins et al. paper as inconclusive. Although the space sampling points far apart, they do
not show that spatial autocorrelation was hence removed. In my review (Dormann CF (2007) Effects of
incorporating spatial autocorrelation into the analysis of species distribution data. Global Ecology
& Biogeography 16:129-138) I found spatial autocorrelation at all scales, and resampling to coarser
grain may or may not remove underlying spatial autocorrelation. It could hence be that the supposedly
autocorrelation-free models are still spatially autocorrelated.
2. The easiest way to compare effects for their importance in a spatial model would be to compare their
standardised coefficient estimates. Thus, scale the variables before the analysis, then the
(absolute) estimates are direct measures of their importance.
Which leaves the question, how important is the spatial effect compared to the non-spatial effect? The key
problem is that we cannot fit a spatial-effect-only model and compare that to the full model, because the
spatial effect will then take over some of the effects attributable to our environmental variables.
When you check the help for predict.sarlm (package spdep), you will find that the fit can be decomposed into
two elements, "trend" (i.e. the non-spatial part) and "signal" (the spatial part). 
If you run the first example in spautolm (spdep), then I think it is correct to use: cor(nydata$Z,
attr(predict(esar0), "trend"))^2 to extract the partial R2 for the non-spatial bit, and
cor(nydata$Z, attr(predict(esar0), "signal"))^2 for the spatial component. trend and signal sum to the
total fit values. In the case of this example, the majority of the combined effect of 0.216 (calculated
using cor(nydata$Z, predict(esar0))^2) is attributable to the non-spatial part (0.1904) and less to
the spatial component (0.0557).
(Continue reading)

Roy Martin | 11 Jan 20:33
Picon

Constructing a ZSM SAD in R

Hi all,

I was hoping someone on the board would have experience constructing the
zero-sum multinomial (ZSM) species abundance distribution (SAD) in R.
Unfortunately, my expertise in probability theory and R programming appear
limited, which has left me largely confused about how to construct the
expected SAD dataset in R using the maximum likelihood estimates of 'theta'
and 'm' that I have obtained for my dataset using the methods and PARI/GP
code provided in Etienne (2005).  If anyone has any experience with this in
R, I would be extremely grateful for any suggestions.

Sincerely,

Roy Martin
PhD Candidate
Wildlife and Fisheries Resources
West Virginia University
Morgantown, WV 26506
rmarti10@...
royworth@...

Etienne, R.S. 2005. A new sampling formula for neutral biodiversity. Ecology
Letters 8: 253-260.

	[[alternative HTML version deleted]]

Gmane