smw
objectFunctions to extract results and breakpoints from a smw
object
# S3 method for smw
extract(smw, w = NULL, index = "dp", sig = "z",
z = 1.85, BPs = "max", seq.sig = 3)# S3 method for dp
bp(dp)
An object of class smw
resulted from the SMW
analysis.
Numeric. A "target" window size from which results will be extracted (see Details). Only effective if the smw
object contains results from multiple window sizes.
The result to be extracted:
"dp"
: The dissimilarity profile (DP) table containing significant discontinuities and suggested breakpoints. The returned DP has class "dp"
, with an own generic print
method. The print
command prints and returns invisibly the DP.
"rdp"
: data frame containing the randomized DP;
"md"
: mean dissimilarity of the randomized DP;
"sd"
: standard deviation for each sample position;
"oem"
: overall expected mean dissimilarity;
"osd"
: average standard deviation for the dissimilarities;
"params"
: list with input arguments
Significance test for detecting dissimilarity values that differs significantly from those appearing in a random pattern. The following tests are considered with default to sig.test="z"
:
"dp"
consider normalized dissimilarity (z-scores) discontinuities that exceed a "z" critical value;
"sd"
consider dissimilarity discontinuities that exceed mean plus one standard deviation;
"SD2"
consider dissimilarity discontinuities that exceed mean plus two standard deviation;
"tail1"
Consider dissimilarity discontinuities that exceed 95 percent confidence limits.
The critical value for the significance of z-values. Defaults to 'z=1.85'
(Erd<U+00F6>s et.al, 2014).
Defines if the breakpoints should be chosen as those sample positions corresponding to the maximum dissimilarity in a sequence of significant values ("max"
) or as those sample positions corresponding to the median position of the sequence ("median"
). Defaults to BPs="max"
. If NULL
the breakpoints are not computed.
The maximum length of consecutive, significant values of dissimilarity that will be considered in defining the community breakpoints. Defaults to seq.sig=3
;
An object of class dp
(see Details).
"extract"
returns a result called by the argument index
(see Details);
"bp"
returns the locations of the breakpoints.
If the smw
object contains results from multiple window sizes, the DP table will be based on the average Z-score over the set of analysed window sizes. Available methods for class "dp"
are print
, bp
and plot
.
The argument w
is optional. If the smw
object is length 1, w
is ignored. If length(smw)>1
and w
is NULL
, the function will extract the dissimilarity profile averaged over the set of window sizes.
# NOT RUN {
data(sim1)
sim1o<-OrdData(sim1$envi,sim1$comm)
# }
# NOT RUN {
ws50<-SMW(yo=sim1o$yo,ws=50)
ws50_dp<-extract(ws50)
head(ws50_dp)
# }
Run the code above in your browser using DataLab