Learn R Programming

pvar (version 1.0.6)

FindAnalysingPoints: Finds the points that should by analysed.

Description

Finds the points that should by analysed as potentially meaningful partition points. This is an internal function and it has no practical use for users.

Usage

FindAnalysingPoints(x)
FindAnalysingPointsOP(x)

Arguments

x
a numeric vector.

Value

  • The index of points from x that should by analysed as potentially meaningful partition points.

Details

This function is applicable only for special form of sample. The requirements for the subset: 1. it should be quasi-monotonic. i.e. min and max should be in the end points. 2. removed all monotonic points.

See Also

pvar, ChangePointsId, SplitByExtremum, pvarMon.

Examples

Run this code
xx = c(0.9552822,  0.8317665,  0.9347037,  0.3861130,  0.6546701,  0.4000638,
	0.6767309,  0.1090384,  0.4675789,  0.3223871,  0.4312971,  0.3514759,
	0.4097339,  0.2601273,  0.4978533,  0.3255348,  0.7301583,  0.5317979,
	0.6366720,  0.5096362,  0.8123783, -0.4,-0.3, -0.8443095)

### the analysing points are below all points.	
plot(xx, type="l")
AP = FindAnalysingPoints(xx)	
points(seq_along(xx)[AP], xx[AP], pch=19, col=2)
lines(seq_along(xx)[AP], xx[AP], col=2)	

### the analysing points are above all points.
plot(xx, type="l", lwd=2)
APOP = FindAnalysingPointsOP(xx)		
points(seq_along(xx)[APOP], xx[APOP], pch=19, col=3)	
lines(seq_along(xx)[APOP], xx[APOP], col=3)

Run the code above in your browser using DataLab