Thanks Duncan,
I really know nothing about Latex - however the macro you detailed
below does not exist in the file: /usr/lib/R/share/texmf/Rd.sty
The header of that file reads:
%%% Rd.sty ... Style for printing the R manual
%%%
%%% Modified 1998/01/05 by [EMAIL PROTECTED]
%%% Modified 1998/07/07
Is there a simple way to decompose the upper triangle
of a correlation matrix to a linear list;
For example:
X Y Z
X 1 2 3
Y 2 1 4
Z 3 4 1
so you get a list like:
xy 2
XZ 3
YZ 4
I suspect you can do it with a matrix transformation, but
that beyond me at present.
Many thanks
Mark
Thanks for the answers the appear to be just
right.
i.e.
corrmat[upper.tri(corrmat)]
or
x[col(x)row(x)]
The slight problem is I lose all the column
row labels from the correlation matrix, so I
am not sure of the order of the values (i.e.
which combination of markers the value
Thanks guys for the help, here's the final (grizzly?)
solution:
#generate a correlation matrix
cm-cor(someDataFrame, y = NULL ...)
# get the list of labels (included in the dataframe)
labels-labels(cm)[[1]]
# retrieve the uppper portion of the correlation matrix (as logical values)
idx -
Thanks John for the post - I had found factanal
However factanal it seems you have specify the number of factors to be
fitted
up front, whereas with the SAS procedure you don't - this is apparently
important
to the analysis!
Perhaps I could emulate this function by breaking it down using factor