Description Usage Arguments Details Value

We compute the quadratic form of a vector and a matrix in an efficient
manner. Let `x`

be a real vector of length `p`

, and let `A`

be
a p x p real matrix. Then, we compute the quadratic form *q = x' A x*.

1 | ```
quadform(A, x)
``` |

`A` |
matrix of dimension p x p |

`x` |
vector of length p |

A naive way to compute the quadratic form is to explicitly write
`t(x) %*% A %*% x`

, but for large `p`

, this operation is
inefficient. We provide a more efficient method below.

Note that we have adapted the code from: http://tolstoy.newcastle.edu.au/R/help/05/11/14989.html

scalar value

sparsediscrim documentation built on April 14, 2017, 12:25 p.m.

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

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

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

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.