[R-sig-eco] keeping a variable as qualitative even if it is coded with numbers

Marcelino de la Cruz marcelino.delacruz at upm.es
Tue Nov 30 13:04:52 CET 2010


Hi Amelie,

You indeed has to transform your variables in factors because they are
qualitative variables. And yes, that will include the 0 in your analysis
and you ARE interested in that, because is the only way to tell
fourthcorner function that some species do not have some dispersal trait.
So go ahead as you were doing first.

Cheers

Marcelino



Con fecha 30/11/2010, "Karen Kotschy" <karen.kotschy at gmail.com>
escribió:

>Hi Amelie
>
>I am not familiar with the workings of fourthcorner analysis, but suspect
>that it involves calculation of dissimilarities. In this case, the way
>binary variables like yours are treated can be very important.
>
>Have a look at the function dist.ktab in the package ade4 and the
>reference on the help page:
>
>Pavoine S., Vallet, J., Dufour, A.-B., Gachet, S. and Daniel, H. (2009) On
>the challenge of treating various types of variables: Application for
>improving the measurement of functional diversity. Oikos, 118, 391-402.
>
>You should probably code your variables as "fuzzy" (if a species can
>belong to more than one group at a time e.g. wind and water, short and
>long), or otherwise as "binary multichoice".
>
>I'm not sure, however, whether your fourth corner analysis can use the
>output from dist.ktab as is. But it would be important to find out exactly
>how binary variables are dealt in the fourth corner analysis, and to code
>them appropriately. For example, are they handled as symmetric or
>asymmetric binary variables? This makes a difference to the calculation of
>dissimilarty values.
>
>Regards
>Karen
>
>---
>Karen Kotschy
>Centre for Water in the Environment
>University of the Witwatersrand, Johannesburg, South Africa
>
>
>
>On Fri 26Nov10, amelie_can wrote: >
>> Hello,
>>
>> I am running a fourthcorner analysis which links species abundance,
>> functionnal traits and environmental variable. One of my trait is about seed
>> dispersal (qualitative variable) in which I have four classes: wind, water,
>> short and long distance. One species can have many types of dispersal. So in
>> my original table, I created four different column.
>>
>> ex:
>>
>>        wind         water        short         long
>> sp1    1               1              0             0
>> sp2    0               0              1             0
>> sp3    0               1              1             1
>>
>> and so forth. My problem is that those variable are considered as
>> quantitative but they are qualitative.
>> I tried to transform them using the function as.factor but then it includes
>> the 0 in my analysis and I am not interest in that.
>>
>> Any ideas to make those variable "qualitative"?
>>
>> Thank you all,
>>
>> Amelie
>> --
>> View this message in context: http://r-sig-ecology.471788.n2.nabble.com/keeping-a-variable-as-qualitative-even-if-it-is-coded-with-numbers-tp5778025p5778025.html
>> Sent from the r-sig-ecology mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> R-sig-ecology mailing list
>> R-sig-ecology at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
>_______________________________________________
>R-sig-ecology mailing list
>R-sig-ecology at r-project.org
>https://stat.ethz.ch/mailman/listinfo/r-sig-ecology



More information about the R-sig-ecology mailing list