Many thanks for the explanation! Regards, Ricardo
2009/5/13 <[email protected]>: > Dear Ricardo, > > > I am using the compana function in adehabitat to analyse habitat > > selection of a small mammal in an agricultural area, using a study > > design III (used and available measured for each animal). I have some > > missing values both in used and available habitats for some animals. I > > replaced null proportions of used habitats by a small value and a mean > > Wilks $,1ry (B lambda was computed using the randomization of log-ratio > > values. I got a profile of preferences (ranking) of habitat types but > > results don ,A4 (Bt show me the log-ratio matrices of used and available > > habitats. Is there any way to look at the log-ratio matrices? > > Actually, the function compana does not return the matrix of log > ratio, as it is quite easy to compute it yourself. Let a be the matrix > containing the available habitat (animals in rows and habitats in > columns) and u the matrix containing the use (supposing that you have > replaced null values by very small values). Then the log-ratios > matrices for the use can be computed by: > > li <- lapply(1:ncol(u), function(i) log(u[,-i]/u[,i])) > > Each element of the list contains the log-ratios based on a column of > the matrix (i.e. if there are 5 columns in u, the first element of the > li is a logratio based on the first column of u as the reference, the > second element uses the second column as the reference, etc.) Note > that because you have missing values in your matrix describing the > available habitat, the results of compositional analysis depends on > the choice of the reference for the computation of the log-ratio. So > that it is essential to consider simultaneously all the matrices... > > And similarly,for the available habitat: > > li <- lapply(1:ncol(a), function(i) log(a[,-i]/a[,i])) > > HTH, > > > Cl ,Ai (Bment Calenge > -- > Cl ,Ai (Bment CALENGE > Office national de la chasse et de la faune sauvage > Saint Benoist - 78610 Auffargis > tel. (33) 01.30.46.54.14 > > _______________________________________________ > AniMov mailing list > [email protected] > http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov > > _______________________________________________ AniMov mailing list [email protected] http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov
