# ramLCS: Univariate latent change score model In RAMpath: Structural Equation Modeling Using the Reticular Action Model (RAM) Notation

## Description

Univariate latent change score model

## Usage

 ```1 2``` ```ramLCS(data, y, timey, ram.out = FALSE, betay, my0, mys, varey, vary0, varys, vary0ys, ...) ```

## Arguments

 `data` data `y` y data `timey` time of y `ram.out` Whether print ram matrices `betay` Starting value `my0` Starting value `mys` Starting value `varey` Starting value `vary0` Starting value `varys` Starting value `vary0ys` Starting value `...` Options can be used for lavaan

## Value

 `model` The lavaan model specification of the bivariate latent change score model `lavaan` The lavaan output `ram` Output in terms of RAM matrices

## References

Zhang, Z., Hamagami, F., Grimm, K. J., & McArdle, J. J. (2013). Using R Package RAMpath for Tracing SEM Path Diagrams and Conducting Complex Longitudinal Data Analysis. Structural Equation Modeling.

## Examples

 ```1 2 3 4 5 6``` ```data(ex3) test.lcs<-ramLCS(ex3, 7:12) summary(test.lcs\$lavaan, fit=TRUE) bridge<-ramPathBridge(test.lcs\$ram, allbridge=FALSE, indirect=FALSE) plot(bridge, 'lcs') ```

### Example output

