lsttheory_es: Estimate latent state-trait models for experience sampling...

View source: R/lsttheory_es.R

lsttheory_esR Documentation

Estimate latent state-trait models for experience sampling data

Description

Estimate latent state-trait models for experience sampling data

Usage

lsttheory_es(
  model,
  ntimepoints,
  nperiods = 1,
  data,
  addsyntax = "",
  la_t_equiv = NULL,
  la_o_equiv = NULL,
  la_s_equiv = NULL,
  vzeta_eqiv = NULL,
  veps_equiv = NULL,
  vtheta_equiv = NULL,
  nu_equiv = NULL,
  alpha_equiv = NULL,
  mtheta_equiv = NULL,
  gamma_t_equiv = NULL,
  manifest_thetacovariates = NULL,
  ...
)

Arguments

model

integer or character. Can be 1-9 or one of the following: c("MSSTinvar", "STARinvar", "PTARinvar", "ITARinvar", "PITARinvar", "STAR2", "PTAR2", "ITAR2", "PITAR2"). Each model implies invariance assumptions, but details can be changed with the options below.

  1. Model 1 ("STinvar" or "MSSTinvar") is a multistate-singletrait model (no autoregression). Models 1-5 assume state (residual)- and trait-equivalence, i.e., all factor loadings are fixed to 1 and all intercepts are fixed to 0.

  2. Model 2 ("STARinvar") is a singletrait model with autoregression.

  3. Model 3 ("PTARinvar") is a model with period-specific (usually day-specific) traits.

  4. Model 4 ("ITARinvar") is a model with indicator-specific traits.

  5. Model 5 ("PITARinvar") is a model with period- and indicator-specific traits.

  6. Models 6 - 9 ("STAR2", "PTAR2", "ITAR2", "PITAR2") are the same as models 2-5, but with state (residual)-congenericity and measurement invariance within periods. In experience sampling data, periods usually correspond to days.

ntimepoints

integer. The total number of measurement occasions on which data was collected.

nperiods

integer. The number of periods (e.g. days or weeks) on which data was collected.

data

a data.frame. This data frame contains the observed variables, sorted by time t and then by indicator i, i.e., Y11, Y21, Y31, ... Y12, Y22, Y32 ... Y15, Y25, Y35 ... etc.

addsyntax

character string. Will be added to generated lavaan syntax.

la_t_equiv

Character. Invariance option for factor loadings of the latent trait. Can be one of c("one", "period.invar", "free").

la_o_equiv

Character. Invariance option for factor loadings of the occasion factor (OCC). Can be one of c("one", "invar", "period.invar", "free"). In models without autoregression this corresponds to the factor loadings of the state variables (for models with a single trait or period-specific traits) or state residual variables (for models with indicator-specific traits).

la_s_equiv

Character. Invariance option for autoregression between occasion factors. Can be one of c("zero", "invar", "interval.invar", "free").

vzeta_eqiv

Character. Invariance option for variances of the state residual (zeta) variables. Can be one of c("invar", "period.invar", "free").

veps_equiv

Character. Invariance option for variances of the residual (epsilon) variables. Can be one of c("invar", "time.invar", "indicator.invar", "period.invar", "free").

vtheta_equiv

Character. Invariance option for variances of the latent trait. Can be one of c("invar","indicator.invar", "free").

nu_equiv

Character. Invariance option for intercepts of the indicators. Can be one of c("zero","period.invar", "free").

alpha_equiv

Character. Invariance option for intercepts of the latent states. Only relevant for models with a single trait or period-specific traits. Can be one of c("zero","period.invar", "free").

mtheta_equiv

Character. Invariance option for means of the latent traits. Character. Can be one of c("invar","indicator.invar", "free").

gamma_t_equiv

Character. Invariance option for regression coefficient from covariates to the latent trait variables.

manifest_thetacovariates

Vector or single character. Name or the variable (or variables) in the dataset which are covariates that further explain the trait variables in the model.

...

Further arguments passed to lower-level functions

Author(s)

Julia Norget


amayer2010/lsttheory documentation built on Nov. 3, 2023, 1:30 a.m.