combine.mimf: Adds IMFs

Description Usage Arguments Details Value Examples

View source: R/mimf_description.R

Description

Sums one or several IMFs and returns a mimf object. Useful for when several IMFs have similar frequencies.

Usage

1
combine.mimf(object, select, new.names = NULL)

Arguments

object

mimf object or array.

select

List of vector giving the IMFs to be summed. Each vector gives the IMFs to be summed into a single IMF. Elements of select should not overlap.

new.names

Character vector giving names ti the new IMFS. If NULL default names are generated.

Details

When noise variables are added to the signal to perform the NA-MEMD, it often results in a too large number of IMFs with very similar oscillation periods. combine.mimf allows gathering htese IMFs into a single one. The IMFs to comnine should be carefully selected by checking their mean period and examining the plot.

Value

Returns a mimf object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
   library(dlnm)
   
   # Decompose both temperature and relative humidity with NA-MEMD
   # Adding two noise variables 
   X <- chicagoNMMAPS[,c("temp", "rhum")]
   set.seed(123)
   mimfs <- memd(X, l = 2) # Takes a couple of minutes

   # Plot resulting IMFs
   plot(mimfs)

   # Sum MIMFs with similar frequencies
   cmimfs <- combine.mimf(mimfs, list(10:11, 12:13), 
     new.names = c("C10", "C11"))
   plot(cmimfs)

PierreMasselot/Library--emdr documentation built on June 19, 2021, 8:58 a.m.