Learn R Programming

semPLS (version 1.0-6)

plsmUtils: Utility methods for plsm objects.

Description

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

Usage

plsmEdit(model, ...)
## S3 method for class 'plsm':
plsmEdit(model, data, \ldots)

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

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

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

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

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

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

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

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.

Value

  • All utility methods return an object of class plsm.

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.

See Also

plsm, read.splsm

Examples

Run this code
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)

Run the code above in your browser using DataLab