Description Usage Arguments Details Value Author(s) See Also Examples
Wrapper - calls function that creates class rankLocReg
.
1 | rankLocReg(xall, yall, alpha, method = c("z", "eq", "pc"), verbose = TRUE)
|
xall |
A numeric vector. |
yall |
A numeric vector. |
alpha |
Minimum window size, expressed as a proportion of total data. Must be higher than 0 and less-than or equal to 1. |
method |
Ranking method. See details. |
verbose |
Logical. Should progress be printed? |
rankLocReg
is the main function around which LoLinR is built. Given independent and dependent variables
for a time series or trace data set, rankLocReg
tries to find the 'most linear' ordered subset of the full data set.
This is accomplished by fitting all possible local linear regressions with minimum window size alpha
, and ranking them
according to the combined linearity metric $L$. $L$ quantifies linearity from 1) the skewness of the standardized residuals,
2) the range of the 95
residuals (a modified Breusch-Godfrey $R^2$). These three components of $L$ can be weighted in 3 different ways: unweighted (method="z"
),
equal weights (method="eq"
), and percentile ranks (method="pc"
). If method is unspecified, default to z
.
For highly skewed, or otherwise ill-behaved data we strongly advise examining the relative behaviour of the different weighting
methods using plot.rankLocReg
.
For data sets with greater tha ~500 observations, we suggest thinning the number of observations using thinData
,
given that this does not compromise the resolution of the data for the question of interest.
A data frame with important output from all local regressions, ranked by metric L
following raking method chosen by argument method
.
Colin Olito and Diego Barneche.
locReg
, thinData
, plot.rankLocReg
.
1 2 3 4 | # load sea urchin respirometry data
data(UrchinData)
# rank L metric by method 'eq'
allRegs <- rankLocReg(xall=UrchinData$time, yall=UrchinData$D, alpha=0.3, method="eq", verbose=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.