Movatterモバイル変換


[0]ホーム

URL:


SEMinR

Soumya Ray & Nicholas Danks

Dec 31, 2020

Introduction

SEMinR brings a friendly syntax to creating and estimating structuralequation models (SEM). The syntax allows applied practitioners of SEM touse terminology that is very close to their familiar modeling terms(e.g., reflective, composite, interactions) instead of specifyingunderlying matrices and covariances. SEM models can be estimated eitherusing Partial Least Squares Path Modeling (PLS-PM) as popularized bySmartPLS, or using Covariance Based Structural Equation Modeling (CBSEM)as popularized by LISREL and AMOS. Confirmatory Factor Analysis (CFA) ofreflective measurements models is also supported. Both CBSEM and CFAestimation use the Lavaan package.

SEMinR uses its own PLS-PM estimation engine and integrates with theLavaan package for CBSEM/CFA estimation. It also brings a fewmethodological advancements not found in other packages or software, andencourages best practices wherever possible.

PLS-PM advances and best-practices in SEMinR:

CBSEM/CFA advances and best-practices in SEMinR:

Briefly, there are three steps to specifying and estimating astructural equation model using SEMinR. The following example is genericto either PLS-PM or CBSEM/CFA.

  1. Describe measurement model for each construct and its items,specifying interaction terms and other measurement features:
# Distinguish and mix composite measurement (used in PLS-PM)# or reflective (common-factor) measurement (used in CBSEM, CFA, and PLSc)# - We will first use composites in PLS-PM analysis# - Later we will convert the omposites into reflectives for CFA/CBSEM (step 3)measurements <- constructs(  composite("Image",        multi_items("IMAG", 1:5)),  composite("Expectation",  multi_items("CUEX", 1:3)),  composite("Value",        multi_items("PERV", 1:2)),  composite("Satisfaction", multi_items("CUSA", 1:3)),  interaction_term(iv = "Image", moderator = "Expectation"))
  1. Describe the structural model of causal relationships betweenconstructs (and interaction terms):
# Quickly create multiple paths "from" and "to" sets of constructs  structure <- relationships(  paths(from = c("Image", "Expectation", "Image*Expectation"), to = "Value"),  paths(from = "Value", to = "Satisfaction"))
  1. Put the above elements together to estimate the model using PLS-PM,CBSEM, or a CFA:
# Estimate using PLS-PM from model parts defined earlier  pls_model <- estimate_pls(data = mobi,                           measurement_model = measurements,                           structural_model = structure)summary(pls_model)# note: PLS requires seperate bootstrapping for PLS path estimates# SEMinR uses multi-core parallel processing to speed up bootstrappingboot_estimates <- bootstrap_model(pls_model, nboot = 1000, cores = 2)summary(boot_estimates)# Alternatively, we could estimate our model using CBSEM, which uses the Lavaan package# We often wish to conduct a CFA of our measurement model prior to CBSEM# note: we must convert composites in our measurement model into reflective constructs for CFA/CBSEMcfa_model <- estimate_cfa(data = mobi, as.reflective(measurements))summary(cfa_model)cbsem_model <- estimate_cbsem(data = mobi, as.reflective(measurements), structure)summary(cbsem_model)# note: the Lavaan syntax and Lavaan fitted model can be extracted for your own specific needscbsem_model$lavaan_syntaxcbsem_model$lavaan_model

SEMinR seeks to combine ease-of-use, flexible model construction, andhigh-performance. Below, we will cover the details and options of eachof the three parts of model construction and estimation demonstratedabove.

Setup

You must install the SEMinR library once on your local machine:

install.packages("seminr")

And then load it in every session you want to use it:

library(seminr)

Data

You must load your data into a dataframe from any source you wish(CSV, etc.). Column names must be names of your measurement items.

Important: Avoid using asterixes ’*’ in your column names(these are reserved for interaction terms).

survey_data <- read.csv("mobi_survey_data.csv")

