modelr: modelr Model Assembly Functions

Description Usage Arguments See Also Examples

Description

The modelr package provides a natural syntax for researchers to describe PLS structural equation models. modelr is copatible with semPLS, simplePLS and matrixPLS, meaning that once a model is specified, it can be used across models for comparison.

Usage

1
modelr(data, measurement_model, interactions=NULL, structural_model, ...)

Arguments

data

A data.frame intendend to use for the fitting method

measurement_model

A source-to-target matrix representing the outer/structural model, generated by measure.

interactions

A object of type interact as generated by the interact method. Default setting is NULL and can be excluded for models with no interactions.

structural_model

A source-to-target matrix representing the inner/structural model, generated by structure.

See Also

structure measure paths interact

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
data("mobi", package = "semPLS")

#modelr syntax for creating measurement model
mobi_mm <- measure(
             reflect("Image",        multi_items("IMAG", 1:5)),
             reflect("Expectation",  multi_items("CUEX", 1:3)),
             reflect("Quality",      multi_items("PERQ", 1:7)),
             reflect("Value",        multi_items("PERV", 1:2)),
             reflect("Satisfaction", multi_items("CUSA", 1:3)),
             reflect("Complaints",   single_item("CUSCO")),
             reflect("Loyalty",      multi_items("CUSL", 1:3))
           )
#modelr syntax for creating structural model
mobi_sm <- structure(
  paths(from = "Image",        to = c("Expectation", "Satisfaction", "Loyalty")),
  paths(from = "Expectation",  to = c("Quality", "Value", "Satisfaction")),
  paths(from = "Quality",      to = c("Value", "Satisfaction")),
  paths(from = "Value",        to = c("Satisfaction")),
  paths(from = "Satisfaction", to = c("Complaints", "Loyalty")),
  paths(from = "Complaints",   to = "Loyalty")
)

mobi_pls <- modelr(data = mobi,
                   measurement_model = mobi_mm,
                   structural_model = mobi_sm)

print_paths(mobi_pls)
plot_scores(mobi_pls)

ISS-Analytics/modelr documentation built on May 7, 2019, 6:35 a.m.