(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)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.