For demonstration purposes, we will start with a dataset bundled withthe seminr package - themobi data frame (also found in thesemPLS R package). This dataset comes from a measurementinstrument for the European Customer Satisfaction Index (ECSI) adaptedto the mobile phone market (Tenenhaus et al. 2005).

You can see a description and sample of what is inmobi:

dim(mobi)#> [1] 250  24head(mobi)#>   CUEX1 CUEX2 CUEX3 CUSA1 CUSA2 CUSA3 CUSCO CUSL1 CUSL2 CUSL3 IMAG1 IMAG2 IMAG3#> 1     7     7     6     6     4     7     7     6     5     6     7     5     5#> 2    10    10     9    10    10     8    10    10     2    10    10     9    10#> 3     7     7     7     8     7     7     6     6     2     7     8     7     6#> 4     7    10     5    10    10    10     5    10     4    10    10    10     5#> 5     8     7    10    10     8     8     5    10     3     8    10    10     5#> 6    10     9     7     8     7     7     8    10     3    10     8     9    10#>   IMAG4 IMAG5 PERQ1 PERQ2 PERQ3 PERQ4 PERQ5 PERQ6 PERQ7 PERV1 PERV2#> 1     5     4     7     6     4     7     6     5     5     2     3#> 2    10     9    10     9    10    10     9    10    10    10    10#> 3     4     7     7     8     5     7     8     7     7     7     7#> 4     5    10     8    10    10     8     4     5     8     5     5#> 5     8     9    10     9     8    10     9     9     8     6     6#> 6     8     9     9    10     9    10     8     9     9    10    10

Measurement model description

SEMinR uses the following functions to describe measurementmodels:

These functions should be natural to SEM practitioners and encouragesthem to explicitly specify their core nature of their measurementmodels: composite or common-factor (See Sarstedt et al., 2016, andHenseler et al., 2013, for clear definitions).

Let’s take a closer look at the individual functions.

Specifying measurement models with constructs

constructs() compiles the measurement modelspecification list from the user specified construct descriptionsdescribed in the parameters. You must supply it with any number ofindividualcomposite,reflective,interaction_term, orhigher_composite constructs. Notethat we currenly only support higher-order constructs for PLS-PMestimation (i.e., composites).

measurements <- constructs(  composite("Image",         multi_items("IMAG", 1:5), weights = mode_B),  composite("Expectation",   multi_items("CUEX", 1:3), weights = regression_weights),  composite("Quality",       multi_items("PERQ", 1:7), weights = mode_A),  composite("Value",         multi_items("PERV", 1:2), weights = correlation_weights),  reflective("Satisfaction", multi_items("CUSA", 1:3)),  reflective("Complaints",   single_item("CUSCO")),  higher_composite("HOC", c("Value", "Satisfaction"), orthogonal, mode_A),  interaction_term(iv = "Image", moderator = "Expectation", method =  orthogonal, weights = mode_A),  reflective("Loyalty",      multi_items("CUSL", 1:3)))

We are storing the measurement model in themeasurementsobject for later use.

Note that neither a dataset nor a structural model isspecified in the measurement model stage, so we can reuse themeasurement model objectmeasurements across differentdatasets and structural models.

Describe individual constructs as composite or reflective

composite() orreflective() describe themeasurement of a construct by its items.

For example, we can usecomposite() for PLS models todescribe mode A (correlation weights) for the “Expectation” constructwith manifest variables CUEX1, CUEX2, and CUEX3:

composite("Expectation", multi_items("CUEX", 1:3), weights = mode_A)# is equivalent to:composite("Expectation", multi_items("CUEX", 1:3), weights = correlation_weights)

We can describe composite “Image” using mode B (regression weights)with manifest variables IMAG1, IMAG2, IMAG3, IMAG4 and IMAG5:

composite("Image", multi_items("IMAG", 1:5), weights = mode_B)# is equivalent to:composite("Image", multi_items("IMAG", 1:5), weights = regression_weights)

