lfclus(group = NULL, haul = NULL, len = NULL, number= NULL,
binsize = NULL, resamples = 100)
S(X)=K/n
where K is the number of scores equal to or less
than X and n is the total number of length observations (Seigel, 1956).
To generate the empirical probability density function (pdf), haul data are randomly assigned without replacement to the two groups with samples sizes equal to the original number of hauls in each group under comparison.
The K-S statistic is calculated from the cumulative length frequency distributions of the two groups
of randomized data. The randomization procedure is repeated resamples
times to
obtain the pdf of D. To estimate the significance of Ds, the proportion of all randomized D values
that were greater than or equal to Ds, including the occurrence of Ds in the numerator and denominator, is calculated
(Manly, 1997).
It is assumed all fish caught are measured. If subsampling occurs, the number at length (measured) must be expanded to the total caught.
Data vectors described in arguments
should be aggregated so that each record contains the number of fish in each length class by group and haul identifier. For example,
group
tow
length
number
North 1 10 2
North 1 12 5
North 2 11 3
North 1 10 17
North 2 14 21
. . . .
. . . .
South 1 12 34
South 1 14 3
}lfstrclus
data(codcluslen)
lfclus(group=codcluslen$region,haul=codcluslen$tow,len=codcluslen$length,
number=codcluslen$number,binsize=5,resamples=100)
Run the code above in your browser using DataLab