Description Usage Arguments Details Value Author(s) References See Also Examples

Perform the WiSE bootstrap to estimate parameters within models of the form

*Y = γ_0 1 + γ_1 t + Wγ + e*

Automatically select a threshold level for *γ*, or the user may specify the threshold. This function also provides the WiSE bootstrap samples of the wavelet coefficients (for the selected threshold) and bootstrap samples of the linear parameters (*γ_0, γ_1*).

1 2 |

`X` |
a matrix or vector of equally-spaced data. All entries must be non-missing and numeric. If a vector is supplied, the length must be |

`R` |
number of bootstrap samples. Allowed value is a positive integer. Default is 100. |

`XParam` |
vector or matrix of linear trend parameters for the data series. If a vector is supplied in |

`TauSq` |
scale parameter for the bootstrap. Allowed values are |

`bootDistn` |
the distribution for the bootstrap. Allowed values are |

`by.row` |
logical indicator of observation location. If |

`J0` |
wavelet filter coefficient threshold. Allowed values are |

`wavFam` |
wavelet family. Allowed values are |

`wavFil` |
wavelet filter number. Allowed values are integers between 4 and 10 when |

`wavBC` |
wavelet boundary condition. Allowed values are |

The assumed model is

*Y = γ_0 1 + γ_1 t + Wγ + e*

where *Y* is the data vector, linear parameters in time (*t*) are *γ_0* and *γ_1*, *γ* are the wavelet coefficients (scaling and filter), and W is the DWT for a fixed wavelet basis. Note, in many cases of the DWT, the scaling coefficient is equivalent to *γ_0*, and thus, estimated there.

This model requires estimation of linear terms *γ_0* and *γ_1*. It is recommended, if the data is padded to a length *T=2^J* using `padVector`

or `padMatrix`

, to supply the `linearParam`

estimates and call `replaceLinearTrend=FALSE`

. If `XParam`

is `NA`

, the `WiSEBoot`

function will estimate *γ_0* and *γ_1* from the supplied data using least squares.

`J0`

sets the threshold within the wavelet coefficients. Our threshold is defined as the level above which all fine wavelet coefficients are set to 0.

For a single data series, *Y*, the WiSE bootstrap sample is obtained by

1. Find estimates of *γ_0* and *γ_1*: *g0* and *g1*. If supplied, this is `linearParam`

.

2. Estimate all levels of wavelet coefficients, *γ*, using the residuals *r = Y - g0 1 - g1 t*. Call these estimated coefficients *g*.

3. For a set threshold, *J0=j*, set all coefficients in *g* finer than *j* to 0. Call this thresholded set of coefficients *g_j* Perform the inverse wavelet transform with *g_j*. This smooth series may be called *rSmooth*.

4. Calculate the wavelet residuals using *rWave = r - rSmooth*.

5. A single bootstrap sample is defined as *Y^* = g0 1 + g1 t + W g_j + τ N(0,1) rWave*. *Y^** is used to obtain estimates for the un-thresholded wavelet coefficients and linear parameters.

`MSECriteria ` |
matrix with 2 columns. The first column contains integer values corresponding to various |

` BootIntercept ` |
matrix of |

` BootSlope ` |
matrix of |

` BootWavelet ` |
array of bootstrap estimates of the wavelet coefficients. The first dimension is |

` DataWavelet ` |
matrix of wavelet coefficients from the data. This matrix only contains the coefficients from the selected model (fine level coefficients are set to 0). The number of rows is |

` XParam ` |
matrix of linear slope and intercept in time from the data. If supplied, same as user-specified. Otherwise, estimated using least squares. |

` wavFam, wavFil, wavBC, TauSq, BootDistn, by.row ` |
Same as supplied to the function. |

Megan Heyman

The WiSE bootstrap methodology is defined in theoretical detail in Chatterjee, S. et al. "WiSE bootstrap for model selection" (in progress).

`padVector`

, `padMatrix`

, `wavethresh-package`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ```
##R=10 bootstrap samples is not recommended. For demonstration only.
##bootstrap one of the simulated series, threshold level 4 (not the truth)
data(SimulatedSNR15Series)
bootObj <- WiSEBoot(SimulatedSNR15Series[, 3], R=10, J0=4)
#boxplot of the bootstrap intercept and slope estimates (both 0 in truth)
par(mfrow=c(1,2))
boxplot(bootObj$BootIntercept); boxplot(bootObj$BootSlope)
#boxplot of the bootstrap wavelet coefficient estimates, level 1
par(mfrow=c(1,2))
boxplot(bootObj$BootWavelet[ , 3, 1]); boxplot(bootObj$BootWavelet[ , 4, 1])
##See what smooth level the bootstrap chooses (truth is J0=2)
bootObj2 <- WiSEBoot(SimulatedSNR15Series[ ,3], R=10)
bootObj2$MSECriteria
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.