crlog_line {crosslag}R Documentation

Title Linear Cross lagged analysis

Description

Title Linear Cross lagged analysis

Usage

crlog_line(xname, yname, data.x1, data.y1, data.xt, data.yt)

Arguments

xname

If linear cross lagged analysis is used between x and y, 'xname' is the name of x

yname

If linear cross lagged analysis is used between x and y, 'yname' is the name of y

data.x1

A numeric variable.

data.y1

A numeric variable. 'data.x1' and 'data.y1' comes from the first time point

data.xt

A numeric variable.

data.yt

A numeric variable. 'data.xt' and 'data.yt' comes from the another time point

Value

a datafrme containing 'Relation','beta','se','z','pvalue','x','y','rmr' and 'cfi'. Relation: This is a string that represents the relationship between the variables. beta: This is the estimated coefficient of the model. p: This is the p-value of the model coefficient, used to test whether the coefficient is significantly different from 0. x: This is the input xname, representing the name of the x variable. y: This is the input yname, representing the name of the y variable. rmr: This is one of the model fit measures, representing the root mean square residual of the model. cfi: This is one of the model fit measures, representing the comparative fit index of the model.

Examples

data(test_data1)
data(test_data2)
result <- crlog_line(xname="ASI",yname = "PWRI",data.x1 = test_data1$ASI,
                     data.y1 = test_data1$PWRI,data.xt = test_data2$ASI,
                     data.yt = test_data2$PWRI)

[Package crosslag version 0.1.0 Index]