Learn R Programming

biotools (version 1.2)

pathanalysis: Path Analysis, Simple and Under Collinearity

Description

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.

Usage

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,

Value

  • A list of
  • coefa matrix containing the direct (diagonal) and indirect (off-diagonal) effects of each variable.
  • Rsqthe coefficient of determination.
  • ResidualEffectthe residual effect.
  • VIFa vector containing the variance inflation factors.
  • CNthe 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.

Examples

Run this code
data(peppercorr)
pathanalysis(peppercorr, 6, collinearity = TRUE)

# End (not run)

Run the code above in your browser using DataLab