Learn R Programming

regsubseq (version 0.12)

most.linear.sub: Find the Most Lineaer Subsequence

Description

Find the most linear length k+1 subsequence of the input sequence. The subsequence found by this function has the same end points as the original sequence. This function is not intended to be used by an end user directly. Users should use test.lin.t, test.lin.p or test.lin instead.

Usage

most.linear.sub(x, k, t);

Arguments

x
The input sequence, a vector of numbers.
k
The length of the subsequences for which we want to test linearity.
t
A threshold value. A subsequence will only be examined when its linearity test statistic can be bigger than this t.

Value

improved
TRUE if we found a subsequence with a linearity test statistic more extreme than the input t.
t
The linearity test statistic corresponding to the most linear subsequence.
sub
The most linear subsequence.
sigma
The indices corresponding to the most linear subsequence.

References

Di and Perlman (2007)

See Also

test.lin, test.lin.t, test.lin.p.