plot.PA: Plot method for PA objects.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/plot.PA.R

Description

plot method for objects of class PA. Plots the scree plot for a "PA" object for the selected percentiles using ggplot.

Usage

1
2
3
4
## S3 method for class 'PA'
plot(x, percentiles = NULL, main = NULL, xlab = NULL, ylab = NULL,
      groupLabel = NULL, colour = TRUE, linetype = TRUE, observed = "Observed",
      percentile = "th percentile", position = "after", sep = "", ...)

Arguments

x

an object of class "PA".

percentiles

The percentiles that ought to be plotted. Defaults to those in the PA object.

main

Graph title instead of default.

xlab

Label for x axis instead of default.

ylab

Label for y axis instead of default.

groupLabel

Legend box name instead of default.

colour

Logical indicating whether to identify the observed eigenvalues and percentiles by colour.

linetype

Logical indicating whether to identify the observed eigenvalues and percentiles by linetype.

observed

Label for the observed data, default is "observed"

percentile

Graph title instead of default.

position

Position for the percentile label. "after" will position the label after the percentile number. "before" will position the label before the percentile number

sep

Character string to separate the label from the percentiles number.

...

Not used.

Value

ggplot object for plotting the scree plot.

Author(s)

Carlos A. Arias [email protected] and Victor H. Cervantes [email protected]

See Also

PA, print.PA, Check.PA, CountEigen.PA, coef.PA, quantile.PA

Examples

1
2
3
4
5
6
7
8
# # Run Parallel Analysis for binary data conforming to the Rasch model
# # using the polychoric C++ function
data(simRaschData)
binaryRaschPA <- PA(simRaschData, percentiles = c(0.95, 0.99), nReplicates = 200,
                    type = "binary", algorithm = "polychoric")
print(binaryRaschPA)
plot(binaryRaschPA, percentiles = 0.99, groupLabel = "") # Plots the scree-plot
                                                         # with the 99th percentile

pcaPA documentation built on May 29, 2017, 6:53 p.m.