Learn R Programming

fda.usc (version 0.9.4)

Descriptive: Descriptive measures for functional data.

Description

Central and dispersion measures for functional data.

Usage

func.mean(fdataobj)
func.var(fdataobj)
func.trim.FM(fdataobj,...)
func.trim.mode(fdataobj,...)
func.trim.RP(fdataobj,...)
func.trim.RPD(fdataobj,...)
func.med.FM(fdataobj,...)
func.med.mode(fdataobj,...)
func.med.RP(fdataobj,...)
func.med.RPD(fdataobj,...)
func.trimvar.FM(fdataobj,...)
func.trimvar.mode(fdataobj,...)
func.trimvar.RP(fdataobj,...)
func.trimvar.RPD(fdataobj,...)

Arguments

fdataobj
fdata class object.
...
Further arguments passed to or from other methods. If the argument p is passed, it used metric.lp function, by default p=2. If the argument trim (alpha of the trimmi

Value

  • ll{ func.mean gives mean curve. func.var gives variance curve. func.trim.FM Returns the average from the (1-trim)% deepest curves following FM criteria. func.trim.mode Returns the average from the (1-trim)% deepest curves following mode criteria. func.trim.RP Returns the average from the (1-trim)% deepest curves following RP criteria. func.trim.RPD Returns the average from the (1-trim)% deepest curves following RPD criteria. func.med.FM Returns the deepest curve following FM criteria. func.med.mode Returns the deepest curve following mode criteria. func.med.RP Returns the deepest curve following RP criteria. func.med.RPD Returns the deepest curve following RPD criteria. func.trimvar.FM Returns the marginal variance from the deepest curves followinng FM criteria. func.trimvar.mode Returns the marginal variance from the deepest curves followinng mode criteria. func.trimvar.RP Returns the marginal variance from the deepest curves followinng RP criteria. func.trimvar.RPD Returns the marginal variance from the deepest curves followinng RPD criteria. }

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. Cuevas, A., Febrero-Bande, M. and Fraiman, R. (2006). On the use of the bootstrap for estimating functions with functional data. Computational Statistics and Data Analysis 51, n 2, 1063{-}107. Fraiman R, Muniz G. 2001. Trimmed means for functional data. Test 10: 419{-}440.

Examples

Run this code
#Example with Montreal Daily Temperature (fda-package)
fdataobj<-fdata(MontrealTemp)
# Measures of central tendency
a1<-func.mean(fdataobj)
a2<-func.trim.FM(fdataobj)
a3<-func.trim.mode(fdataobj)
a4<-func.trim.RP(fdataobj)
a5<-func.trim.RPD(fdataobj,deriv=c(0,1))
a6<-func.med.FM(fdataobj)
a7<-func.med.mode(fdataobj)
a8<-func.med.RP(fdataobj)
a9<-func.med.RPD(fdataobj,deriv=c(0,1))

# Measures of dispersion
b1<-func.var(fdataobj)
b2<-func.trimvar.FM(fdataobj)
b3<-func.trimvar.FM(fdataobj,trim=0.1)
b4<-func.trimvar.mode(fdataobj)
b5<-func.trimvar.mode(fdataobj,p=1)
b6<-func.trimvar.RP(fdataobj)
b7<-func.trimvar.RPD(fdataobj)
b8<-func.trimvar.RPD(fdataobj)
b9<-func.trimvar.RPD(fdataobj,deriv=c(0,1))

dev.new()
par(mfrow=c(2,2))
plot(c(a1,a2,a3,a4,a5),ylim=c(-26,29),main="Central tendency: trimmed mean")
plot(c(a1,a6,a7,a8,a9),ylim=c(-26,29),main="Central tendency: median")
plot(c(b1,b2,b3,b4,b5),ylim=c(0,79),main="Measures of dispersion I")
plot(c(b1,b6,b7,b8,b9),ylim=c(0,79),main="Measures of dispersion II")

Run the code above in your browser using DataLab