Learn R Programming

fda.usc (version 1.0.0)

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.RT(fdataobj,...)
func.trim.RPD(fdataobj,...)
func.med.FM(fdataobj,...)
func.med.mode(fdataobj,...)
func.med.RP(fdataobj,...)
func.med.RT(fdataobj,...)
func.med.RPD(fdataobj,...)
func.trimvar.FM(fdataobj,...)
func.trimvar.mode(fdataobj,...)
func.trimvar.RP(fdataobj,...)
func.trimvar.RT(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.RT Returns the average from the (1-trim)% deepest curves following RT 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.RP Returns the marginal variance from the deepest curves followinng RT criteria. func.trimvar.RPD Returns the marginal variance from the deepest curves followinng RPD criteria. }

References

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/

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)) # Time-consuming
a6<-func.med.FM(fdataobj)
a7<-func.med.mode(fdataobj)
a8<-func.med.RP(fdataobj)
# a9<-func.med.RPD(fdataobj,deriv=c(0,1)) # Time-consuming
# a10<-func.med.RT(fdataobj)

dev.new()
par(mfrow=c(1,2))
plot(c(a1,a2,a3,a4),ylim=c(-26,29),main="Central tendency: trimmed mean")
plot(c(a1,a6,a7,a8),ylim=c(-26,29),main="Central tendency: median")

## Not run
## 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))
# b10<-func.trimvar.RT(fdataobj)
# dev.new()
# par(mfrow=c(1,2))
# plot(c(b1,b2,b3,b4,b5),ylim=c(0,79),main="Measures of dispersion I")
# plot(c(b1,b6,b7,b8,b9,10),ylim=c(0,79),main="Measures of dispersion II")

Run the code above in your browser using DataLab