grand_standardized_solution: Grand Standardized Solution

View source: R/grandStandardizedSolution.R

grand_standardized_solutionR Documentation

Grand Standardized Solution

Description

Grand standardized solution of a two-stage path analysis model.

Usage

grand_standardized_solution(
  object,
  model_list = NULL,
  se = TRUE,
  acov_par = NULL,
  free_list = NULL,
  level = 0.95
)

grandStandardizedSolution(
  object,
  model_list = NULL,
  se = TRUE,
  acov_par = NULL,
  free_list = NULL,
  level = 0.95
)

Arguments

object

An object of class lavaan.

model_list

A list of string variable describing the structural path model, in lavaan syntax.

se

A Boolean variable. If TRUE, standard errors for the grand standardized parameters will be computed.

acov_par

An asymptotic variance-covariance matrix for a fitted model object.

free_list

A list of model matrices that indicate the position of the free parameters in the parameter vector.

level

The confidence level required.

Value

A matrix of the standardized model parameters and standard errors.

Examples

library(lavaan)

## A single-group, two-factor example
mod1 <- '
   # latent variables
     ind60 =~ x1 + x2 + x3
     dem60 =~ y1 + y2 + y3 + y4
   # regressions
     dem60 ~ ind60
'
fit1 <- sem(model = mod1,
          data  = PoliticalDemocracy)
grand_standardized_solution(fit1)

## A single-group, three-factor example
mod2 <- '
    # latent variables
      ind60 =~ x1 + x2 + x3
      dem60 =~ y1 + y2 + y3 + y4
      dem65 =~ y5 + y6 + y7 + y8
    # regressions
      dem60 ~ ind60
      dem65 ~ ind60 + dem60
'
fit2 <- sem(model = mod2,
            data  = PoliticalDemocracy)
grand_standardized_solution(fit2)

## A multigroup, two-factor example
mod3 <- '
  # latent variable definitions
    visual =~ x1 + x2 + x3
    speed =~ x7 + x8 + x9
  # regressions
    visual ~ c(b1, b1) * speed
'
fit3 <- sem(mod3, data = HolzingerSwineford1939,
            group = "school",
            group.equal = c("loadings", "intercepts"))
grand_standardized_solution(fit3)

## A multigroup, three-factor example
mod4 <- '
  # latent variable definitions
    visual =~ x1 + x2 + x3
    textual =~ x4 + x5 + x6
    speed =~ x7 + x8 + x9

  # regressions
    visual ~ c(b1, b1) * textual + c(b2, b2) * speed
'
fit4 <- sem(mod4, data = HolzingerSwineford1939,
            group = "school",
            group.equal = c("loadings", "intercepts"))
grand_standardized_solution(fit4)

Gengrui-Zhang/R2spa documentation built on Sept. 6, 2024, 5:01 p.m.