Description Usage Arguments Value Examples

Selects bandwidth for Cholesky factorization by k-fold cross validation

1 | ```
banded.chol.cv(X, bandwidth, folds = 3, est.eval = TRUE, Frob = TRUE)
``` |

`X` |
A data matrix with |

`bandwidth` |
A vector of candidate bandwidths. Candidate bandwidths can only positive integers such that the maximum is less than the sample size outside of the |

`folds` |
The number of folds used for cross validation. Default is |

`est.eval` |
Logical: |

`Frob` |
Logical: |

a list with

`bandwidth.min` |
The bandwidth minimizing cross-validation error. |

`est` |
The estimated covariance matrix computed with |

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ```
## set sample size and dimension
n=20
p=100
## create covariance with AR1 structure
Sigma = matrix(0, nrow=p, ncol=p)
for(l in 1:p){
for(m in 1:p){
Sigma[l,m] = .5^(abs(l-m))
}
}
## simulation Normal data
eo1 = eigen(Sigma)
Sigma.sqrt = eo1$vec%*%diag(eo1$val^.5)%*%t(eo1$vec)
X = t(Sigma.sqrt%*%matrix(rnorm(n*p), nrow=p, ncol=n))
## perform cross validation
k = 4:7
out1.cv = banded.chol.cv(X, bandwidth=k, folds = 5)
``` |

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.