Function to perform the simple path analysis and the path analysis under collinearity (sometimes called ridge path analysis). It computes the direct (diagonal) and indirect (off-diagonal) effects of each explanatory variable over a response one.

pathanalysis(corMatrix, resp.col, collinearity = FALSE)

Arguments

corMatrix

a correlation matrix.

resp.col

an integer value indicating the column in corMatrix that corresponds to the response variable.

collinearity

logical; if TRUE, an external interactive display is used to pass a value, say k, at which to evaluate the system: (X'X + Ik)B = X'Y, being X'X the correlation matrix between explanatory variables, X'Y the correlation vector between all explanatory variables and the response variable, B is the vector of path coefficients and k is a value between 0 and 1; default is FALSE, i.e., k = 0.

Value

A list of

coef

a matrix containing the direct (diagonal) and indirect (off-diagonal) effects of each variable.

Rsq

the coefficient of determination.

ResidualEffect

the residual effect.

VIF

a vector containing the variance inflation factors.

CN

the condition number.

Side Effects

If collinearity = TRUE, an interactive graphic is displayed for dealing with collinearity.

References

Carvalho, S.P. (1995) Metodos alternativos de estimacao de coeficientes de trilha e indices de selecao, sob multicolinearidade. Ph.D. Thesis, Federal University of Vicosa (UFV), Vicosa, MG, Brazil.

Author

Anderson Rodrigo da Silva <anderson.agro@hotmail.com>

Examples

data(peppercorr) pathanalysis(peppercorr, 6, collinearity = FALSE)
#> #> Path Analysis #> #> Direct (diagonal) and indirect (off-diagonal) effects #> PL FL LFD PT AFW #> PL -0.19371075 -0.1005548834 -0.860770578 -0.23486827 0.9336045 #> FL -0.03337636 -0.5836035019 -0.001801935 -0.05495057 0.1931324 #> LFD -0.12029438 -0.0007586846 -1.386103991 -0.45675557 1.2204126 #> PT -0.06764379 -0.0476804061 -0.941303220 -0.67258956 1.0203170 #> AFW -0.13765086 -0.0857897148 -1.287551997 -0.52233305 1.3138256 #> --- #> R-squared: 0.9309396 #> Residual effect: 0.2627935 #> k-value (for collinearity): 0 #> #> Collinearity diagnostics #> #> VIF: 2.749908 1.204415 9.470118 3.519099 19.11027 #> Condition number: 88.85724 #> Determinant of X'X: 0.01590252
# End (not run)