Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: times
See also: quantile

Quantlet: quantilelines
Description: compute quantiles of trajectories.

Reference(s):

Usage: y = quantilelines(data,step,perc)
Input:
data n x m x 2 array, data, where n is the length of trajectories and m the number of trajectories
step scalar, time interval between points at which the quantiles are computed
perc s x 1 vector, orders of quantiles
Output:
y p x q matrix, where first column contains time and the remaining quantiles

Example:
library("xplore")
library("times")
library("plot")
randomize(101)
randomize2(101)
y=simHPP(2,20,100)
q=quantilelines(y,1,#(0.1,0.5,0.9))
d1 = createdisplay(1,1)
adddata(d1, 1, 1,setmask(q[,1]~q[,2],"line","thin","black", "style",1))
adddata(d1, 1, 1,setmask(q[,1]~q[,3],"line","thin","black", "style",1))
adddata(d1, 1, 1,setmask(q[,1]~q[,4],"line","thin","black", "style",1))
adddata(d1, 1, 1,setmask(reduce(y[,1,]),"line","thin","red", "style",1))

Result:
Show three quantile lines (black) and a sample trajectory (red).



Author: A. Misiorek 20041215 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006