```Loading required package: lavaan
This is lavaan 0.5-23.1097
lavaan is BETA software! Please report any bugs.
lavaan (0.5-23.1097) converged normally after  63 iterations

Number of observations                           500

Estimator                                         ML
Minimum Function Test Statistic               21.534
Degrees of freedom                                20
P-value (Chi-square)                           0.366

Model test baseline model:

Minimum Function Test Statistic              917.839
Degrees of freedom                                15
P-value                                        0.000

User model versus baseline model:

Comparative Fit Index (CFI)                    0.998
Tucker-Lewis Index (TLI)                       0.999

Loglikelihood and Information Criteria:

Loglikelihood user model (H0)              -8226.137
Loglikelihood unrestricted model (H1)      -8215.370

Number of free parameters                          7
Akaike (AIC)                               16466.274
Bayesian (BIC)                             16495.776
Sample-size adjusted Bayesian (BIC)        16473.557

Root Mean Square Error of Approximation:

RMSEA                                          0.012
90 Percent Confidence Interval          0.000  0.041
P-value RMSEA <= 0.05                          0.990

Standardized Root Mean Square Residual:

SRMR                                           0.042

Parameter Estimates:

Information                                 Expected
Standard Errors                             Standard

Latent Variables:
Estimate  Std.Err  z-value  P(>|z|)
y0 =~
y1                1.000
dy2 =~
y2                1.000
dy3 =~
y3                1.000
dy4 =~
y4                1.000
dy5 =~
y5                1.000
dy6 =~
y6                1.000
ys =~
dy2               1.000
dy3               1.000
dy4               1.000
dy5               1.000
dy6               1.000
y1 =~
Y7                1.000
y2 =~
Y8                1.000
y3 =~
Y9                1.000
y4 =~
Y10               1.000
y5 =~
Y11               1.000
y6 =~
Y12               1.000

Regressions:
Estimate  Std.Err  z-value  P(>|z|)
y2 ~
y1                1.000
y3 ~
y2                1.000
y4 ~
y3                1.000
y5 ~
y4                1.000
y6 ~
y5                1.000
dy2 ~
y1      (bety)    0.067    0.014    4.760    0.000
dy3 ~
y2      (bety)    0.067    0.014    4.760    0.000
dy4 ~
y3      (bety)    0.067    0.014    4.760    0.000
dy5 ~
y4      (bety)    0.067    0.014    4.760    0.000
dy6 ~
y5      (bety)    0.067    0.014    4.760    0.000

Covariances:
Estimate  Std.Err  z-value  P(>|z|)
y0 ~~
ys      (vry0)    0.045    0.161    0.281    0.779

Intercepts:
Estimate  Std.Err  z-value  P(>|z|)
ys       (mys)    1.618    0.375    4.315    0.000
y0       (my0)   19.962    0.151  132.376    0.000
y1                0.000
.y2                0.000
.y3                0.000
.y4                0.000
.y5                0.000
.y6                0.000
.dy2               0.000
.dy3               0.000
.dy4               0.000
.dy5               0.000
.dy6               0.000
.Y7                0.000
.Y8                0.000
.Y9                0.000
.Y10               0.000
.Y11               0.000
.Y12               0.000

Variances:
Estimate  Std.Err  z-value  P(>|z|)
.dy2               0.000
.dy3               0.000
.dy4               0.000
.dy5               0.000
.dy6               0.000
y1                0.000
.y2                0.000
.y3                0.000
.y4                0.000
.y5                0.000
.y6                0.000
y0      (vry0)    3.730    0.559    6.668    0.000
ys      (vrys)    0.400    0.071    5.649    0.000
.Y7      (vary)    9.696    0.307   31.623    0.000
.Y8      (vary)    9.696    0.307   31.623    0.000
.Y9      (vary)    9.696    0.307   31.623    0.000
.Y10     (vary)    9.696    0.307   31.623    0.000
.Y11     (vary)    9.696    0.307   31.623    0.000
.Y12     (vary)    9.696    0.307   31.623    0.000

lavaan (0.5-23.1097) converged normally after  63 iterations

Number of observations                           500

Estimator                                         ML
Minimum Function Test Statistic               21.534
Degrees of freedom                                20
P-value (Chi-square)                           0.366

Model test baseline model:

Minimum Function Test Statistic              917.839
Degrees of freedom                                15
P-value                                        0.000

User model versus baseline model:

Comparative Fit Index (CFI)                    0.998
Tucker-Lewis Index (TLI)                       0.999

Loglikelihood and Information Criteria:

Loglikelihood user model (H0)              -8226.137
Loglikelihood unrestricted model (H1)      -8215.370

Number of free parameters                          7
Akaike (AIC)                               16466.274
Bayesian (BIC)                             16495.776
Sample-size adjusted Bayesian (BIC)        16473.557

Root Mean Square Error of Approximation:

RMSEA                                          0.012
90 Percent Confidence Interval          0.000  0.041
P-value RMSEA <= 0.05                          0.990

Standardized Root Mean Square Residual:

SRMR                                           0.042

Parameter Estimates:

Information                                 Expected
Standard Errors                             Standard

Latent Variables:
Estimate  Std.Err  z-value  P(>|z|)
y0 =~
y1                1.000
dy2 =~
y2                1.000
dy3 =~
y3                1.000
dy4 =~
y4                1.000
dy5 =~
y5                1.000
dy6 =~
y6                1.000
ys =~
dy2               1.000
dy3               1.000
dy4               1.000
dy5               1.000
dy6               1.000
y1 =~
Y7                1.000
y2 =~
Y8                1.000
y3 =~
Y9                1.000
y4 =~
Y10               1.000
y5 =~
Y11               1.000
y6 =~
Y12               1.000

Regressions:
Estimate  Std.Err  z-value  P(>|z|)
y2 ~
y1                1.000
y3 ~
y2                1.000
y4 ~
y3                1.000
y5 ~
y4                1.000
y6 ~
y5                1.000
dy2 ~
y1      (bety)    0.067    0.014    4.760    0.000
dy3 ~
y2      (bety)    0.067    0.014    4.760    0.000
dy4 ~
y3      (bety)    0.067    0.014    4.760    0.000
dy5 ~
y4      (bety)    0.067    0.014    4.760    0.000
dy6 ~
y5      (bety)    0.067    0.014    4.760    0.000

Covariances:
Estimate  Std.Err  z-value  P(>|z|)
y0 ~~
ys      (vry0)    0.045    0.161    0.281    0.779

Intercepts:
Estimate  Std.Err  z-value  P(>|z|)
ys       (mys)    1.618    0.375    4.315    0.000
y0       (my0)   19.962    0.151  132.376    0.000
y1                0.000
.y2                0.000
.y3                0.000
.y4                0.000
.y5                0.000
.y6                0.000
.dy2               0.000
.dy3               0.000
.dy4               0.000
.dy5               0.000
.dy6               0.000
.Y7                0.000
.Y8                0.000
.Y9                0.000
.Y10               0.000
.Y11               0.000
.Y12               0.000

Variances:
Estimate  Std.Err  z-value  P(>|z|)
.dy2               0.000
.dy3               0.000
.dy4               0.000
.dy5               0.000
.dy6               0.000
y1                0.000
.y2                0.000
.y3                0.000
.y4                0.000
.y5                0.000
.y6                0.000
y0      (vry0)    3.730    0.559    6.668    0.000
ys      (vrys)    0.400    0.071    5.649    0.000
.Y7      (vary)    9.696    0.307   31.623    0.000
.Y8      (vary)    9.696    0.307   31.623    0.000
.Y9      (vary)    9.696    0.307   31.623    0.000
.Y10     (vary)    9.696    0.307   31.623    0.000
.Y11     (vary)    9.696    0.307   31.623    0.000
.Y12     (vary)    9.696    0.307   31.623    0.000

Running  dot -Tpdf -o lcs.pdf  lcs.dot
sh: 1: dot: Permission denied
```

RAMpath documentation built on May 2, 2019, 9:12 a.m.