fa.lookup
of a set of items) , or to some specific set of criteria (e.g., best.scales
). Given a dictionary of item content, these routines will sort by factor loading or criteria correlations and display the item content.best.scales(x, criteria, cut = 0.1, n.item = 10, overlap = FALSE,
dictionary = NULL, digits = 2)
best.items(x,c1=1,cut=.3, abs=TRUE, dictionary=NULL,cor=TRUE,digits=2)
best.scales(x,criteria,cut=.1,n.item =10, overlap=FALSE,dictionary=NULL,digits=2)
lookup(x,y,c1=NULL)
fa.lookup(f,dictionary,digits=2)
item.lookup(f,m, dictionary,cut=.3, digits = 2)
best.scales
returns the correlation of the empirically constructed scale with each criteria and the items used in the scale. If a dictionary is specified, it also returns a list (value) that shows the item content. Also returns the keys list so that scales can be found using cluster.cor
or scoreItems
.
best.items
returns a sorted list of factor loadings or correlations with the labels as provided in the dictionary.lookup
is a very simple implementation of the match function.
fa.lookup
takes a factor/cluster analysis object (or just a keys like matrix), sorts it using fa.sort
and then matches by row.name to the corresponding dictionary entries.
best.items
and lookup
are simple helper functions to summarize correlation matrices or factor loading matrices. best.items
will sort the specified column (c1) of x on the basis of the (absolute) value of the column. The return as a default is just the rowname of the variable with those absolute values > cut. If there is a dictionary of item content and item names, then include the contents as a two column matrix with rownames corresponding to the item name and then as many fields as desired for item content. (See the example dictionary bfi.dictionary
).lookup
is used by best.items
and will find values in c1 of y that match those in x. It returns those rows of y of that match x.
Suppose that you have a "dictionary" of the many variables in a study but you want to consider a small subset of them in a data set x. Then, you can find the entries in the dictionary corresponding to x by lookup(rownames(x),y) If the column is not specified, then it will match by rownames(y).
fa.lookup
is used when examining the output of a factor analysis and one wants the corresponding variable names and contents. The returned object may then be printed in LaTex by using the df2latex
function with the char option set to TRUE.
Similarly, given a correlation matrix, r, of the x variables, if you want to find the items that most correlate with another item or scale, and then show the contents of that item from the dictionary, best.items(r,c1=column number or name of x, contents = y)
best.scales
will find up to n.items that have absolute correlations with a criterion greater than cut. If the overlap option is FALSE (default) the other criteria are not used.
item.lookup
combines the output from a factor analysis fa
with simple descriptive statistics (a data frame of means) with a dictionary. Items are grouped by factor loadings > cut, and then sorted by item mean. This allows a better understanding of how a scale works, in terms of the meaning of the item endorsements.
fa
, iclust
,principal
bs <- best.scales(bfi,criteria=c("gender","education","age"),dictionary=bfi.dictionary)
bs
f5 <- fa(bfi,5)
m <- colMeans(bfi,na.rm=TRUE)
item.lookup(f5,m,dictionary=bfi.dictionary)
Run the code above in your browser using DataLab