Learn R Programming

fda.usc (version 1.0.0)

Depth: Provides the depth measure for functional data

Description

Compute measure of centrality of the functional data. Type of depth function: Fraiman and Muniz (FM) depth, modal depth, random project depth and double random project depth.

Arguments

fdataobj
fdata class object.

Details

The Fraiman and Muniz (FM) depth depth.FM function is based on integrated an univariate depth measure along the axis x. The modal depth depth.mode function calculates the depth of a datum accounting the number of curves in the neighbourhood. The depth.RP function calculates depth using univariate depth tools through random projection method (RP). The depth.RPD function also involves the derivatives of each curve.

References

Cuevas, A., Febrero-Bande, M. and Fraiman, R. (2007). Robust estimation and classification for functional data via projection-based depth notions. Computational Statistics 22, 3, 481{-}496. Febrero-Bande, M., Galeano, P., and Gonzalez-Manteiga, W. (2008). Outlier detection in functional data by depth measures with application to identify abnormal NOx levels. Environmetrics 19, 4, 331{-}345. Fraiman R, Muniz G. 2001. Trimmed means for functional data. Test 10: 419{-}440. Cuesta Albertos, J. A. and Nieto Reyes, A. The Random Tukey Depth. Computational Statistics and Data Analysis (2008), Vol. 52, Issue 11, 4979{-}4988. Febrero-Bande, M., Oviedo de la Fuente, M. (2012). Statistical Computing in Functional Data Analysis: The R Package fda.usc. Journal of Statistical Software, 51(4), 1-28. http://www.jstatsoft.org/v51/i04/

See Also

See Also as depth.FM, depth.RP, depth.RPD and depth.mode.

Examples

Run this code
#Ex: CanadianWeather data
tt=1:365
fdataobj<-fdata(t(CanadianWeather$dailyAv[,,1]),tt)
# Fraiman-Muniz Depth
out.FM=depth.FM(fdataobj,trim=0.1,draw=TRUE)
#Modal Depth
out.mode=depth.mode(fdataobj,trim=0.1,draw=TRUE)
out.RP=depth.RP(fdataobj,trim=0.1,draw=TRUE)
out.RT=depth.RP(fdataobj,trim=0.1,draw=TRUE)
## NOT RUN
## Double Random Projections
# out.RPD=depth.RPD(fdataobj,deriv=c(0,1),dfunc2=depth.FM,trim=0.1,draw=TRUE)
# out<-c(out.FM$mtrim,out.mode$mtrim,out.RP$mtrim,out.RPD$mtrim)
# plot(out)

Run the code above in your browser using DataLab