Alternatively, we can usereflective() forCBSEM/CFA/PLSc to describe the reflective, common-factor measurement ofthe “Satisfaction” construct with manifest variables CUSA1, CUSA2, andCUSA3:

reflective("Satisfaction", multi_items("CUSA", 1:3))

Converting composite models into reflective models

For covariance-based SEM and CFA, you will want constructs to bereflective common factors. If you already have compositeconstructs or measurement models, you may use them for CBSEM/CFA afterconverting them to reflective versions. Theas.reflective()function can convert either a single construct or an entire measurementmodel into reflective forms.

# Coerce a composite into reflective formimg_composite <- composite("Image", multi_items("IMAG", 1:5))img_reflective <- as.reflective(img_composite)# Coerce all constructs of a measurement model into composite formmobi_composites <- constructs(  composite("Image",         multi_items("IMAG", 1:5)),  composite("Expectation",   multi_items("CUEX", 1:3)),  reflective("Complaints",   single_item("CUSCO")))mobi_reflective <- as.reflective(mobi_composites)

Specifying construct measurement items

SEMinR strives to make specification of measurement items shorter andcleaner usingmulti_items() orsingle_item()

  • multi_items() creates a vector of multiple measurementitems with similar names
  • single_item() describe a single measurement item

We can describe the manifest variables: IMAG1, IMAG2, IMAG3, IMAG4and IMAG5:

multi_items("IMAG", 1:5)# which is equivalent to the R vector:c("IMAG1", "IMAG2", "IMAG3", "IMAG4", "IMAG5")

If your constructs are not numbered perfectly sequentially, then youwill combine your items using thec() function:

multi_items("IMAG", c(1, 3:5))# which is equivalent to the R vector:c("IMAG1", "IMAG3", "IMAG4", "IMAG5")

multi_items() is used in conjunction withcomposite() orreflective() to describe acomposite and common-factor construct respectively.

We can describe a single manifest variable CUSCO:

single_item("CUSCO")# which is equivalent to the R character string:"CUSCO"

Note that single-item constructs can be defined as eithercomposite mode A or reflective common-factor, but single-item constructsare essentially composites whose construct scores are determined.

Item associations (CBSEM only)

Covariance-based SEM models generally constrain all item errors to beunrelated. However, researchers might sometimes wish to free upcovariances between item errors for estimation.

# The following specifies that items PERQ1 and PERQ2 covary with each other, both covary with IMAG1mobi_am <- associations(  item_errors("PERQ1", "PERQ2"),  item_errors(c("PERQ1", "PERQ2"), "IMAG1"))

Interaction terms

Creating interaction terms by hand can be a time-consuming anderror-prone. SEMinR provides high-level functions for simply creatinginteractions between constructs.

Interaction terms are described in the measurement model functionconstructs() using the following methods:

  • product_indicator describes a single interactioncomposite as generated by the scaled product-indicator method asdescribed by Henseler and Chin (2010).
  • two_stage describes a single-item interaction compositethat uses a product of the IV and moderator construct scores. ForPLS-PM, the first stage uses PLS-PM described by Henseler and Chin(2010) whereas for CBSEM, the first stage uses a CFA and extracts tenBerge factor scores.
  • orthogonal describes a single interaction compositegenerated by the orthogonalization method of Henseler and Chin (2010).It is more typical to use for composites, to help interpretmulticollinearity between product terms

For these methods the standard deviation of the interaction term isadjusted as noted below.

For example, we can describe the following interactions between Imageand Expectation constructs:

# By default, interaction terms are computed using two stage proceduresinteraction_term(iv = "Image", moderator = "Expectation")# You can also explicitly specify how to create the interaction terminteraction_term(iv = "Image", moderator = "Expectation", method =  two_stage)interaction_term(iv = "Image", moderator = "Expectation", method =  product_indicator)interaction_term(iv = "Image", moderator = "Expectation", method =  orthogonal)

