Description Usage Arguments Author(s) Examples
Generic function of plot method for fitStatisticFactorModel. Either plot all assets or choose a single asset to plot.
1 2 3 4 5 6 7 8 | ## S3 method for class 'StatFactorModel'
plot(x, variables,
cumulative = TRUE, style = "bar",
which.plot = c("none", "1L", "2L", "3L", "4L", "5L", "6L", "7L", "8L"),
hgrid = FALSE, vgrid = FALSE, plot.single = FALSE,
asset.name,
which.plot.single = c("none", "1L", "2L", "3L", "4L", "5L", "6L", "7L", "8L", "9L", "10L", "11L", "12L", "13L"),
max.show = 6, VaR.method = "historical", ...)
|
x |
fit object created by
|
variables |
Optional. An integer vector shows which variables are to be plotted. The default is to plot all the variables, or the number of variables explaining 90 percent of the variance, whatever is bigger. |
cumulative |
Logical flag: if |
style |
Charater. bar or lines can be chosen. |
which.plot |
integer indicating which plot to
create: "none" will create a menu to choose. Defualt is
none. |
hgrid |
Logic flag. Whether to plot horizontal grid
or not. Defualt is |
vgrid |
Logic flag. Whether to plot vertical grid or
not. Defualt is |
plot.single |
Plot a single asset of lm class.
Defualt is |
asset.name |
Name of the asset to be plotted. |
which.plot.single |
integer indicating which plot to
create: "none" will create a menu to choose. Defualt is
none. |
max.show |
Maximum assets to plot. Default is 6. |
VaR.method |
Character, method for computing VaR.
Valid choices are either
"modified","gaussian","historical", "kernel". computation
is done with the |
... |
Other variables for barplot method. |
Eric Zivot and Yi-An Chen.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
# load data for fitStatisticalFactorModel.r
# data from finmetric berndt.dat and folio.dat
data(stat.fm.data)
# pca
sfm.pca.fit <- fitStatisticalFactorModel(sfm.dat,k=10)
args(plot.StatFactorModel)
# plot all
plot(sfm.pca.fit)
# plot single asset
plot(sfm.pca.fit,plot.single=TRUE,asset.name="CITCRP")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.