| vif | R Documentation |
Calculate and plot the Factor Model Variance Inflaction Factor Values for a fitted model.
A VIF for a single explanatory variable (style factor) is obtained using the time series of R-squared values obtained from
the regression of that variable against all other explanatory variables.
So, at least 2 explanatory variables are required in exposure.vars of fitted model to find the VIF.
vif(
ffmObj,
digits = 2,
isPrint = T,
isPlot = T,
lwd = 2,
stripText.cex = 1,
axis.cex = 1,
title = TRUE,
...
)
ffmObj |
an object of class |
digits |
an integer indicating the number of decimal places to be used for rounding. Default is 2. |
isPrint |
logical. if |
isPlot |
logical. if |
lwd |
line width relative to the default. Default is 2. |
stripText.cex |
a number indicating the amount by which strip text in the plot(s) should be scaled relative to the default. 1=default, 1.5 is 50% larger, 0.5 is 50% smaller, etc. |
axis.cex |
a number indicating the amount by which axis in the plot(s) should be scaled relative to the default. 1=default, 1.5 is 50% larger, 0.5 is 50% smaller, etc. |
title |
logical. This argument is mainly used for the documentation purpose when you need a plot without any title.
If |
... |
potentially further arguments passed. |
ffmRsq returns the sample mean values and plots the time series of corresponding R squared values
and the Variance Inflation factors depending on the values of rsq, rsqAdj and VIF.
The time series of the output values are also printed if isPrint is TRUE
Avinash Acharya
#Load the data
data("factorDataSetDjia5Yrs")
#Fit a Ffm
require(FactorAnalytics)
fit <- fitFfm(data=factorDataSetDjia5Yrs, asset.var="TICKER", ret.var="RETURN",
date.var="DATE", exposure.vars=c("SECTOR", "P2B", "EV2S", "MKTCAP"))
#Plot and print the time series of VIF values
vif(fit,isPrint=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.