Description Usage Arguments Details Author(s) Examples

View source: R/spikedCovariance.R

(Donoho, Gavish, and Johnstone, 2013)

1 2 3 |

`R` |
xts object of asset returns |

`gamma` |
ratio of varibales/observations. If NA it will be set to ratio of varibales/observations |

`numOfSpikes` |
number of spikes in the spike covariance model. If missing then it is estimated based on the number of eigenvalues above the cutoff. |

`method` |
KNTest/median-fitting. Default is KNTest |

`norm` |
Type of matrix norm that must be calculated. Defaults to Frobenius |

`pivot` |
takes values from 1...7. Details can be found in the paper |

`statistical` |
Stein/Entropy/Divergence/Affinity/Frechet. Default is set to NA. when a valid value is set norm and pivot values are ignored |

`fit` |
list with 5 elements, cutoff for the bulk of MP distribution, scaled lambdas, fitted gamma fitted scaling constant and numOfSpikes |

If the number of spikes are missing and the selected method is median-fitting then, firstly the scale factor is estimated. We guess the number of spikes by counting the number of breaks using the Freedman-Diaconis algorithm. The initial number of spikes are guessed by counting the number of elements after the first zero. We use this to lower bound the variance. Variance is computed by fitting the median to the spectrum of eigenvalues. If the method is KNTest then we follow the procedure in (Kritchman and Nadler, 2009)

Rohit Arora

1 2 3 4 5 | ```
## Not run:
data("rmtdata")
model <- estSpikedCovariance(rmtdata, numOfSpikes=15)
## End(Not run)
``` |

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.