mmLSTrf: Multi-Method Latent-State-Trait Random-Fixed Models

View source: R/mmLSTrf.R

mmLSTrfR Documentation

Multi-Method Latent-State-Trait Random-Fixed Models

Description

A function to estimate Multi-Method Latent-State-Trait Random-Fixed SEM models based on the MM-LST-RF model developed by Hintz, Geiser & Shiffman, 2019.

Usage

mmLSTrf(
  data,
  nSit = 2,
  nTime = 2,
  nMth = 2,
  structural = "TF",
  includeOMF = TRUE,
  lat.cov = list(TFcov = FALSE, OFcov = FALSE, TMFcov = FALSE, OMFcov = FALSE),
  meanstructure = FALSE,
  meas.invar = "time.invar",
  equiv.ass = list(TF = "cong", OF = "cong", OMF = "cong"),
  addsyntax = "",
  ...
)

Arguments

data

Data frame.
This data frame contains only the indicator variables which will be used to fit the MM-LST-RF model. For more information about the required data structure refer to the function details. The first indicator & the first method will be used as reference indicator & reference method across occasions and fixed situations.

nSit

Integer. Default = 2.
Number of fixed situations. Must be >= 2. Used to calculate the number of Trait Factors (TF).

nTime

Integer. Default = 2.
Number of time-points. Must be >= 2. Used to calculate the number of Occasion Factors (OF).

nMth

Integer. Default = 2.
Number of methods. Must be >= 2. Used to calculate the number of Trait-Method Factors (TMF) & Occasion-Method Factors (OMF).

structural

Character string. Default = "TF".
Adds structural part to the model. Can be one of the following:

  • "none" estimates only the measurement model.

  • "TF" models Person x Situation interactions. The TF from fixed situation s = 1 serves as reference to be contrasted against. TFcov will be set to FALSE.

  • "TMF" models Method x Situation interactions. The TMF from fixed situation s = 1 serve as references to be contrasted against. Only TMF of the same indicator i and method m will be contrasted across situations.TFcov will be set to FALSE.

  • "both" models both Person x Situation & Method x Situation interactions modeled. TFcov and TMFcov will be set to FALSE.

includeOMF

Logical. Default = TRUE.
If TRUE, OMF will be estimated. If FALSE, no OMF will be estimated. Can be used when only small or no occasion-method effects are expected.

lat.cov

List. Default = FALSE.
Specifies covariances between latent variables.

  • TFcov. If TRUE, covariances between all TF will be estimated. Will automatically be set to FALSE if structural = "TF" || "both". If FALSE, no covariances between TF will be estimated.

  • OFcov. If TRUE, covariances of OF with their respective counterparts in other fixed situations will be estimated (e.g., Cv(O21, O_22), Cv(O_21,O_23) and Cv(O_22, O_23)). If FALSE, no covariances between OF will be estimated.

  • TMFcov. If TRUE, covariances between all TMF will be estimated. Will automatically be set to FALSE if structural = "TMF" || "both". If FALSE, no covariances between TMF will be estimated.

  • OMFcov. If TRUE, covariances of OMF with their respective counterparts in other fixed situations will be estimated. If FALSE, no covariances between OMF will be estimated.

It is recommended to estimate covariances sparingly (especially for TMF) as this quickly inflates the amount of free model parameters. For the estimation of only a select number of covariances, specifications can be passed to the function via the "addsyntax" argument.

meanstructure

Logical. Default = FALSE.
If TRUE, model will be estimated with a meanstructure. If FALSE, model will be estimated without a meanstructure.

meas.invar

Character string. Default = "time.invar".
Measurment invariance assumptions across groups. Can be one of the following:

  • "time.invar" = assumes time invariance of indicator loadings + intercepts across occasions.

  • "metric.m" assumes time invariance & equal loadings across methods.

  • "metric.s" assumes time invariance & equal loadings across fixed situations.

  • "metric.b" assumes time invariance & equal loadings across methods & fixed situations.

  • "scalar.m" assumes time invariance & equal loading + intercepts across methods.

  • "scalar.s" assumes time invariance & equal loading + intercepts across fixed situations.

  • "scalar.b" assumes time invariance & equal loading + intercepts across methods & fixed situations.

  • "residual.m" assumes time invariance & equal loading + intercepts + error variances across methods.

  • "residual.s" assumes time invariance & equal loading + intercepts + error variances across fixed situations.

  • "residual.b" assumes time invariance & equal loading + intercepts + error variances across methods & fixed situations.

equiv.ass

List. Default = "cong".
Equivalence assumptions for latent variables. For TF, OF & OMF the following equivalence assumptions can be made separately for each latent variable:

  • "cong" for congeneric measures makes no restrictions apart from setting the loading of the first indicator of the latent variable to 1 and the intercept to 0 for identification purposes.

  • "ess.equiv" for essentially equivalent measures assumes equal loadings of all indicators of the latent variable.

