Learn R Programming

FarmTest (version 1.0.3)

plot.farm.scree: Diagnostic plots from factor-finding

Description

Plot method for farm.scree objects. Plots the eigenvalue ratio plot and the scree plot.

Usage

# S3 method for farm.scree
plot(x, scree.plot = TRUE, ratio.plot = TRUE,
  col = "red", ...)

Arguments

x

A "farm.scree" object.

scree.plot

optional indicating whether to show the scree plot. Default TRUE

ratio.plot

optional indicating whether to show the scree plot. Default TRUE.

col

Controls the color of the maximim eigenvalue dot. Defaut "red".

graphical parameters to plot.

Value

Two plots: First plot is the scree plot of the data. Second plot illustrates the eigenvalue ratio test.

Details

By default, two plots are output with default options. To customize plots, plot one at a time and customize.

See Also

farm.scree and print.farm.scree

Examples

Run this code
# NOT RUN {
set.seed(100)
p = 100
n = 20
epsilon = matrix(rnorm( p*n, 0,1), nrow = n)
B = matrix(rnorm(p*3,0,1), nrow=p)
fx = matrix(rnorm(3*n, 0,1), nrow = n)
X = fx%*%t(B)+ epsilon
output = farm.scree(X, cv=FALSE)
plot(output)
plot(output, scree.plot=FALSE, col="blue", main="Customized plot")

# }

Run the code above in your browser using DataLab