# clpm_poly_c: Title Nonlinear Cross Lag Analysis based on Polynomial linear... In crosslag: Perform Linear or Nonlinear Cross Lag Analysis

 clpm_poly_c R Documentation

## Title Nonlinear Cross Lag Analysis based on Polynomial linear regression

### Description

Title Nonlinear Cross Lag Analysis based on Polynomial linear regression

### Usage

``````clpm_poly_c(xname, yname, data1, data2, adjust = FALSE, adjust_name = NULL)
``````

### Arguments

 `xname` If cross lagged analysis is used between x and y, 'xname' is the name of x `yname` If cross lagged analysis is used between x and y, 'xname' is the name of x `data1` A dataframe containing data of x and y at the same time point. If covariate adjustments are made (adjust=T), data of covariates should also be included. The input 'xname','yname' and 'adjust_name' is written in the same way among the 'data1' column names `data2` A dataframe containing data of x and y at the another time point. If covariate adjustments are made (adjust=T), data of covariates should also be included. The input 'xname','yname' and 'adjust_name' is written in the same way among the 'data2' column names `adjust` The default value is F. If you want to perform covariate adjustments on x and y based on adjust_target(), please use T. `adjust_name` The name of the covariate, corresponding to the data contained in data1 or data2. If there are multiple covariates, they need to be saved in a vector.

### Value

A dataframe containing the result of Nonlinear Cross Lag Analysis after polynomial regression

### Examples

``````data(test_data1)
data(test_data2)
# Not adjusting for covariates
result <- clpm_poly_c(xname = "PWRI",yname = "LDL_C",
data1 = test_data1,data2 = test_data2,adjust = FALSE)
# Adjust for covariates
result_ad <- clpm_poly_c(xname = "ASI",yname = "PWRI",
data1 = test_data1,data2 = test_data2,
adjust = TRUE,adjust_name=c("HDL_C","LDL_C"))
``````

crosslag documentation built on May 29, 2024, 7:25 a.m.