R Biplot Psych

R Biplot Psych 3,5/5 8650 votes
Draw biplots of factor or component scores by factor or component loadings

Since biplot.psych is looking for two elements of the x object: x$loadings and x$scores, you can create the appropriate object to plot. See the third example. Chapter 2 Data Visualisation 1. In this session we’ll look at data visualisation using the ggplot2 package (Wickham 2009) from the tidyverse (Wickham 2017).As with most R stats courses, we’re focusing on data visualisation early on as this allows you to get a good grasp of your data and any general patterns within those data prior running any inferential tests. A general purpose toolbox for personality, psychometric theory and experimental psychology. Functions are primarily for multivariate analysis and scale construction using factor analysis, principal component analysis, cluster analysis and reliability analysis, although others provide basic descriptive statistics.

Biplot

Extends the biplot function to the output of fa, fa.poly or principal. Will plot factor scores and factor loadings in the same graph. If the number of factors > 2, then all pairs of factors are plotted. Factor score histograms are plotted on the diagonal. The input is the resulting object from fa, principal, or }code{linkfa.poly with the scores=TRUE option. Points may be colored according to other criteria.

Keywords
multivariate, hplot
Usage
Arguments

Rotations and transformations are either part of psych (Promax and cluster), of base R (varimax), or of GPArotation (simplimax, quartimax, oblimin, etc.). Of the various rotation/transformation options, varimax, Varimax, quartimax, bentlerT, geominT, and bifactor do orthogonal rotations. This is one of a set of How To'to do various things using R (R Core Team,2019), particularly using the psych (Revelle,2020) package. The current list of How To’s includes: 1.Installing R and some useful packages 2.Using R and the psych package to nd omega h and w t. 3.Using R and the psych forfactor analysisand principal components analysis.

x

The output from fa, fa.poly or principal with the scores=TRUE option

labels

if NULL, draw the points with the plot character (pch) specified. To identify the data points, specify labels= 1:n where n is the number of observations, or labels =rownames(data) where data was the data set analyzed by the factor analysis.

cex

A vector of plot sizes of the data labels and of the factor labels

main

A main title for a two factor biplot

hist.col

If plotting more than two factors, the color of the histogram of the factor scores

xlim.s

x limits of the scores. Defaults to plus/minus three sigma

ylim.s

y limits of the scores.Defaults to plus/minus three sigma

xlim.f
R Biplot Psych

x limits of the factor loadings.Defaults to plus/minus 1.0

ylim.f

y limits of the factor loadings.Defaults to plus/minus 1.0

maxpoints

When plotting 3 (or more) dimensions, at what size should we switch from plotting 'o' to plotting '.'

adjust

an adjustment factor in the histogram

col
R biplot psychiatrist

a vector of colors for the data points and for the factor loading labels

pos

If plotting labels, what position should they be in? 1=below, 2=left, 3 top, 4 right. If missing, then the assumption is that labels should be printed instead of data points.

arrow.len

the length of the arrow head

pch

The plotting character to use. pch=16 gives reasonable size dots. pch='.' gives tiny points. If adding colors, use pch between 21 and 25. (see examples).

choose

Plot just the specified factors

cuts

Do not label cases with abs(factor scores) < cuts) (Actually, the distance of the x and y scores from 0)

cutl

Do not label variables with communalities in the two space < cutl

group

A vector of a grouping variable for the scores. Show a different color and symbol for each group.

smoother

If TRUE then do a smooth scatter plot (which shows the density rather than the data points). Only useful for large data sets.

Biplot
vars

If TRUE, draw arrows for the variables, and plot the scores. If FALSE, then draw arrows for the scores and plot the variables.

more options for graphics

Details

Uses the generic biplot function to take the output of a factor analysis fa, fa.poly or principal components analysis principal and plot the factor/component scores along with the factor/component loadings.

This is an extension of the generic biplot function to allow more control over plotting points in a two space and also to plot three or more factors (two at time).

Biplot

This will work for objects produced by fa, fa.poly or principal if they applied to the original data matrix. If however, one has a correlation matrix based upon the output from tetrachoric or polychoric, and has done either fa or principal on the correlations, then obviously, we can not do a biplot. However, both of those functions produce a weights matrix, which, in combination with the original data can be used to find the scores by using factor.scores. Since biplot.psych is looking for two elements of the x object: x$loadings and x$scores, you can create the appropriate object to plot. See the third example.

R Biplot Psychiatric

See Also

fa, fa.poly, principal, fa.plot, pairs.panels

Aliases

R Biplot Psych

  • biplot.psych
Examples
Documentation reproduced from package psych, version 2.0.9, License: GPL (>= 2)

How To Read Biplot

Community examples

How To Interpret Pca Biplot

API documentation