Note that these functions themselves return functions(closures) that are not resolved until processed in theestimate_pls() orestimate_cbsem() functionsfor SEM estimation.Note that recent studies show PLS modelsmust adjust the standard deviation of the interaction term because:“In general, the product of two standardized variables does notequal the standardized product of these variables” (Henseler andChin 2010). SEMinR automatically adjusts for this providing highlyaccurate model estimations.

Important Note: SEMinR syntax uses an asterisk “*”as a naming convention for the interaction construct. Thus, the “Image”+ “Expectation” interaction is called “Image*Expectation” in thestructural model below. Please refrain from using an asterisk “*” in thenaming of non-interaction constructs.

Structural model description

SEMinR makes for human-readable and explicit structural modelspecification using these functions:

Specify structural model of relationships between constructs

relationships() compiles the structural modelsource-target list from the user specified structural path descriptionsdescribed in the parameters.

For example, we can describe a structural model for themobi data:

mobi_sm <- relationships(  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"))

Note that neither a dataset nor a measurement model is specified inthe structural model stage, so we can reuse the structural model objectmobi_sm across different datasets and measurementmodels.

Specify structural paths with

paths() describe single or multiple structural pathsbetween sets of constructs.

For example, we can define paths from a single antecedent constructto a single outcome construct:

# "Image" -> "Expectation"paths(from = "Image", to = "Expectation")

Or paths from a single antecedent to multiple outcomes:

# "Image" -> "Expectation"# "Image" -> "Satisfaction"paths(from = "Image", to = c("Expectation", "Satisfaction"))

Or paths from multiple antecedents to a single outcome:

# "Image" -> "Satisfaction"# "Expectation" -> "Satisfaction"paths(from = c("Image", "Expectation"), to = "Satisfaction")

Or paths from multiple antecedents to a common set of outcomes:

# "Expectation" -> "Value"# "Expectation" -> "Satisfaction"# "Quality" -> "Value"# "Quality" -> "Satisfaction"paths(from = c("Expectation", "Quality"), to = c("Value", "Satisfaction"))

Even the most complicated structural models become quick and easy tospecify and modify.

Model Estimation

SEMinR can estimate a CFA or a full SEM model described by themeasurement and structural models above:

The above functions take some combination of the followingparameters:

For example, we can estimate a simple SEM model adapted from thestructural and measurement model with interactions described thusfar:

# define measurement modelmobi_mm <- constructs(  composite("Image",        multi_items("IMAG", 1:5)),  composite("Expectation",  multi_items("CUEX", 1:3)),  composite("Value",        multi_items("PERV", 1:2)),  composite("Satisfaction", multi_items("CUSA", 1:3)),  interaction_term(iv = "Image", moderator = "Expectation"),  interaction_term(iv = "Image", moderator = "Value"))# define structural model# note: interactions cobnstruct should be named by its main constructs joined by a '*'mobi_sm <- relationships(  paths(to = "Satisfaction",        from = c("Image", "Expectation", "Value",                 "Image*Expectation", "Image*Value")))mobi_pls <- estimate_pls(  data = mobi,  measurement_model = mobi_mm,  structural_model = mobi_sm,  inner_weights = path_weighting)#> Generating the seminr model#> All 250 observations are valid.mobi_cfa <- estimate_cfa(  data = mobi,  measurement_model = as.reflective(mobi_mm))#> Generating the seminr model for CFAmobi_cbsem <- estimate_cbsem(  data = mobi,  measurement_model = as.reflective(mobi_mm),  structural_model = mobi_sm)#> Generating the seminr model for CBSEM

Consistent PLS (PLSc) estimation for common factors

Dijkstra and Henseler (2015) offer an adjustment to generateconsistent weight and path estimates of common factors estimated usingPLS-PM. When estimating PLS-PM models usingestimate_pls(),SEMinR automatically adjusts to produce consistent estimates ofcoefficients for common-factors defined usingreflective().

Note: SEMinR also uses PLSc on PLS models with interactionsinvolving reflective constructs. PLS models with interactions can beestimated as PLS consistent, but are subject to some bias as per Beckeret al. (2018). It is not uncommon for bootstrapping PLSc models toresult in errors due the calculation of the adjustment.

Bootstrapping PLS models for significance

SEMinR can conduct high performance bootstrapping.

  • bootstrap_model() bootstraps a SEMinR model previouslyestimated usingestimate_pls()

This function takes the following parameters:

  • seminr_model: a SEM model provided byestimate_pls()
  • nboot: the number of bootstrap subsamples togenerate
  • cores: If your pc supports multi-core processing, thenumber of cores to utilize for parallel processing (default is NULL,wherein SEMinR will automatically detect and utilize all availablecores)

For example, we can bootstrap the model described above:

# use 1000 bootstraps and utilize 2 parallel coresboot_mobi_pls <- bootstrap_model(seminr_model = mobi_pls,                                 nboot = 1000,                                 cores = 2)#> Bootstrapping model using seminr...#> SEMinR Model successfully bootstrapped
  1. bootstrap_model() returns an object of classboot_seminr_model which contains the original modelestimation elements as well as the following accessible bootstrapelements:
    • boot_seminr_model$boot_paths an array of thenboot estimated bootstrap sample path coefficientmatrices
    • boot_seminr_model$boot_loadings an array of thenboot estimated bootstrap sample item loadingsmatrices
    • boot_seminr_model$boot_weights an array of thenboot estimated bootstrap sample item weightsmatrices
    • boot_seminr_model$boot_HTMT an array of thenboot estimated bootstrap sample model HTMT matrices
    • boot_seminr_model$boot_total_paths an array of thenboot estimated bootstrap sample model total pathsmatrices
    • boot_seminr_model$paths_descriptives a matrix of thebootstrap path coefficients and standard deviations
    • boot_seminr_model$loadings_descriptives a matrix of thebootstrap item loadings and standard deviations
    • boot_seminr_model$weights_descriptives a matrix of thebootstrap item weights and standard deviations
    • boot_seminr_model$HTMT_descriptives a matrix of thebootstrap model HTMT and standard deviations
    • boot_seminr_model$total_paths_descriptives a matrix ofthe bootstrap model total paths and standard deviations

Notably, bootstrapping can also be meaningfully applied to modelscontaining interaction terms and readjusts the interaction term(Henseler and Chin 2010) for every sub-sample. This leads to slightlyincreased processing times, but provides accurate estimations.

Reporting the model estimation results

Reporting the estimated model

There are multiple ways of reporting the estimated model. Theestimate_pls() function returns an object of classseminr_model. This can be passed directly to the base Rfunctionsummary(). This can be used in two primaryways:

  1. summary(seminr_model) to report\(R^{2}\), adjusted\(R^{2}\), path coefficients for thestructural model, and the construct reliability metrics\(rho_{C}\), also known as compositereliability (Dillon and Goldstein 1987), AVE (Fornell and Larcker 1981),and\(rho_{A}\) (Dijkstra and Henseler2015).
summary(mobi_pls)#> #> Results from  package seminr (2.3.7)#> #> Path Coefficients:#>                   Satisfaction#> R^2                      0.614#> AdjR^2                   0.606#> Image                    0.470#> Expectation              0.132#> Value                    0.320#> Image*Expectation       -0.140#> Image*Value              0.023#> #> Reliability:#>                   alpha  rhoC   AVE  rhoA#> Image             0.723 0.818 0.478 0.745#> Expectation       0.452 0.733 0.481 0.462#> Value             0.824 0.918 0.848 0.858#> Image*Expectation 0.802 0.833 0.291 1.000#> Image*Value       0.810 0.918 0.574 1.000#> Satisfaction      0.779 0.871 0.693 0.784#> #> Alpha, rhoC, and rhoA should exceed 0.7 while AVE should exceed 0.5
  1. model_summary <- summary(seminr_model) returns anobject of classsummary.seminr_model which contains thefollowing accessible objects (might vary depending on CBSEM or PLSmodel):
    • meta reports the metadata about the estimationtechnique and version
    • model_summary$iterations (PLS only) reports the numberof iterations to converge on a stable model
    • model_summary$paths reports the matrix of pathcoefficients,\(R^{2}\), and adjusted\(R^{2}\)
    • total_effects reports the total effects of thestructural model
    • total_indirect_effects reports the total indirecteffects of the structural model
    • model_summary$loadings reports the estimated loadingsof the measurement model
    • model_summary$weights reports the estimated weights ofthe measurement model
    • model_summary$validity$vif_items reports the VarianceInflation Factor (VIF) for the measurement model
    • model_summary$validity$htmt reports the HTMT for theconstructs
    • model_summary$validity$fl_criteria reports the fornelllarcker criteria for the constructs
    • model_summary$validity$cross_loadings (PLS only)reports all possible loadings between contructs and items
    • model_summary$reliability reports composite reliability(\(rho_{C}\)), cronbachs alpha, averagevariance extracted (AVE), and\(rho_{A}\)
    • model_summary$composite_scores reports the constructscores of composites
    • model_summary$vif_antecedents report the VarianceInflation Factor (VIF) for the structural model
    • model_summary$fSquare reports the effect sizes (\(f^{2}\)) for the structural model
    • model_summary$descriptives reports the descriptivestatistics and correlations for both items and constructs
    • model_summary$fSquare reports the effect sizes (\(f^{2}\)) for the structural model
    • it_criteria reports the AIC and BIC for the outcomeconstructs

Please note that common-factor scores are indeterminable andtherefore construct scores for reflecive common factors are extractedusing a ten Berge procedure.

Reporting results of a bootstrapped PLS

As with the estimated model, there are multiple ways of reporting thebootstrapping of a PLS model. Thebootstrap_model()function returns an object of classboot_seminr_model. Thiscan be passed directly to the base R functionsummary().This can be used in two primary ways:

  1. summary(boot_seminr_model) to report t-values andp-values for the structural paths

Get information about bootstrapped PLS models using thesummary() function on the bootstrapped model object.

summary(boot_mobi_pls)
  1. boot_model_summary <- summary(boot_seminr_model)returns an object of classsummary.boot_seminr_model whichcontains the following accessible objects:
    • boot_model_summary$nboot reports the number ofbootstraps performed
    • model_summary$bootstrapped_paths reports a matrix ofdirect paths and their standard deviation, t_values, and confidenceintervals.
    • model_summary$bootstrapped_weights reports a matrix ofmeasurement model weights and their standard deviation, t_values, andconfidence intervals.
    • model_summary$bootstrapped_loadings reports a matrix ofmeasurement model loadings and their standard deviation, t_values, andconfidence intervals.
    • model_summary$bootstrapped_HTMT reports a matrix ofHTMT values and their standard deviation, t_values, and confidenceintervals.
    • model_summary$bootstrapped_total_paths reports a matrixof total paths and their standard deviation, t_values, and confidenceintervals.

Reporting confidence intervals for direct and mediated bootstrappedstructural paths

Thesummary(boot_seminr_model) function will return themean estimate, standard deviation, t_value and confidence intervals fordirect structural paths in PLS models. However, thespecific_effect_significance() function can be used toevaluate the mean estimate, standard deviation, t_value and confidenceintervals for specific paths - direct and mediated (Zhao et al., 2010) -in aboot_seminr_model object returned by thebootstrap_model() function.

This function takes the following parameters:

  • boot_seminr_model: a bootstrapped SEMinR model returnedbybootstrap_model()
  • from: the antecedent construct for the structuralpath
  • to: the outcome construct for the structural path
  • through: the mediator construct, if the path ismediated (default is NULL). This parameter can also take a vector formuliple mediation.
  • alpha the required level of alpha (default is0.05)

and returns a specific confidence interval using the percentilemethod as per Henseler et al. (2014).

mobi_mm <- constructs(composite("Image",        multi_items("IMAG", 1:5)),composite("Expectation",  multi_items("CUEX", 1:3)),composite("Quality",      multi_items("PERQ", 1:7)),composite("Value",        multi_items("PERV", 1:2)),composite("Satisfaction", multi_items("CUSA", 1:3)),composite("Complaints",   single_item("CUSCO")),composite("Loyalty",      multi_items("CUSL", 1:3)))# Creating structural modelmobi_sm <- relationships( 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"))# Estimating the modelmobi_pls <- estimate_pls(data = mobi,                        measurement_model = mobi_mm,                        structural_model = mobi_sm)#> Generating the seminr model#> All 250 observations are valid.# Load data, assemble model, and bootstrapboot_seminr_model <- bootstrap_model(seminr_model = mobi_pls,                                    nboot = 50, cores = 2, seed = NULL)#> Bootstrapping model using seminr...#> SEMinR Model successfully bootstrapped# Calculate the 5% confidence interval for mediated path Image -> Expectation -> Satisfactionspecific_effect_significance(boot_seminr_model = boot_seminr_model,                             from = "Image",                             through = c("Expectation", "Satisfaction"),                             to = "Complaints",                             alpha = 0.05)#>  Original Est. Bootstrap Mean   Bootstrap SD        T Stat.        2.5% CI #>    0.016670348    0.015985164    0.014946000    1.115371854   -0.004270255 #>       97.5% CI #>    0.039357359# Calculate the 10% confidence interval for direct path Image -> Satisfactionspecific_effect_significance(boot_seminr_model = boot_seminr_model,                             from = "Image",                             to = "Satisfaction",                             alpha = 0.10)#>  Original Est. Bootstrap Mean   Bootstrap SD        T Stat.          5% CI #>     0.17873950     0.18917146     0.04986986     3.58411870     0.12195571 #>         95% CI #>     0.25100464

Reporting data descriptive statistics and construct descriptivestatistics

Thesummary(seminr_model) function will return fourmatrices:model_summary <- summary(seminr_model) returnsan object of classsummary.seminr_model which contains thefollowing four descriptive statistics matrices:

+ `model_summary$descriptives$statistics$items` reports the descriptive statistics for items+ `model_summary$descriptives$correlations$items` reports the correlation matrix for items+ `model_summary$descriptives$statistics$constructs` reports the descriptive statistics for constructs+ `model_summary$descriptives$correlations$constructs` reports the correlation matrix for constructs
model_summary <- summary(mobi_pls)model_summary$descriptives$statistics$itemsmodel_summary$descriptives$correlations$itemsmodel_summary$descriptives$statistics$constructsmodel_summary$descriptives$correlations$constructs

Plotting models

SEMinR can plot all supported models using the dot language and thegraphViz.js widget from theDiagrammeR package.

# generate a small model for creating the plotmobi_mm <- constructs(  composite("Image",        multi_items("IMAG", 1:3)),  composite("Value",        multi_items("PERV", 1:2)),  higher_composite("Satisfaction", dimensions = c("Image","Value"), method = two_stage),  composite("Quality",      multi_items("PERQ", 1:3), weights = mode_B),  composite("Complaints",   single_item("CUSCO")),  reflective("Loyalty",      multi_items("CUSL", 1:3)))mobi_sm <- relationships(  paths(from = c("Quality"),  to = "Satisfaction"),  paths(from = "Satisfaction", to = c("Complaints", "Loyalty")))pls_model <- estimate_pls(  data = mobi,  measurement_model = mobi_mm,  structural_model = mobi_sm)#> Generating the seminr model#> Generating the seminr model#> All 250 observations are valid.#> All 250 observations are valid.boot_estimates <- bootstrap_model(pls_model, nboot = 100, cores = 1)#> Bootstrapping model using seminr...#> SEMinR Model successfully bootstrapped

When we have a model, we can plot it and save the plot to a file.

plot(boot_estimates, title = "Bootstrapped Model")save_plot("myfigure.png")

References


[8]ページ先頭

©2009-2025 Movatter.jp