|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
(adehabitat) compana() freezes on small datasetHello all,
I'm running compositional analysis on red squirrel data. I've got two datasets, one for summer and one for fall. The summer dataset includes 6 animals and 5 habitats, and fall includes 9 animals and 5 habitats. I ran the compana(used, avail, test="parametric") separately for the two seasons, but only fall succeeded. Summer dataset causes R to freeze, and the process must be killed. Aebischer et al. 1993 fixes the absolute minimum as 6 animals. Is it the same for compana() algorithm? thank you in advance, Anne Ghisla Università dell'Insubria, Varese (IT) _______________________________________________ AniMov mailing list AniMov@... http://www.faunalia.com/cgi-bin/mailman/listinfo/animov |
|
|
Re: (adehabitat) compana() freezes on small datasetDear Anne,
> I'm running compositional analysis on red squirrel data. > I've got two datasets, one for summer and one for fall. > The summer dataset includes 6 animals and 5 habitats, and fall includes > 9 animals and 5 habitats. > > I ran the compana(used, avail, test="parametric") separately for the two > seasons, but only fall succeeded. Summer dataset causes R to freeze, and > the process must be killed. > Aebischer et al. 1993 fixes the absolute minimum as 6 animals. Is it the > same for compana() algorithm? > In fact, there is no absolute minimum for the function compana (you should just be aware that a small number of animals leads to uncertain conclusions). The only absolute minimum of the function is two animals (these are required to have a sensible measure of variance - remember that the compositional analysis relies on the multivariate analysis of /variance/). Thus, for example, performing a compositional analysis on only the first four pheasants of the pheasant dataset (from the Aebischer et al.'s paper) works perfectly (just copy and paste): data(pheasant) compana(pheasant$mcp[1:4,], pheasant$studyarea[1:4,], test = "parametric") I guess, however, that you may have an habitat type which is not available to any animal. For example, the following causes R to freeze: pheana2 <- compana(cbind(pheasant$mcp, rep(0, nrow(pheasant$mcp))), cbind(pheasant$studyarea, rep(0, nrow(pheasant$mcp))), test = "parametric") How to study the selection of a habitat type by a species if this habitat type is not available to any animal? Note that the same problem arises if one habitat type is available to only one animal (at least two animals are required to compute the variance): compana(cbind(pheasant$mcp, c(rep(0, nrow(pheasant$mcp)-1),1)), cbind(pheasant$studyarea, c(rep(0, nrow(pheasant$mcp)-1),1)), test = "parametric") I will modify the function compana in the next version of adehabitat, so that it reports an error when such cases occur. However, it is difficult to know what happens exactly in your case without any reproducible example. Hope this helps, Clément Calenge -- Clément CALENGE Observatoire des galliformes de montagne Office national de la chasse et de la faune sauvage Saint Benoist - 78610 Auffargis tel. (33) 01.30.46.54.14 _______________________________________________ AniMov mailing list AniMov@... http://www.faunalia.com/cgi-bin/mailman/listinfo/animov |
|
|
Re: (adehabitat) compana() freezes on small datasetOn Mon, 2008-05-26 at 11:44 +0200, Clément Calenge wrote:
> Dear Anne, [...] > I guess, however, that you may have an habitat type which is not > available to any animal. I examined the dataframes, and this is the case. Two habitats aren't available to any animal. Thanks to have pointed it out! > I will modify the function compana in the next version of adehabitat, so > that it reports an error when such cases occur. Thanks a lot! You can count me among testers. > However, it is difficult to know what happens exactly in your case > without any reproducible example. Sorry for not have sent the data, but there is an article in press about this and I wasn't allowed to publish them. > Hope this helps, > > > Clément Calenge regards, Anne _______________________________________________ AniMov mailing list AniMov@... http://www.faunalia.com/cgi-bin/mailman/listinfo/animov |
| Free Forum Powered by Nabble | Forum Help |