08.04.2015 Views

The sfsmisc Package - NexTag Supports Open Source Initiatives

The sfsmisc Package - NexTag Supports Open Source Initiatives

The sfsmisc Package - NexTag Supports Open Source Initiatives

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

46 nearcor<br />

Details<br />

Value<br />

This implements the algorithm of Higham (2002), then forces symmetry, then forces positive definiteness<br />

using code from posdefify. This implementation does not make use of direct LAPACK<br />

access for tuning purposes as in the MATLAB code of Lucas (2001). <strong>The</strong> algorithm of Knol DL<br />

and ten Berge (1989) (not implemented here) is more general in (1) that it allows contraints to fix<br />

some rows (and columns) of the matrix and (2) to force the smallest eigenvalue to have a certain<br />

value.<br />

A list, with components<br />

cor<br />

fnorm<br />

iterations<br />

converged<br />

resulting correlation matrix<br />

Froebenius norm of difference of input and output<br />

number of iterations used<br />

logical<br />

Author(s)<br />

Jens Oehlschlägel<br />

References<br />

See Also<br />

See those in posdefify.<br />

the slightly more flexible nearPD which also returns a classed matrix (class dpoMatrix); hetcor,<br />

eigen; posdefify for a simpler algorithm.<br />

Examples<br />

cat("pr is the example matrix used in Knol DL, ten Berge (1989)\n")<br />

pr

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!