For TF the following additional equivalence assumptions can be made:

  1. "equiv" for equivalent measures assumes equal loadings + intercepts of all indicators of TF.

  2. "ess.par" for essentially parallel measures assumes equal loadings + error variances of all indicators of TF.

  3. "par" for parallel measures assumes equal loadings, intercepts + error variances of all indicators of TF.

No equivalence assumptions need to be specified for TMF since they are defined as residual latent variables and all loadings are automatically fixed to one due to the combination of identification requirements and time invariance.

addsyntax

Character string.
Optional argument where additional model specifications, such as covariances between specific TMFs and TFs, can be passed to the function and will automatically be added to the generated lavaan syntax. For more information about the used variable notation refer to the function details.

...

Further arguments passed to lavaan::sem().

Details

Data Structure:
The order of the indicators Y_imts (i = indicator, m = method, t = time-point /occasion, s = fixed situation) need to match the following format: Y_1111, Y_2111, Y_1211, Y_2211, Y_1121, Y_2121, Y_1221, Y_2221, Y_1112, etc. This format reflects the order of indicator variables in a path diagram where indicators are first grouped by fixed situations, within those they are then grouped by occasions and within those they are lastly grouped by methods. The resulting nested structure has indicators nested within methods, nested within occasions, nested within fixed situations.

The number of fixed situations, occasions (time-points), methods and number of indicators can take any value >= 2. However, the model is restricted to an equal number of indicators for each method, occasion and fixed situation. For example, if method A has 3 indicators, method B must also have 3 indicators. Accordingly, if there are 2 methods with 3 indicators each, every occasion will have 6 indicators (3 from each method). In the same vein, the number of methods needs to be equal across occasions and the number of occasions needs to be equal across fixed situations. Lastly, only one Trait Factor is estimated per fixed situation.

Syntax notation:
Example for Y_2132 with i = 2, m = 1, t = 3, s = 2 (covariances with s = 3)

Variable / Parameter Notation Example
Trait factors (TF) Ts T2
Occasion factors (OF) Ots O32
Trait-method factors (TMF) TMims TM212
Occasion-method factors (OMF) OMmts OM132
TF mean M_Ts M_T2
TF variance V_Ts V_T2
OF variance V_Ots V_O32
OMF variance V_OMmts V_OM132
TMF variance V_TMims V_TM212
Observed variable variance V_Y_imts V_(variable name)
TF covariance Cv_TaxTb Cv_T2xT3
OF covariance Cv_OaxOb Cv_O32xO33
TMF covariance Cv_TMaxTMb Cv_TM212xTM213
OMF covariance Cv_OMaxOMb Cv_OM132xOM133
Residual variance epsilon eps_imts eps_2132
Intercept alpha alph_ims alph_212
Loading lambda lam_ims lam_212
Loading delta del_ims del_212
Loading gamma gam_ims gam_212
Difference TF Dif_Ts Dif_T2
Regression intercept (TF) b0_Ts b0_T2
Regression slope beta (TF) b1_Ts b1_T2
Residual variance omega (TF) omg_Ts omg_T2
Difference TMF Dif_TMims Dif_TM212
Regression slope beta (TMF) b1_TMims b1_T212
Residual variance omega (TMF) omg_TMims omg_T212
Commonality TF Com_Ts Com_T2
Fixed situation specificity TF SitSp_Ts SitSp_T2
Commonality TMF Com_TMims Com_TM212
Fixed situation specificity TMF SitSp_TMims SitSp_TM212
Observed variable reliability RelY_imts Rel(variable name)
Observed variable consistency ConY_imts Con(variable name)
Observed variable specificity SpeY_imts Spe(variable name)

Note that for difference and commonality variables the fixed reference situation is always s = 1.

Value

Object of class mmLSTrf.

Author(s)

Tinhof Dora

References

Hintz F., Geiser C., & Shiffman S. (2019). A latent state-trait model for analyzing states, traits, situations, method effects, and their interactions. Journal of Personality (1-21). https://doi.org/10.1111/jopy.12400

Examples

modelfit <- mmLSTrf(mmLSTrf_exampledata, nSit=2, nTime=3, nMth=2, structural="TF", 
                    includeOMF=TRUE, lat.cov=list(TFcov=FALSE, OFcov=FALSE, 
                    TMFcov=FALSE, OMFcov=FALSE), meanstructure=TRUE, 
                    meas.invar="scalar.b", equiv.ass=list(TF="ess.par", 
                    OF="ess.equiv", OMF="ess.equiv"), addsyntax="")
print(modelfit)

amayer2010/lsttheory documentation built on March 1, 2025, 11:30 a.m.