plsmUtils: Utility methods for 'plsm' objects.

Description Usage Arguments Details Value See Also Examples

Description

By means of the utility methods pls model descrpitions inheriting from class plsm can easily be altered or investigated.

Usage

 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
34
35
36
37
38
39
40
41
plsmEdit(model, ...)
## S3 method for class 'plsm'
plsmEdit(model, data, ...)

addLV(model, ...)
## S3 method for class 'plsm'
addLV(model, data, LV, mode, MVs, pred, succ, ...)

invertLVs(model, ...)
## S3 method for class 'plsm'
invertLVs(model, LVs, ...)

removeLVs(model, ...)
## S3 method for class 'plsm'
removeLVs(model, which, ...)

addMVs(model, ...)
## S3 method for class 'plsm'
addMVs(model, data, LV, MVs, ...)

removeMVs(model, ...)
## S3 method for class 'plsm'
removeMVs(model, MVs, ...)

addPath(model, ...)
## S3 method for class 'plsm'
addPath(model, from, to, ...)

removePath(model, ...)
## S3 method for class 'plsm'
removePath(model, from, to, ...)

exogenous(model)
endogenous(model)
reflective(model)
formative(model)
indicators(model, LV)
predecessors(model)
successors(model)
connected(model)
acyclic(model)

Arguments

model

An object inheriting from class plsm as returned from plsm or read.splsm.

data

A data.frame containing the observed variables (MVs). The storage mode for all the MVs included in the model must be numeric.

LV

A character value naming an LV to add or the LV to associate with newly created MVs.

mode

A character value, specifying the measurement mode of the LV to add:

  • "A" for a reflective LV,

  • "B" for a formative LV.

MVs

A character vector naming MVs, which are either to be added, deleted or associated with a newly created LV. Note: the names of the MVs must exist as numeric variables in data.

pred

A character vector naming the predecessors of an LV. If pred is NULL the LV is exogenous.

succ

A character vector naming the successors of an LV.

LVs

A character vector naming LVs to invert. Invert means to invert the direction of pathes of associated measurement models. This means changing reflective measurement to formative and vice versa.

which

A character vector naming LVs to delete.

from

A character vector naming predecessors of LVs specified in to.

to

A character vector naming successors of LVs specified in from.

...

Currently unused.

Details

exogenous returns the exogenous latent variables contained in a path model.

endogenous returns the endogenous latent variables contained in a path model.

reflective returns the reflectively measured latent variables contained in a path model.

formative returns the formatively measured latent variables contained in a path model.

indicators returns the index or observed variables related to the given latent variable.

predecessors returns a list with the names of predecessors for each latent variable.

successors returns a list with the names of successors for each latent variable.

connected returns TRUE if the inner model is a connected graph.

acyclic returns TRUE if the inner model is recursive, thus represented by an acyclic graph.

Value

All utility methods return an object of class plsm.

See Also

plsm, 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
34
35
36
37
38
39
40
41
data(mobi)
data(ECSIsm)
data(ECSImm)

ECSI <- plsm(data=mobi, strucmod=ECSIsm, measuremod=ECSImm)


### Some sense free examples

# Print the block of MVs associated with "Expectation".
ECSI[["blocks"]]["Expectation"]

# Change measurement model for "Expectation" from reflective to
# formative and print its block MVs
invertLVs(model=ECSI, LVs=c("Expectation"))[["blocks"]]["Expectation"]

# Print the adjacency matrix for the inner model.
ECSI[["D"]]

# Add an additional path from "Quality" to "Loyalty" and
# print the resulting adjacency matrix.
addPath(model=ECSI, from="Quality", to="Loyalty")[["D"]]

# Remove the path previously added.
removePath(model=ECSI, from="Image", to=c("Satisfaction", "Loyalty"))[["D"]]

# Print all MVs used in the model
ECSI$manifest

# Remove some MVs and print the MVs used in the model
removeMVs(model=ECSI, MVs=c("IMAG3", "CUEX1", "PERQ7"))$manifest


### some handy functions

exogenous(ECSI)
endogenous(ECSI)
reflective(ECSI)
formative(ECSI)
indicators(ECSI, "Image")
predecessors(ECSI)

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