tableF
is fast alternative to the table function for creating two way tables of numeric variables. It does not have any of the elegant checks of the table function and thus is much faster. Used in the tetrachoric
and polychoric
functions to maximize speed.
lowerCor
Finds and prints (using lowerMat
) the lower diagonal correlation matrix but returns (invisibly) the full correlation matrix found with the use and method parameters. The default values are for pairwise deletion of variables, and to print to 2 decimal places.
lowerMat
Shows the lower triangle of a matrix, rounded to digits with titles abbreviated to digits + 3
progressBar
Display a series of dots as we progress through a slow loop (removed from anything using multicores).
tableF
(for tableFast) is a cut down version of table that does no error checking, nor returns pretty output, but is significantly faster than table. It will just work on two integer vectors. This is used in polychoric an tetrachoric for about a 50% speed improvement for large problems.
shannon
finds Shannon's H index of information. Used for estimating the complexity or diversity of the distribution of responses in a vector or matrix. $$H = -\sum{p_i log(p_i) }$$
test.all
allows one to test all the examples in specified package. This allows us to make sure that those examples work when other packages (e.g., psych) are also loaded. This is used when developing revisions to the psych package to make sure the the other packages work. Some packages will not work and/or crash the system (e.g., DeducerPlugInScaling requires Java and even with Java, crashes when loaded, even if psych is not there!). Alternatively, if testing a long list of dependencies, you can skip the first part by specifying them by name.
cor2
will find and display the correlations between two sets of variables, rounded to digits, using the other options. If x is a list of multiple sets (two or more), then all sets are correlated.
levels2numeric
converts character data with levels to numeric data. Used in the SAPA analyses where we code some variables, (e.g., gender, education) with character codes to help in the documentation of files, but want to do analyses of correlations with other categorical variables.
char2numeric
converts character data with levels to numeric data. Used for cases when data from questionnaires include the response categories rathere than numeric data. Unless the levels of the data are in meaningful order, the numeric results are not useful. Most useful if doing polychoric analyses. Note this is not suitable for recoding numeric data stored as characters, for it will force them to levels first. See nchar2numeric
.
nchar2numeric
converts numbers coded as characters (quoted) to numeric without forcing them to factors first.
fromTo
selects the columns in data from to