meptransf {EPT} | R Documentation |
Multiscale Ensemble Patch Transforms of a Signal
Description
This function performs multiscale ensemble patch transforms of a signal for a sequence of size parameters.
Usage
meptransf(tindex = NULL, signal, type = "rectangle", taus,
process = c("average", "average"), pquantile = c(0, 1), equantile = c(0, 1),
gamma = 1, boundary = "symmetric")
Arguments
tindex |
time index at which a signal is observed. When it is |
signal |
a set of data or a signal observed at time |
type |
patch type of |
taus |
a sequence of size parameters for ensemble patch transform. |
process |
specifies transform types for patch and ensemble processes:
|
pquantile |
quantiles for lower and upper envelopes of patch transform. When it is |
equantile |
quantiles for lower and upper envelopes of ensemble patch transform. |
gamma |
controls the amount of envelope magnitude. |
boundary |
specifies boundary condition from |
Details
This function performs multiscale ensemble patch transforms of a signal for a sequence of size parameters taus
, and
produces statistics and envelopes for ensemble patch transform.
When process[1]
is "average"
or "median"
, outputs related to envelopes are defined as NULL
.
When process[2]
is "envelope"
, outputs, pstat
and Epstat
, are defined as NULL
.
Value
tindex |
time index at which a signal is observed. |
signal |
a set of data or a signal observed at time |
pstat |
matrix of centrality of patch transform for a sequence of size parameters |
Epstat |
matrix of centrality of ensemble patch transform for a sequence of size parameters |
psd |
matrix of standard deviation of patch transform for a sequence of size parameters |
Epsd |
matrix of standard deviation of ensemble patch transform for a sequence of size parameters |
pL |
matrix of lower envelope of patch transform for a sequence of size parameters |
pU |
matrix of upper envelope of patch transform for a sequence of size parameters |
pM |
matrix of mean envelope, |
pR |
matrix of distance between lower and upper envelopes, |
EpL |
matrix of lower envelope of ensemble patch transform for a sequence of size parameters |
EpU |
matrix of upper envelope of ensemble patch transform for a sequence of size parameters |
EpM |
matrix of mean envelope, |
EpR |
matrix of distance between lower and upper envelopes, |
rho |
vector of correlations between |
parameters |
a list of input parameters of |
nlevel |
the number of size parameters |
See Also
Examples
#### example : composite of two components having different frequencies
ndata <- 1000
tindex <- seq(0, 1, length=ndata)
comp1 <- cos(45*pi*tindex)
comp2 <- cos(6*pi*tindex)
f <- comp1 + comp2
op <- par(mfcol=c(3,1), mar=c(2,2,2,1))
plot(tindex, f, main="a signal", xlab="", ylab="", type='l')
abline(h=0, lty=3)
plot(tindex, comp1, main="high-frequency component", xlab="", ylab="", type='l')
abline(h=0, lty=3)
plot(tindex, comp2, main="low-frequency component", xlab="", ylab="", type='l')
abline(h=0, lty=3)
#### Multiscale Ensemble Patch Transform according to tau's
taus1 <- seq(20, 60, by=2)
outmulti <- meptransf(signal=f, taus=taus1, process=c("envelope", "average"),
pquantile=c(0, 1))
#### To continue, click the plot in case of "locator(1)".
par(mfrow=c(2,2), mar=c(2,2,2,1))
for (i in 1:length(taus1)) {
plot(f - outmulti$EpM[,i], type='l', main="", xlab="", ylab=""); abline(h=0, lty=3)
title(paste0("Remaining component for tau=", taus1[i]))
lines(comp1, col="red", lty=2, lwd=0.5)
plot(outmulti$EpM[,i], type="l", main=, xlab="", ylab=""); abline(h=0, lty=3)
title(paste0("Mean envelope of ensemble patch transform for tau=", taus1[i]))
lines(comp2, col="red", lty=2, lwd=0.5); locator(1)
}
par(op)