plsm: Specification of Path Model

Description Usage Arguments Value See Also Examples

View source: R/plsm.R

Description

Creates the specification of a path model used by sempls. The structural and the measurement must be specified in .csv files. The paths must be entered in the form of a from-to matrix. The variable in the first column represents the source and the second column represents the target of each path.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
plsm(data, strucmod, measuremod, order=c("generic",
     "alphabetical"), interactive=FALSE)

mvplot(model, ...)
## S3 method for class 'plsm'
mvplot(model, data, LVs, ask=TRUE, ...)

mvpairs(model, ...)
## S3 method for class 'plsm'
mvpairs(model, data, LVs, ask=TRUE, ...)

Arguments

data

A data.frame intendend to use for the fitting method, sempls.

strucmod

Either a from-to-matrix representing the inner/structural model or the path to an .csv file representing the inner/structural model.

measuremod

Either from-to-matrix representing the outer/measurement models or the path to an .csv file representing the outer/measurement models.

order

A character describing how to order the latent variables (LVs). If

  • "generic" the LVs will be ordered according to their appearance in the causal chain of the structural model (default).

  • "alphabetical" the LVs will be ordered alphabetically.

interactive

Logical indicating whether to specify the model interactively using edit. The default is FALSE

model

An object of class plsm.

LVs

A character vector naming the blocks of LVs for which to create the plots.

ask

See ?par

...

Arguments to pass down to other methods, e.g., par.

Value

The object returned is of class plsm with the elements:

latent

A character vector naming the latent variables.

manifest

A character vector naming the manifest variables.

strucmod

Contains only the subset of path representing the structural model.

measuremod

Contains only the subset of path representing the measurement model.

D

The adjacency matrix \bm{D} for the structural model.

M

The adjacency matrix \bm{M} for the measurement model.

blocks

A list naming the MVs belonging to each LV's block and telling their measurement mode.

order

See armguments section.

See Also

sempls, read.splsm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# getting the path to the .csv file representing the inner Model
ptf_Struc <- system.file("ECSIstrucmod.csv", package="semPLS")

# getting the path to the .csv file representing the outer Models
ptf_Meas <- system.file("ECSImeasuremod.csv", package="semPLS")


sm <- as.matrix(read.csv(ptf_Struc))
mm <- as.matrix(read.csv(ptf_Meas))
data(mobi)

ECSI <- plsm(data=mobi, strucmod=sm, measuremod=mm)

# Adjacency matrix of the structural model
ECSI$D

# Adjacency matrix of the measurement model
ECSI$M

# return all elements
ECSI

### Interactive mode
## Not run: 
# specify model in a spreadsheets
ECSI <- plsm(data=mobi, interactive=TRUE)
ECSI

## End(Not run)

### explore blocks of MVs
mvplot(model=ECSI, data=mobi, LVs="Expectation")
mvpairs(model=ECSI, data=mobi, LVs="Expectation")

semPLS documentation built on May 2, 2019, 9:34 a.m.