You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
decostand provides the method "frequency" as an option for standardization, and I think the helpfile might be incorrect:
"frequency: divide by margin maximum and multiply by the number of non-zero items, so that the average of non-zero entries is one (Oksanen 1983; default MARGIN = 2)."
But carrying out the operations as described does not yield a mean of one. For example:
a<- sample(0:9, 100, replace=T) #create some random data; note that it doesn't matter whether these are integers or decimals, etc. b<-a/max(a) #divide by margin maxd<-b*sum(b!=0) #multiply by number of non-zero items
mean(d[d!=0]) #take mean of non-zero items
yields an integer between about 45 and 55, depending on the sampling.
decostand provides the method "frequency" as an option for standardization, and I think the helpfile might be incorrect:
"frequency: divide by margin maximum and multiply by the number of non-zero items, so that the average of non-zero entries is one (Oksanen 1983; default MARGIN = 2)."
But carrying out the operations as described does not yield a mean of one. For example:
yields an integer between about 45 and 55, depending on the sampling.
By contrast,
does have the intended effect of making the mean of non-zero numbers equal to zero.
The code for decostand has the following:
Which essentially divides the number of non-zero entries by the vector SUM, and then multiplies the vector by that dividend.
In sum, I think the helpfile wrongly describes the operation performed.
The text was updated successfully, but these errors were encountered: