path: Extract Path Model Equation

View source: R/path.R

pathR Documentation

Extract Path Model Equation

Description

Extract and display an equation of a pairwise path between two variables.

Usage

path(x, from, to, round = 3)

Arguments

x

object of class "netSEM", which is the return value of function netSEMp1.

from

character string. Name of the predictor.

to

character string. Name of the endogenous variable.

round

a positive integer. The coefficients are rounded to this decimal place.

Details

Extract the "best" model from principle 1 between any two variables. The model name and the model equation are printed on screen. The model coefficients, as well as the model R object are also returned.

Value

a list of the following items:

  • "model": the best fitted model.

  • "model.print": a character string of the model equation.

See Also

netSEMp1

Examples

## Load the sample acrylic data set
data(acrylic)

# Run netSEM principle one
ans <- netSEMp1(acrylic)

# Extract relations between IrradTot and IAD2
cf <- path(ans, from = "IrradTot", to = "IAD2")
print(cf)


netSEM documentation built on Nov. 2, 2022, 5:12 p.m.